Why styling with editor puts !important property after style ?

[ad_1]

I use Gutenberg FSE to build the website. After giving a title the custom font-size of 4rem, when I look in the Google dev tool, I can see an !important property after my style. What causes that ?

.has-white-color {
color: var(–wp–preset–color–white) !important;
}

[ad_2]
2 Comments
  1. You can use !important to override any previous styling rules for a specific property on a specific element. I prefer to avoid using it and rather target the specific element by using a parent class to override it. But it looks like the editor is using this just to be sure. Maybe this doesn’t happen if you use a parent class in your style. Or is the CSS added automatically?

  2. Theme builders do that so that their styles don’t get overwritten by conflicting stylesheets.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer