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 landing page, vanilla JS

P
Alex 1,990

@AlexKMarshall

Desktop design screenshot for the Base Apparel coming soon page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I built this with mobile design first using CSS grid, and I'm fairly happy. But it needed a lot of CSS to get it done, and it doesn't feel very organised.

Do people have better suggestions on how best to organise the CSS? I've used variables where possible, but it's still quite a jumble of layout properties, colours, animations etc, and I'm sure on a real site, that would get unmanageable very quickly.

Community feedback

Gerben Dol 3,115

@GerbenDol

Posted

I always struggle with keeping my CSS organized. Things that help me are working from less specific to more specific CSS and also adding these kind of headers as a comment in my CSS to split it up in sections.

Check out my code for an example! https://www.frontendmentor.io/solutions/coming-soon-page-first-time-using-grid-J1aeXMT9R

3

@jakobsen

Posted

In addiction to the comment by Gerben, I would also suggest you take a look at stylesheet languages like Sass, Less or Stylus. The allow you to use nesting in your CSS (in addition to a lot of other cool features), and this really helps (me at least) with keeping your CSS tidy :)

2
P
Alex 1,990

@AlexKMarshall

Posted

Thank you both, that's very helpful, I'll give that a try on the next challenge.

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