Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#4 | css-override-1407258-4.patch | 1.72 KB | yashadev |
Comments
Comment #1
richH CreditAttribution: richH commentedHi,
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
Comment #2
spyderpie CreditAttribution: spyderpie commentedI 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
Comment #3
spyderpie CreditAttribution: spyderpie commentedAnyone?
Comment #4
yashadev CreditAttribution: yashadev commentedTry 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
instead of this one:
no matter what css file loads last
Comment #5
yashadev CreditAttribution: yashadev commentedCommitted to 7.x-2.x
Comment #7
aburnsni CreditAttribution: aburnsni commentedJust 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?
Comment #8
yashadev CreditAttribution: yashadev commentedThanks, I'll check it later tonight