SASS source maps for CMS and Framework

56 views
Skip to first unread message

Jonathon Menz

unread,
Dec 15, 2014, 1:22:43 AM12/15/14
to silverst...@googlegroups.com
SilverStripe's compiled CSS doesn't include any line comments by default which makes it hard to trace styles and get involved with contributing to front-end development. If you want to know where a style comes from you have to temporarily override a config.rb file to enable line comments and recompile the CSS. If you contribute a change to a project you then need to undo this change and recompile the CSS again to exclude them.

I don't want to include line comments by default since it bloats the code but since 1.0.0 Compass supports source maps. They're beautiful magical things that let you inspect elements in your browser and be shown the source SASS/SCSS files instead of the compiled css. Since they're a separate file they don't bloat the generated CSS at all and they're way better than line comments.

Only addition required is 'sourcemap = true' in each config.rb file.

Think it would be good to include these across the board in CMS and Framework unless there's a good reason not to?

Ingo Schommer

unread,
Dec 15, 2014, 5:27:08 AM12/15/14
to silverst...@googlegroups.com
Hey Jonathon, in general I’d like to keep the build-time artefacts to a minimum, since they add potential for causing merge conflicts and generally bloat the repo. Adding the generated CSS files is a necessary evil to keep dependencies low for installing SilverStripe. For sourcemaps on the other hand: From what you’re saying, you can just reconfigure config.rb locally in order to generate sourcemaps, without changing the generated CSS file, right? In this case, I’d suggest we document this somewhere (in CMS Architecture?). 

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/d/optout.

Jonathon Menz

unread,
Dec 15, 2014, 10:04:17 PM12/15/14
to silverst...@googlegroups.com
Hi Ingo, yeah that's right. Understand your points so documenting it as an optional extra step sounds like a good idea.
Reply all
Reply to author
Forward
0 new messages