-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print sass variables #38
Comments
@mmintel I've also considered adding this. It involves quite a bit of work (or heavy regex) because, as you say, Sassdown does not actually compile the Sass itself. Marking this as a future feature for now, though. |
This is technically possible. Sass can interpolate strings in comments, but they will only print out to a string when compiling to CSS and using the CSS comments Test this code online with http://sassmeister.com/ $buttonClass: 'btn';
$colorPrimary: #FF0;
/*
# Test
Use #{$buttonClass} for a button. The primary color is #{$colorPrimary}
*/
// not working with single line comments #{$buttonClass} |
Yep, it's possible - just need to investigate and get around to it. |
Hi, I wanted to make a new issue with a pull request but I think this may solve partially this issue. When following BEM syntax we frequently add modifiers to the same html structure. For example a simple button may have many 'color' variants:
If we compile the result we can simplify this with the addition of a 'split' handlebar helpers.
Compiling the result eventually become even more interesting with more complicated structures.
Now, I'm not 100% sure this would help with this specific issue. Let me know if I need to adapt my changes or make a different pull request. |
Is there any kind of workaround until this is implemented? I am really missing this feature =( I tried to use the compiled .css file for sassdown but then I am losing the navigation because there is just one file |
@mmintel Sorry, not yet. You could have a look at the pull request by @idflood (idflood@536a129). I've not had the time to work on this for a while, but it's still on the list. |
+1 |
Hello,
I don't know if thats technically possible, but it would be reeeally cool if I could "print " variables in my comments. I can't do that with Sass alone because comments are not compiled.
What I want to use is the following
/*
# Test
Use #{$buttonClass} for a button. The primary color is #{$colorPrimary}
*/
Greetings
The text was updated successfully, but these errors were encountered: