Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Equalizer landing page

accessibility, parcel, tailwind-css
P
Radek Tomasek•160
@radektomasek
A solution to the Equalizer landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello 👋,

I am submitting my third challenge. Still from the newbie category on the one hand (as I try to polish the core principles of TailwindCSS), but it was a lot of fun on the other one.

Here is a bit of the breakdown. (More detailed explanation is available in the RespositoryURL).

What did you find difficult while building the project?

Initially, the most challenging part was managing specific position styles for the background images. It's not an issue in vanilla CSS; however, TailwindCSS applies many contains that didn't work by default for my requirements.

I could override these default utility classes for image background positions; however, I felt it would be overkill. Fortunately, I learned about a specific construct allowing it to be more precise whilst keeping the default constraints in place. Things like:

bg-[POSITION1_VALUE1_UNIT1_POSITION2_VALUE2_UNIT2]

e.g

bg-[right_-15rem_top_-14rem]

And learning this helped me to complete this project.

Which areas of your code are you unsure of?

Using Tailwind allows me to make the styles more compact. However, FrontendMentor designs always have a lot of tweaks in the original template.

It makes sense to update the configuration and override some values, but it could be counterproductive in most cases.

Therefore in quite a few places, I am using arbitrary values, like:

lg:w-[21rem]

The problem is that it becomes pretty repetitive after a while, and I feel it could be a problem if I decide to update these values.

Do you have any questions about best practices?

Given the repetitive arbitrary values, I will use more CSS variables for the repeating values, combining them with Tailwind new/altered/overridden utility values in tailwind.config.js.

I had worked with CSS variables before, but I had never done it in Tailwind. Is there any best practise related to this?

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Radek Tomasek's solution.

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
  • Use cases

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