Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Job listings with filtering built with Next

accessibility, next, typescript, tailwind-css
Jenny Eikens•250
@Jenny-Eikens
A solution to the Job listings with filtering challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am most proud of the filtering functions I wrote for this project, as this is an essential functionality that I assume will be needed often working on real websites.

What challenges did you encounter, and how did you overcome them?

When I was scaling the company logos down for mobile screens, I ran into the issue that the images seemed to longer be left-aligned, i.e. they seemed to have some margin or padding on the left that I couldn't figure out how to get rid of. I learned that this happened because scaling always happens from the center, so the image will shift visually. I learned to prevent this by applying the CSS transform-origin property (in my case, transform-origin: left).

I also, for some reason, wasn't able to color in the free spaces of the mobile background svg. To solve this, I eventually resorted to adding a <rect> element to the svg to overlay it and thus fill in the previously white spaces.

What specific areas of your project would you like help with?

There is one thing I wasn't able to figure out: on mobile screens, when adding filters, they get squished once they wrap onto a new line. I worked around this by giving them a min-height, but I feel that there has to be a better solution. I don't understand why this behavior happens, the container can grow in height to accommodate for new lines as I didn't limit its height anywhere. So if anyone has an explanation for this, I'm all ears!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    markus•2,800
    @markuslewin
    Posted 6 months ago

    How would the browser know you want the filters to be 40px, though? 🤔

    When the filters are on one line, the Clear button is the tallest child of the .skills container. The default behavior of flex is to stretch the flex items to fill the container. In this case, it stretches the filters until they're the same height as the button. When the filters wrap, the filters container is larger than the Clear button, and so the items no longer need to stretch to fill the .skills container. (Now the Clear button is stretched instead, to fill the space created by the filters).

    I think min-height sounds like a good solution! You could also use padding to set an "implicit" minimum height, like you did for the Clear button.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub