Comments (7)
@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.
from sassdown.
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}
from sassdown.
Yep, it's possible - just need to investigate and get around to it.
from sassdown.
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:
<a href="#" class="button button--yellow">yellow</a>
<a href="#" class="button button--purple">purple</a>
<a href="#" class="button button--submarine">submarine</a>
<a href="#" class="button button--rain">rain</a>
<a href="#" class="button button--fog">fog</a>
...
If we compile the result we can simplify this with the addition of a 'split' handlebar helpers.
{{#each (split "yellow, purple, submarine, rain, fog")}}
<a href="#" class="button button--{{this}}">{{this}}</a>
{{/each}}
Compiling the result eventually become even more interesting with more complicated structures.
{{#each (split "status, success, warning, error")}}
<div class="message message--{{this}}">
Message type "{{this}}" example.
<a href="#" class="message__close"><i class="icon icon--close"></i></a>
</div>
{{/each}}
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.
from sassdown.
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
from sassdown.
@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.
from sassdown.
+1
from sassdown.
Related Issues (20)
- Document which browsers and versions the project intends to support HOT 1
- Tag versions HOT 1
- Iframe height=0 HOT 6
- Publish a bugfix to registry HOT 1
- intendation "rules" unclear HOT 4
- Warning: Cannot read property 'orig' of undefined HOT 5
- Empty files object returns cryptic error message
- Unable to nest markdown in comments. HOT 3
- Would be nice to allow specific ordering of styleguide sections
- Rename sassdown to grunt-sassdown HOT 2
- Sassdown should be decoupled from Grunt HOT 7
- Sassdown should be caller-agnostic (gulp, grunt, streams) HOT 1
- Sassdown should have functional test coverage HOT 1
- Method for setting up categories of patterns? HOT 2
- Independent code comments separate from regular css comments HOT 2
- Output to JSON HOT 2
- Sassdown index file misnamed
- Typekit
- 1.0.0?
- The fix merged in #92 isn't available through npm install sassdown HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sassdown.