• Hey guys! I’m struggling HARD to simply adjust css.

    Wordpress creates a lot of unneccessary inline css, with styles for every block of content. As of right now we’re up to ‘.wp-block-78’ or something like that, while I’d love to have a way of having no inline css, with a css file which has the properties for classes like h2 or custom classes. Is that possible? Thank you in advance!

    As an example I dug out this: https://www.styleshout.com/demo/?theme=augustine

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You apparently have some sort optimization plugin, since the block CSS by default is loaded from an external file, it does not appear by default as inline styling. Inline styles are actually more efficient than external files because it reduces the number of separate file requests. Same amount of data, fewer requests.

    Optimization plugins typically have a setting where you can disable CSS optimization. I don’t recommend doing so, but it should be possible.

    I agree that it’s annoying to have a bunch of CSS you don’t need, but the issue is that it takes more processing time to decide what’s really needed than to simply send out everything that might be needed.

    If you really wanted less CSS by eliminating rules that you would never make use of, you could compose an abridged version of the block styles and enqueue that while dequeuing the default styles.

Viewing 1 replies (of 1 total)

The topic ‘No inline css, simple css file?’ is closed to new replies.