Sign in
Log inSign up

Do long CSS selectors make page rendering slow?

Sharon Chaisky's photo
Sharon Chaisky
·May 22, 2017

I've heard that having really long selectors in your CSS makes your page rendering slow.

Since I'm used to using SASS, so I always end up having really long selectors. Something like this:

.parent .child .element .child .child2 .child3 .child4 .child5{
    ...
}

Is it true that long selectors make rendering slow? and are there any ways to avoid this from happening?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct