nex3/sass — Issue #241: [request] seperate media/browser specific markup to seperate style sheet
Author: tomByrer
Created: 2012-01-06 03:32:05+00:00
State: open

I have to agree with Sass's docs: "@import... takes a separate (slow) HTTP request [per .css file]". But there are times when you want to work on a single .SCSS/.SASS source doc, tag some markup as browser-specific, and have the resultant .CSS contain a conditionally-include link to a second (also auto-generated from the single source) .CSS file.

Example scenario:
The main .SCSS file contains all the markup, with special notation for IE6 workarounds. Sass then splits off the IE6-tagged markup into "ie6-only.css", and inserts in main.css: "

Inspiration:
http://perfectionkills.com/profiling-css-for-fun-and-profit-optimization-notes/
Search for SASS ;)

Idea on how to implement:
Not sure; I don't know Sass or Ruby well enough, perhaps something like the new Placeholder Selectors, or a pseudo-selector like ":-ie6external-any". I considered to define a custom Sass function to hack my own, but I keep gravitating that a tweak to the Placeholder Selectors can do the trick. I don't see other ways in the docs how to do de-interpolate into 2+ .CSS files.

cheers