I use pseudo elements all the time! Like others have said, if I’m creating something that is only for design & not actual content, I try to use pseudo elements.
One of my favorite ways to use them is when I have an element inside of content that has a full width background, but I need the content inside of that element to be the same width as the rest of the content. Rather than using a bunch of wrapper classes, you can use pseudo elements to render the different background color that extends the full width of the screen.
Ooooooh, interesting idea! I'd never thought about that.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.