Override just one file?

Permalink
I have a block that I want to tweak the css file for, do I need to copy the whole block or just the css file?

In my tests so far, only copying the whole block works. If I copy just the css file (following the folder structure) and make some changes the override doesn't seem to happen. I'm pretty sure i'm getting something wrong, any comments welcome.

Examples:

Original: /packages/content_slider/blocks/content_slider/css/content_slider.css

Override: /blocks/content_slider/css/content_slider.css

cytringan
 
EvanCooper replied on at Permalink Reply
EvanCooper
Yes, that's correct when it comes to overriding packages. The controller is picking the CSS so best to just copy everything up.

Another perhaps better solution in this case would be to make a template for the block in your override directory, so blocks/content_slider/templates/mytemplate/view.php and view.css

Just copy up both the block view.php and the css renamed to view.css and then make your CSS modifications there.

Finally, though probably least elegantly, you could also also place the styles in your theme's CSS as well.