Created
March 10, 2018 09:24
-
-
Save nicothin/f739ffe0401cee3c3a390740e64c9f58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//- Все примеси в этом файле должны начинаться c имени блока (TEMP-00) | |
mixin my-new-block(text, mods) | |
//- Принимает: | |
//- text {string} - текст | |
//- mods {string} - список модификаторов | |
//- Вызов: | |
+my-new-block('Текст', 'some-mod') | |
- | |
// список модификаторов | |
var allMods = ''; | |
if(typeof(mods) !== 'undefined' && mods) { | |
var modsList = mods.split(','); | |
for (var i = 0; i < modsList.length; i++) { | |
allMods = allMods + ' my-new-block--' + modsList[i].trim(); | |
} | |
} | |
.my-new-block(class=allMods)&attributes(attributes) | |
.my-new-block__inner!= text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment