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

Recipe page with tailwind-css

tailwind-css
Daniil Churikov•80
@ddosia
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

I really dislike how I did the Nutrition part. Ideally it's simple 2 column grid with lines in between, but it was difficult to achieve it. I though it has to be ul (since this is a list), but it doesn't play well with grid. Also it was difficult to align items to beginning of cells and add borders.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • xNyfPtx•1,260
    @xNyfPtx
    Posted 8 months ago

    Hi @ddosia, your code and solution looks good but it has some few issues. Don't worry though as these issues are very easy to fix and are quite common aswell.

    My Tips and Feedback

    1. Put the challenges in their own Github repositories instead of putting all of the in one Github repo. It will take longer to clone and and it might take longer aswell to commit and push in the long run.
    2. Consider self-hosting your fonts instead of linking to Google Fonts. Using Google Fonts is bad for performance and violates GDPR laws which is an issue on larger websites as it may lead to lawsuits. I use this handy tool for helping me self-host the fonts.
    3. Remove the "mY" prefix on the colors. I don't see the need for it and it just makes things more verbose.
    4. You can use global styles instead of setting a utility for each element since this project is mostly text-based. Like using @apply for the styling the headings and the paragraphs.
    5. Use a table for the Nutrition section. See more about it here
    6. Wrap the article tag inside a main tag. The main tag signifies the primary content.
    7. Use the hr tag for the borders on the end of each section.
    8. No need for the min-w-80 on the article tag. I don't see why you would need margins there and instead you should use padding on the parent element instead

    That's pretty much all. Have fun coding!

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
Frontend Mentor logo

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