Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Headline Color Specificity

  • In my opinion when adding a text color to a headline in GB it should have an !important flag, it’s the most specific place you can put the style directly on the text itself, it therefore should override every other scenario. For instance lets say our background has a dark blue and a container class of .is-dark-blue-bg and we have all headings set to a color of white when they are inside this blue bg, when we want to override one of the defaults that’s when we should use the text color. so it should either be applied directly to the headline as an inline style or have an important flag.

  • Hi there,

    Thanks for sharing your thoughts!

    The good news is, our current setup already achieves this more efficiently. When you set a color for a headline block, we add a unique class to the heading tag, increasing specificity to override other styles (like the text color set to the container) without needing !important.

    This should provides the necessary specificity while avoiding the complications of !important or inline styles, keeping the CSS cleaner and easier to manage as the project grows.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.