Hi,

I am trying to customize some css settings and noticed that trying to override any settings from layout.css in the custom.css file doesn't work.

Upon checking what order they load, it seems layout.css is loaded after custom.css.

I am not a css expert .. but I am thinking in order for those settings to override the default settings, the custom.css would have to load last ...

Can you confirm?

Peace,
Julie

CommentFileSizeAuthor
#4 css-override-1407258-4.patch1.72 KByashadev
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richH’s picture

Hi,

I've activated custom.css in the theme configuration and also added it to the .info file and STILL can't get any CSS instructions in the CSS file to be used. They're totally ignored even when I clear the cache, run cron, delete the cached files from the disk etc etc.

How did you get custom.css to even be processed (even if it is in the wrong order)

Thanks
Rich

spyderpie’s picture

I only edited it and checked the box in the theme settings: Add Customized Stylesheet (custom.css)
i am using the Fluid Width, I haven't tried to see if changing that makes a difference.

Nothing else. Are you looking at the page source to find it? Mine shows up right in the middle of all the 'import' commands ...

Peace,
Julie

spyderpie’s picture

Anyone?

yashadev’s picture

Assigned: Unassigned » yashadev
Status: Active » Needs review
FileSize
1.72 KB

Try this patch. Remember that if there's a more specific css properties, those will be used.

For example, the following mark up will be used

h1.title a {
  color: red;
}

instead of this one:

a {
  color: red;
}

no matter what css file loads last

yashadev’s picture

Status: Needs review » Fixed

Committed to 7.x-2.x

Status: Fixed » Closed (fixed)

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

aburnsni’s picture

Just tried this patch against 7.x-2.0. It seems to work OK until I turn on "Aggregate and compress CSS files." when I then lose all themeing. Is it me or is it the patch?

yashadev’s picture

Thanks, I'll check it later tonight