Can anyone tell me the proper way to add css styles with a specific weight to a sub themes .info file? I'd particularly like to know if there is a weight value that will load the css file as the very last one in the after the media query grid css files? For instance, I've added:

css[style-homepage.css][name] = Homepage Styles.
css[style-homepage.css][description] = This file holds the homepage specific css styling.
css[style-homepage.css][options][weight] = 99

to my sub theme .info file, but no matter what weight I give it, it won't load as the last file. Is there a weight number range? Is there any documentation on the default weights for theme css files?

I appreciate any help.

Comments

TelFiRE’s picture

I have run into this issue repeatedly. IMO there is no reason for global.css to be at the very last of the list (obvious exceptions being the specific layout's sheet and any browser conditionals), but it is routinely followed by random module CSS files.

PCateNumbersUSA’s picture

Would love to hear form an omega dev about this issue, particularly any workaround.

Dubs’s picture

Yes, I would like to know too. At the moment I'm having to override with a more specific CSS rule which isn't ideal.

TelFiRE’s picture

Over-specificity and !importants abound :(

Dubs’s picture

Status: Active » Closed (works as designed)

OK, as @PCateNumbersUSA says, you need to add the CSS declaration in the .info file as follows: -

css[style-homepage.css][name] = Homepage Styles.
css[style-homepage.css][description] = This file holds the homepage specific css styling.
css[style-homepage.css][options][weight] = 99

BUT you also need to enable the CSS in your theme.

Edit your theme's appearance settings, click "Toggle Styles" and enable your new stylesheet.

hosais’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active

I use omega theme tool to create a subtheme.
I would like to override \profiles\commerce_kickstart\themes\omega_kickstart\css\omega-kickstart-alpha-default.css

.page-checkout #commerce-checkout-form-checkout fieldset label,
.page-checkout #commerce-checkout-form-review fieldset label {
  float: left;   <---- to float: none;
  /* LTR */
  width: 20%; }

I tried to put this css into mytheme_style.css and it does not work at "960px" mode but It would work if I change to "fluid".
I tried to change the wight and it does not work. I of course set "toggle style" thing.

How can I fix this problem?
------------------------------------------------------

For more information:
(If I directly change omega-kickstart-alpha-default.css, it would work.)
(I also observed the html code,


<style type="text/css" media="all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape)"> ...

and 

<style type="text/css" media="all and (min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape)">  ....

there is no my css file url link in these two sections.

Thanks.

hosais

steinmb’s picture

Status: Active » Fixed

Consider this fixed. #6 does look unrelated to CSS load order.

Status: Fixed » Closed (fixed)

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