Hi,

I want to use grunt-contrib-sass to compile my scss files but there is a bug when scss files have multiple dots like omega_subtheme_name.styles.scss so I renamed the four of them replacing the '.' by '--' so omega-subtheme-name--styles.scss instead. Does the dot have any importance? Am I good to go if I update the .info file accordingly?

Comments

Nicolas Bouteille’s picture

I am still interested to know if the dots are important, but just wanted to mention that this is how to use multiple dot files in grunt:
http://stackoverflow.com/questions/16697344/configure-grunt-file-name-ma...

fubhy’s picture

Status: Active » Fixed

We already do that in our grunt file (for javascript files).

Nicolas Bouteille’s picture

Status: Fixed » Active

Yes indeed I saw that :) but my question was about the importance of dots though. Is there any reason why there are dots in the scss file names in omega? do you use it somewhere? or can I just replace '.' by '--' if I prefer?

fubhy’s picture

Status: Active » Fixed

It's only relevent for the .no-query.scss suffix (if you are using that).

Nicolas Bouteille’s picture

Status: Fixed » Active

interesting... why? is it so that the no-query.css file can only be loaded for IE8 and below?

fubhy’s picture

Status: Active » Fixed

The part you asked for is not relevant. That can be a --. But for discovering these no-query versions of files we use the dot as a separator in the regex. The regex finds all files that end in .no-query.css and tries to match the rest of the name of the file to an existing, normal file. If these conditions apply, it will load the no-query version but only for IE8 and below.

Nicolas Bouteille’s picture

Status: Fixed » Active

In my omega subtheme as well as in ohm, the no-query.css is added just like the others in the .info file.
stylesheets[all][] = css/ohm.normalize.css
stylesheets[all][] = css/ohm.hacks.css
stylesheets[all][] = css/ohm.styles.css
stylesheets[all][] = css/ohm.no-query.css

so it gets loaded all the time even on modern browsers. Is it a bug? Where is this regex no-query file discovery done?

fubhy’s picture

Status: Active » Fixed

This is not the case. It's in the .info file, but included with an IE conditional comment. Did you actually look at the DOM or are you just saying that "from the looks of it" it will get loaded on all browser? Because yeah, it's in the .info file, but altered later. The no-query.css is definitely not getting added for all browsers. http://cgit.drupalcode.org/omega/tree/omega/template.php#n268

Please check your DOM in the head section and look at the results. It will (should) be in IE conditional comments.

Nicolas Bouteille’s picture

Nice! Yes I did check on DOM but the reason why it wasn't in conditional comment was because I had left my previous comment on .INFO file
stylesheets[all][] = css/omega-custom.no-query.css ;using Respond.js instead
thanks for all these explanations!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.