Closed (fixed)
Project:
Skinr
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2011 at 19:14 UTC
Updated:
1 May 2012 at 17:20 UTC
Jump to comment: Most recent file
Hello. Ive implemented the Skinr 7.x-2.x into my theme. It works ok. But there is a small issue that conflicts with my theme CSS.
Basicly i want to load the Skinr CSS after my theme CSS.
Why?
Because if the Skinr CSS is loaded before my theme CSS it gets overwritten and ignored. I have to use the css "!important" to style it and i dont want to use that. Css "!important" its a hack that sould be avoided.
I tried the 'weight' => '999' but it dosen't work (i think this weight has to deal with the skinr module and not the theme css loading order)
So how can i load the Skinr css after my theme CSS?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | patch_commit_5c1bb72f0761.patch | 4.79 KB | moonray |
Comments
Comment #1
moonray commentedThe css includes take the same arguments as #attached (see docs for drupal_add_css()), so you should have full power over at what point it shows up. Try setting the group to 'CSS_THEME' as well as setting weight.
Comment #2
moonray commentedMarking as fixed. Re-open if still an issue.
Comment #4
gausarts commentedHi,
Sorry to reopen.
I am trying to get this to work to no avail.
The code:
The css output:
css/button-arrow.css (Array, 9 elements)
The error:
Ref: http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#attached
Any hint about the issue?
Thanks
UPDATE:
This one doesn't output error, but the weight + group are not applied:
'css' => array('data' => 'css/button-arrow.css', 'group' => CSS_THEME, 'weight' => 999),Comment #5
moonray commentedWell, looks like you found a bug. Your first example was correct, but the notices shouldn't happen.
Attached is the patch (including tests) that should fix the problem.
Note that there are 3 ways to include a CSS file:
Comment #6
moonray commentedCommitted. Please re-open if you still have issues.
Comment #7
gausarts commentedThanks a lot. Works great now.
Before the patch I used a swap to the haystack via hook_css_alter:
The patch should allow more granular weights over a group of files as needed. Thanks
Comment #8
gausarts commentedOops, you came early, sorry