Mobile first site using Sass, CS Grid, HTML, JavaScript

Solution retrospective
I had a lot of fun with this. Question: Is there any way of changing a pseud-class (e.g "::after") via manipulating its attributes? So far I haven't found any.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MOHAMMED-ABD-RAZAQ
great work bro .
- @mattstuddert
Glad you enjoyed this challenge! You can add content to your pseudo-elements via HTML attributes like this:
HTML <div data-text="Hi"></div> CSS div::before { content: attr(data-text); }
Other than that, as soon as you have a
content
property on your pseudo-elements you can style them like any other element.I hope that helps!
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord