0

I would like an opinion. Does inline CSS hurt website speed performance?

Because even though I write all my custom CSS in the theme customization page Custom CSS section, still in some speed tests it detects inline CSS.

So in other words my question will be: For website performance, do I need to move my Custom CSS to an actual theme file, for example styles1.css?

0

1 Answer 1

0

Theme customization pages usually dump those css customizations into a <style></style> block directly in the page head, which counts as inline styles. Some plugins will drop styles there too.

Anytime you use third-party plugins, or themes, it's inevitable that you will run into some inline issues. There's a balancing act of cost - is the cost to develop your own worth it? Or is the cost of performance scores low enough to offset that?

How much it hurts I think depends from site to site. I don't know that the front end user would notice as much as an algorithm like google's lighthouse does.

For kicks and giggles, you could scan your site before moving the css, and then scan it after you put it into its own file to see how much of a change it is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.