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

moonray’s picture

Category: bug » support
Status: Active » Fixed

When creating the skins use the weight property of the attached.

See drupal_process_attached() and drupal_add_js().

Status: Fixed » Closed (fixed)

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