NO BUG: Custom CSS: Inline vs. External Stylesheet Issue

When using the custom CSS feature with a class, the output on the front-end remains inline, even if the ‘external stylesheet’ option is selected. However, when you add custom CSS at the ID level, the output is indeed placed in an external stylesheet.

I presented this question in the Facebook group and received confirmation from a Bricks user that this is accurate. (See link below for Facebook post)

You can replicate this behavior by following these steps, for example: Add a div element, go to custom CSS at the ID level, and add ‘%root% { height: 4rem; width: 4rem; background-color: red; }’ and save it. If you check the front-end, you will find this style added to a stylesheet.

However, when you add a class to that div element, go to custom CSS, and add, for example, ‘%root% { background-color: green; }’, save it, and inspect the front-end, you will observe that the CSS is added inline to the index.

Hi Lekassi,
Thanks so much for your report, and welcome to the forum!

This is not a bug. We are already working on moving global classes to an external file as well (see Bricks 1.7 Changelog » Disable class chaining and global classes).: Releases – Bricks

…the next step is to provide one global class CSS file (when using the external file CSS loading method) rather than loading those rules inline.

Best regards,
timmse

Thank you for your response, and it’s good to hear. Do you have an estimate for when this option will be live?

Not concrete, but you can get an overview on the roadmap: