RebelMouse Talk to Us
How to Use Variables to Set Colors Across Your Site

Why This Is Important

You can easily set colors for every element of your site on RebelMouse, including the color of your text, links, and headlines. Usually there's a set of 2–3 colors used across a site. But instead of hardcoding the color on every element, you can use variables to make it so that if a color needs to change, you can update it in one place instead of everywhere — making future maintenance easy.


How to Use Color Variables

To set a variable, you need to navigate to Global Settings in our Layout & Design tool. This is the first page you land on after you choose Layout & Design from the hamburger menu (☰) as a logged-in user.

Next, click on the Code view in Global Settings:

Then, add in a variable like this:

<variable caption="AnyName " name="name_you_will_use_in_code" type="color" value="hex_value" />

Once added, it will look like this:

You can then use it in the Style tab of the Properties card for any element:

You can also use color variables in Custom HTML elements:

Then, you can add a <style></style> tag as follows to set up color overrides:

However, do not use color variables in the Header Code element because it will not render any results.

If you have any questions about this, please email support@rebelmouse.com.

Build on a Better PlatformReady to See More?
Request a Proposal
The Most Secure CMS of 2022
Featured

The Most Secure CMS of 2022

Why RebelMouse Is the Most Secure CMS on the Web

Delivering a secure, high-performing environment with extreme reliability is essential to all of our clients at RebelMouse. We only use industry-leading, reliable approaches to host our infrastructure. This ensures maximum stability and security for all of our clients’ data. Here are just some of the reasons we’re able to maintain a hard-bodied product that’s flexible, too.

Most websites get hacked. RebelMouse has never been hacked.

Keep reading... Show less
Google Made Major Changes to Its Formula for Page Speed. Here’s What to Do About It in 2022.
Rebel Insights

Google Made Major Changes to Its Formula for Page Speed. Here’s What to Do About It in 2022.

Make sure your site is set up for success in 2022.

In the spring of 2020, Google let the world know that its Core Web Vitals would become the new benchmark for measuring a site's performance in its search results, known as the page experience update. Fast forward to more than a year later in August 2021 when, after much anticipation, Google's page experience update became official.

Since its rollout, developers have felt the impact of how their publishing platforms stack up against the new standard. Important decisions around the architecture of your site can now make or break your site's performance in the eyes of Google.

HTTP Archive, a tracking platform that crawls the web to identify trends and record historical patterns, has revealed how top content management systems (CMS) have weathered the page experience update through the creation of its Core Web Vitals Technology Report. RebelMouse consistently outperforms major CMS platforms on Google's most critical metrics since its rollout and into January 2022:

Luckily, performing well on Core Web Vitals is possible with thoughtful, strategic changes to your site’s codebase. Here's what you need to know and how we can help.

Keep reading... Show less
Build on a Better PlatformReady to See More?
Request a Proposal
Optimizing TikTok Embeds to Reduce CLS Penalties
Rebel Insights

Optimizing TikTok Embeds to Reduce CLS Penalties

TikTok has become one of, if not the most popular social media platform. They're fun, they're fast, and anyone can have fun with them, and we have worked very hard to make it super easy for writers and editors to embed them by simply dropping a link into our Add Media Bar.

Keep reading... Show less
Here’s What You Need to Know About Google’s Big GA4 Announcement
Rebel Insights

Here’s What You Need to Know About Google’s Big GA4 Announcement

The search giant said that it’s nixing Universal Analytics for good

The internet was abuzz last week when Google announced that it’s sunsetting its Universal Analytics offering in favor of Google Analytics 4 (GA4). The search giant will stop processing new hits through Universal Analytics on July 1, 2023 (Universal Analytics 360 properties have until October 1, 2023). The news was a shock for site owners and search marketers alike who were not prepared for such a hard deadline.

In its March 16, 2022 announcement, Google said that “Universal Analytics was built for a generation of online measurement that was anchored in the desktop web, independent sessions and more easily observable data from cookies. This measurement methodology is quickly becoming obsolete.”

By contrast, Google says that “Analytics 4 operates across platforms, does not rely exclusively on cookies and uses an event-based data model to deliver user-centric measurement.” Click here to read Google’s full announcement and overview of the differences between GA4 and Universal Analytics.

Why the GA4 Announcement Is a Big Deal

Keep reading... Show less
Build on a Better PlatformReady to See More?
Request a Proposal