Design comparison
SolutionDesign
Community feedback
- @MaanAlHababiPosted 4 months ago
Hey there!
In your code, you "hardcoded" some styling that could be applied in different situations in a real-world project. Specifically, I'm pointing out the 'PERFUME' text.
<p>P E R F U M E</p>
You explicitly made the text uppercase, and added spaces between the characters. It's an important skill in front-end development to be flexible with the styling. In a real-world situation you might have different categories:
- Perfume
- Accessory
- Hat etc..
This approach would end up awkward for the user and the developer. My personal approach was to use the
text-transform: uppercase
property for this element. So, the case of the text in the code does not matter since at the end, the CSS will transform the text to uppercase. Secondly, you can use theletter-spacing: *value*
property, which establishes this effect for you and gives you more control over the degree of spacing in the text.
This way, you can also improve readability of the code.
<p class="product">perfume</p>
Marked as helpful1@JoelJohsPosted 4 months ago@MaanAlHababi Thank you very much, I just modified and uploaded the changes following your advice
0
Please log in to post a comment
Log in with GitHubJoin 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