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

QR CODE component using tailwind css

Baruti Baruaniโ€ข 90

@Baruti-1

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


  • It was a little challenge to add google fonts in tailwind css

Community feedback

Alberto Ledesmaโ€ข 370

@ledesmx

Posted

Hi Baruti Baruani ๐Ÿ‘‹

Great job on your solution!

Here are some recommendations for you:

  1. Use Semantics for the proper design of your code. I suggest to adding a <main></main> tag for your main content.
  2. There is a better approach to changing the background color in React. You can change the background color of the App component instead of the body tag inside the index.html file. In your App component's code add.
return(
   <main className="bg-primary-blue">
      {/*Your code here*/}
   </main>
);
  1. Use Flexbox to center your content. Now that all your content is surrounded by this main tag. You can easly center your content by adding flex min-h-[100vh] items-center

Code to remove:

/*Remove the class attribute in the body tag*/
class="bg-primary-blue">

Code to add:

const App = () => {
  return (
    <main className="flex min-h-[100vh] items-center bg-primary-blue">
     {/* Here your code */}
    </main>
  );
};
export default App;

Lastly, if you want to know other ways to import Google Fonts with Tailwind CSS check out this blog: https://dev.to/thomasvanholder/add-a-custom-tailwind-css-fonts-to-your-website-1nn6

I also recommend you to check the documentation: https://tailwindcss.com/docs/font-family

I hope this helps a little.

Well done for the rest.

Marked as helpful

0

Baruti Baruaniโ€ข 90

@Baruti-1

Posted

Thanks a lot for your useful feedback. I'm working on it.

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