Unless you're targeting IE8 without Autoprefixer or similar processor, please use the syntax with two colons: ::before and ::after.
The single colon syntax is for pseudo classes, while the double colon is for pseudo elements.
Thanks for pointing this out Massimo! I guess I had not picked up on the fact that the double colon was the updated spec for pseudo elements. Definitely helped me understand the difference between the pseudo elements and pseudo classes!
Hey, Massimo! Yes, I agree, triangles are very interesting. This article was focused on the basic usage of :before and :after element, but triangles are indeed a great example. Thanks! :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Unless you're targeting IE8 without Autoprefixer or similar processor, please use the syntax with two colons:
::before
and::after
.The single colon syntax is for pseudo classes, while the double colon is for pseudo elements.
Anyway, another nice use? Triangles!
Triangles are just some basic shape, you can actually have some fun with them. And it's still a legit use as they're still decorations.
Thanks for pointing this out Massimo! I guess I had not picked up on the fact that the double colon was the updated spec for pseudo elements. Definitely helped me understand the difference between the pseudo elements and pseudo classes!
Hey, Massimo! Yes, I agree, triangles are very interesting. This article was focused on the basic usage of :before and :after element, but triangles are indeed a great example. Thanks! :)