Removing Block CSS files

Permalink
Hi

I am working on a theme and when I add a block to the page and assign it to use a template I have done it adds in the CSS into the DOM. I would like to remove this and have the CSS all in one file together.

So, if I add a an autonav block and use mega_menu template, the following CSS is in the page;

<link href="/application/blocks/autonav/templates/mega_menu/view.css?ccm_nocache=c2f810f838c393a212b03734e81cad1b159e6ccc" rel="stylesheet" type="text/css" media="all">

I managed to remove the font awesome from the CSS by doing this:

$this->providesAsset('css', 'font-awesome');

But, I cannot seem to do this with the block CSS

2 Attachments

moonshark
 
hutman replied on at Permalink Reply
hutman
Remove this file application/blocks/autonav/templates/mega_menu/view.css and put those styles into your generic theme's stylesheet.

You can't use it as an asset because in this case that style is only included if that block is on the page and it's not a registered asset.
moonshark replied on at Permalink Reply
moonshark
Hi thanks, will try that. I was going to do that but thought it would just be a 404 if I did.