QUESTION
=> Is there a way to deactivate the Bricks CSS?
=> Or maybe just a way to deactivate the enqueue of the [frontend.min.css] file?
I’d like to manage all CSS by myself (or at least most of it).
QUESTION
=> Is there a way to deactivate the Bricks CSS?
=> Or maybe just a way to deactivate the enqueue of the [frontend.min.css] file?
I’d like to manage all CSS by myself (or at least most of it).
You can do that, but I would heavily discourage this.
add_action('wp_enqueue_scripts', function () {
wp_dequeue_style('bricks-frontend');
wp_deregister_style('bricks-frontend');
}, PHP_INT_MAX); // This makes sure it gets called last
The frontend styes do a lot of heavy lifting, that you now would have to implement yourself (Popups, Accessiblity-related styling for Dropdown-Menus etc.).
My advice would be to be patient. In the Bricks 2.0 Roadmap Blogpost, it was written that they will make bricks styles less invasive, probably by useing things like @layer and :where() for the frontend-css. This technologies are now widly supported and then your CSS will override all their styles by default
I will try this solution. But as you said, it may break too many things.
It would be amazing if Bricks switch to [:where()] in the future.
Thx a lot for your feedback.
It was confirmed that the switch to :where() is coming in Bricks 2.0.