Open bd0bd opened 9 years ago
You can remove any CSS file from displaying in your theme by adding a line in your theme .info file:
stylesheets[] = system.theme.css
If you have that stylesheet in your theme, then your replacement version will be used. If you do not have that file in your theme, nothing will replace it and the original file will just simply be suppressed.
Note that removing CSS files may cause some functionality to break. In particular, you shouldn't remove the system.css
file, otherwise things like collapsed fieldset, vertical tabs, contextual links, and other system-provided functionality will stop working.
As an aside, you may also want to turn on CSS aggregation under the Configuration > Development > Performance page. Then each of the stylesheets within a group will be compressed into a single stylesheet. But I can understand if this is a site cleanliness issue rather than a performance issue. Due to the modular component of Backdrop, it's very common that each module you enable will also come with an additional front-end stylesheet.
@quicksketch, thank you!
I can understand if this is a site cleanliness issue
Yes! Nothing else.
I'm not having any luck with disabling core CSS by "enabling" it in the theme's .info file. The function hook_css_alter seems to be the alternative?
For me it is not beautiful to have such a big list of links if I need only one or two css files. Could you please tell me how to remove it from head?:
Thank you!