DEV Community

Discussion on: CSS in 2020 - A Practical Guide

 
maxart2501 profile image
Massimo Artizzu

CSS classes don't affect SEO and won't do it in the foreseeable future. And there's a reason for that: sites that don't use semantic class names have never been penalized for that and changing that would have a huge impact. And backlash.

Although modern crawlers could potentially infer more meaning from CSS (it's not like Google doesn't have the capability), there's no reliable way to tell how much you can infer and even if it's not actually misleading. For example, what if a class has been removed from the stylesheets but not from the markup? Or if it's been completely overridden?

Moreover, there are frameworks that completely mangle class names when compiling the project. Google's homepage itself is a classic example of this!

The performance boost of atomic CSS is one of the main advantages, but hardly noticeable on average. CSS isn't normally what makes a page stutter or load slow 😉