How to Change Bricks Preloader Background Color

Working on a dark-themed site like our friend Storm and getting blinded by the light background of Bricks’ preloader screen of the editor?

Here’s how we can change the loading screen to a dark one.

But first, a quick demo of the result:

Users of WPCodeBox: Refer to this tutorial.

Step 1

Create a directory named say, assets in your child theme directory.

Inside that create a directory named css.

Inside the above directory, create a file named builder.css having:

.brx-body.main #bricks-preloader {
  background-color: var(--builder-bg);
}

#bricks-preloader .title img {
  filter: invert(75%);
}

Step 2

Edit your child theme’s functions.php.

Change

add_action( 'wp_enqueue_scripts', function() {
	// Enqueue your files on the canvas & frontend, not the builder panel. Otherwise custom CSS might affect builder)
	if ( ! bricks_is_builder_main() ) {
		wp_enqueue_style( 'bricks-child', get_stylesheet_uri(), ['bricks-frontend'], filemtime( get_stylesheet_directory() . '/style.css' ) );
	}
} );

to

add_action( 'wp_enqueue_scripts', function() {
	// Enqueue your files on the canvas & frontend, not the builder panel. Otherwise custom CSS might affect builder)
	if ( ! bricks_is_builder_main() ) {
		wp_enqueue_style( 'bricks-child', get_stylesheet_uri(), ['bricks-frontend'], filemtime( get_stylesheet_directory() . '/style.css' ) );
	} else {
		wp_enqueue_style( 'builder', get_stylesheet_directory_uri() . '/assets/css/builder.css' );
	}
} );
Get access to all 525 Bricks code tutorials with BricksLabs Pro

Leave the first comment

 

Related Tutorials..

Pro
CSS Grid for Posts Element in Bricks

CSS Grid for Posts Element in Bricks

The "Posts" element in Bricks has "Grid" as the default layout but the actual CSS it applies on the page feels hacky with negative margins…
Categories:
Floats in Bricks for Wrapping Text Around Images

Floats in Bricks for Wrapping Text Around Images

In the Bricks Facebook group a user asks: Float, left or right? Just a quick question. Am I going crazy or can't I specify a…
Categories:
Tags:
Using Automatic.css in Bricks

Using Automatic.css in Bricks

Update on 18 Aug 2022: The info below is not up to date. Follow documentation/videos provided by Automatic.css. Automatic.css is an excellent CSS framework that…
Categories:
Auto Responsive Grids in Bricks

Auto Responsive Grids in Bricks

This tutorial provides the CSS that can be pasted for automatic responsive grids in Bricks Builder. Posts element Each post will get a right padding…
How to create a dynamic infinite logo slider with ACF and Bricks

How to create a dynamic infinite logo slider with ACF and Bricks

This tutorial provides the builder settings, PHP & CSS codes that can be pasted in order to create an infinite logo slider in pure CSS…
Collapse All button for Elements in Bricks Editor

Collapse All button for Elements in Bricks Editor

Bricks' editor shows the various buttons to add elements in the left side grouped into different categories. While it is possible to collapse them all…
Categories:
Width and Height of Mobile Hamburger Toggle in Bricks

Width and Height of Mobile Hamburger Toggle in Bricks

Looking to change the size of Bricks hamburger toggle in the mobile menu? The default width value of 20px can be changed by selecting the…
Categories: