Delivering a State-Machine with CSS / Another approach to Angular SEO
CSS is the language developers love to hate. This is mostly because of the inconsistent syntax. But many fail to recognize the power of modern CSS. I’m here to give an example of CSS power that may very well blow your mind. As an additional bonus, this technique can be used to provide a better first load experience for Angular apps and can be a fix for its SEO problems that are often hard to fix without some sort of server setup.
Ladies and gentlemen, introducing :target
:target is a special pseudo selector in CSS that helps you change the style of something that is currently the target — the hash address in the URL matches its id. It sounds harder than it is so let me jump straight into an example, but first, a little recap about the hash address in browsers.
Consider, a static website, say, an FAQ page. All the questions are at top, followed by all the answers. You want users who...
Continue reading →