Latest solutions
Mobile first solution using React JS and styled-components
#react#styled-components#vite#accessibilitySubmitted almost 2 years ago
Latest comments
- @Yeison2017Submitted about 2 years ago@astr0n0merPosted about 2 years ago
Hi @Yeison2017, you're off to a great start
Some corrections as you're using BEM
- The
<div>
withclass="cardQR__content"
is a block and should have its own name, maybe "content" - And then the children will be
"content__title"
and"content__info"
You can consider these resources for expanding your knowledge on BEM:
Good luck. Happy coding 😁😀
Marked as helpful0 - The
- @n-uzumakiSubmitted about 2 years ago@astr0n0merPosted about 2 years ago
Hey @n-uzumaki, you're off to a great start
HTML:
- You can replace the
<h5>
with an<h1>
for better accessibility - Do the styling in CSS
CSS:
- You can explore CSS naming conventions, namely BEM. This will make your code more readable for yourself and for others. Don't get me wrong, your code is readable even now, but BEM or any other convention for that matter, will definitely be helpful
Happy coding. Good luck 😁😀
Marked as helpful0 - You can replace the
- @tetinhxuanSubmitted about 2 years ago@astr0n0merPosted about 2 years ago
Hi @tetinhxuan, that's a fantastic solution
Just a small suggestion, you can set the witdh of your
<main>
element aswidth: min(90%, 600px);
. Reference tomin()
This way, it will get you rid of the media query and will provide more responsiveness to your page
Happy coding 😁😀
Marked as helpful0 - @LeraciusSubmitted about 2 years ago@astr0n0merPosted about 2 years ago
Hello @Leracius, nice work on your solution.
Here are some areas that you might want to improve upon
HTML:
- While it would make sense wrapping the component in a
<section>
in a bigger project, but for this challenge, you can replace the<section>
tag with<main>
tag
CSS:
- Rather than using
width
directly, you can set#container
'swidth:min(95%, 570px);
. This way, it will always be 95% of the parent's width, and will take 570px as the maximum width. - In general, try to avoid giving width to block level elements
- This course by Kevin Powell would be helpful in clearing out some responsive layout problems
Well done, it's a great solution 😁😀
Marked as helpful0 - While it would make sense wrapping the component in a