Closed (fixed)
Project:
Skinr
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2012 at 13:32 UTC
Updated:
1 Jan 2013 at 16:20 UTC
Hi!
I've created a couple of skins. The second skin overrides the first one.
But their corresponding CSS files are imported in reverse order, and the override is not applied.
function nova_bs_skinr_skin_bs_info() {
$skins = array();
$skins['span_columns'] = array(
/* ... */
'attached' => array(
'css' => array(
'spanned.css',
'span-columns.css',
),
),
/* ... */
);
$skins['apply_omega'] = array(
/* ... */
'attached' => array(
'css' => array(
'apply-omega.css',
),
),
/* ... */
);
/* ... */
return $skins;
}
produces:
<style media="all" type="text/css">
@import url("http://example.com/sites/all/modules/ctools/css/ctools.css?mf8a8n");
@import url("http://example.com/sites/all/themes/nova_bs/skins/bs/apply-omega.css?mf8a8n");
@import url("http://example.com/sites/all/themes/nova_bs/skins/bs/span-columns.css?mf8a8n");
@import url("http://example.com/sites/all/themes/nova_bs/skins/bs/spanned.css?mf8a8n");
</style>
To work around this issue, i have to use the nasty !important thingie. Yuck!
Comments
Comment #1
moonray commentedWhen creating the skins use the weight property of the attached.
See drupal_process_attached() and drupal_add_js().