In theme.info, when adding CSS files with duplicate names (although in another directory), the files don't get loaded properly.

Example:

name = mytheme
description = My custom theme
core = 7.x

stylesheets[all][] = assets/css/style.css
stylesheets[all][] = assets/fonts/montserrat/style.css

In this case, the first style.css file gets ignored completely and isn't loaded

Comments

speekless created an issue. See original summary.

speekless’s picture

Issue summary: View changes
japo32’s picture

A similar issue was filed here: https://www.drupal.org/node/2303161

cilefen’s picture

Based on the other issue, this is "works as designed".

djalxs’s picture

This is, as stated by cilefen, the intended functionality for Drupal.

The reason being is so when you create a child theme you can prevent certain style sheets of the parent theme from being loaded. The same applies to JS files.

The simple workaround for this is to rename your stylesheet to montserrat.css. Even if not using a CMS of any description, it is always advisable to name your files something descriptive rather than just style.css or script.js.

Alternatively, as you are adding a font, why not use the @font-your-face module.

cilefen’s picture

Category: Bug report » Support request
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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