Support » Developing with WordPress » style.css and theme.css?

  • I see that two stylesheets are loading that I didn’t enqueue:

    theme.css and style.css

    Likely these are triggered by Gutenberg but in many cases they apply more specificity than needed and I have to hunt down what/why and use more specificity than I care for to override.

    How to disable or control this?

    It looks like theme.css comes from add_theme_support( 'wp-block-styles' ) but what about style.css? Looks like a lot of that is just what makes the things from Gutenberg work but again, there is a lot in there I don’t want like specific colors, social icon styling, and non-relative font sizing.

    Also they sometimes use the :root selector. Why? This adds a higher level of specificity than seems needed and that pseudo-selector carries more weight than a typical element like body or just html. This seems like a bad practice for a default stylesheet as I have to outweigh the selector to override something like the colors and font-sizes they use.

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