Answer the question
In order to leave comments, you need to log in
How to implement such an approach in EMMET + JADE?
Good afternoon!
Tell me if there is such an implementation possibility in EMMET + JADE (those who use BEM will understand me)
Standard option:
block > block__header > block__content > block__footer
I would like:
block > #__header > #__content > #__footer
But everything would unfold according to the standard JADE scheme
block
block__header
block__content
block__footer
Answer the question
In order to leave comments, you need to log in
Emmet has built-in filters that appear at the end of a line after |.
It's strange, but many do not know about them.
In your case, you need to use two filters at once: bem and jade.
This will unfold into familiar JADE
article.post
.post__header
.post__content
.post__footer
Preferences -> Package settings -> Emmet -> Settings - User
{
"syntaxProfiles": {
"html" : {
"filters" : "html, bem"
}
},
"preferences": {
"bem.elementSeparator":"__",
"bem.modifierSeparator":"--",
"bem.shortElementPrefix":"-"
}
}
Config for setting up sublime
{
"preferences": {
"bem.elementSeparator": "__",
"bem.modifierSeparator": "_",
"bem.shortElementPrefix": "-"
},
"snippets": {
"jade" : {
"filters" : "bem,jade",
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question