1st May '23
/
0 comments

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 610 Bricks code tutorials with BricksLabs Pro

Leave the first comment

 

Related Tutorials..

Pro
Sticky Scrolling in Bricks Builder

Sticky Scrolling in Bricks Builder

Updated on 22 Apr 2024 This Pro tutorial provides the steps to fix elements in the viewport i.e., make them sticky while adjacent content in the section…
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:
How to add SVG icon as list item bullets

How to add SVG icon as list item bullets

Add this sample CSS: Replace brxe-list with the class of your ul element. Here's how you can generate the value of background-image property: Copy your…
Categories:
Tags:
Pro
Custom Posts Grid Layout in Bricks using CSS Grid

Custom Posts Grid Layout in Bricks using CSS Grid

There are at least three ways in which we can build custom loops in Bricks. Posts elementTurning on Query Loop on a containerCode element While…
Categories:
Animated Border Hover Effect Buttons

Animated Border Hover Effect Buttons

Here's how can be implemented in HTML/WordPress/Bricks. Step 1 Add this CSS in your child theme's style.css or another appropriate location: Step 2 Add a…
Categories:
Add masonry style to the Remote Template list

Add masonry style to the Remote Template list

This article will show you how to transform the remote templates list of Bricks in a masonry style without cropping your images - it will…
Categories:
Tags:
Pro
Slow Zoom Effect for Slides in Bricks

Slow Zoom Effect for Slides in Bricks

This Pro tutorial provides the steps to set up a slow zoom effect for slides of nestable slider element in Bricks. Step 1 Add a…
Categories:
Tags:
Pro
Dynamic Horizontal Posts Accordion in Bricks

Dynamic Horizontal Posts Accordion in Bricks

Creating a horizontal accordion of featured images from posts output by Bricks' query loop.
Categories:
Tags:
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…