Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

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

@OctaviOOkumu

Desktop design screenshot for the Ping single column coming soon page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

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.

Community feedback

@MOHAMMED-ABD-RAZAQ

Posted

great work bro .

0

@OctaviOOkumu

Posted

@MOHAMMED-ABD-RAZAQ Thanks

0
P
Matt Studdert 13,611

@mattstuddert

Posted

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!

0

P
Matt Studdert 13,611

@mattstuddert

Posted

@OctaviOOkumu ah OK, yeah you can't access them using JS. They're more for presentational uses in your CSS.

0

@OctaviOOkumu

Posted

@mattstuddert Thanks a lot. I was thinking more about accessing it using JavaScript,for instance, changing its content. So far I haven't gotten any solution to it, so I used a normal p/div tag instead of a pseudo-element

0

Please log in to post a comment

Log in with GitHub
Discord logo

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