Open NoNameProvided opened 8 years ago
Indents in jade represent nesting and not whitespace and to my eyes this works as expected. In my opinion this should be closed but I am not a member of the core team.
Add a block
as a child of .col-xs-11.col-sm-10
in something.jade
should fix it.
You need to do:
.row.center-xs.around-xs
.col-xs-11.col-sm-10
yield
I believe the reason this currently works is that pug acts as if every included template ends in an implicit yield
, which is not indented. i.e. it's rendered as if you had written:
.row.center-xs.around-xs
.col-xs-11.col-sm-10
yield
This is obviously super confusing behaviour and will definitely be changed/fixed as part of the review of blocks, extends and includes in 3.0.0
Add a block as a child of .col-xs-11.col-sm-10 in something.jade should fix it.
Nope. As I remember it doesn't. I had to add a wrapper like this:
.m-topMenu
include ../../includes/something.jade
.wrapper
.row
.col-xs-3
| Content
This is obviously super confusing behaviour and will definitely be changed/fixed as part of the review of blocks, extends and includes in 3.0.0
:+1:
include
doesn`t respect idents properly. To reproduce use the following:/includes/something.jade
/somethingelse.jade
This will compile to the following html markup:
The expected markup would be: