Design comparison
Solution retrospective
I don't found hover color in the colors provided in style-guide.Do i need to use color from outside?
Please guide me.
Thank You.
Community feedback
- @isprutfromuaPosted over 2 years ago
Hi there. You did a good job 😎
keep improving your programming skills🛠️
your solution looks great, however, if you want to improve it, you can follow these recommendation:
**HTML**
✅ Use HTML5 semantic elements. Make sure correct use of the HTML5 semantic elements like: header, footer, main, nav, article, section. It’s will help you to write more structured piece of code.
✅ Avoid complex wrapping. For better performance please tried to avoid unnecessary wrapping. It will create unnecessary node in your HTML tree and reduce performance too.
<div class="plan-img-container"> <img src="images/icon-music.svg" alt="icon music" class="plan-img" /> </div> <div class="plan-div"> <p class="Annual-Plan">Annual Plan</p> <p class="price">$59.99/year</p> </div>
✅ Write Code Comments. It’s best practice to write human-readable code. Tried to comment your block of code. It will help you or any other developer to refactor the piece of code blocks.
**CSS**
✅ Use a CSS reset . By default, browsers don’t apply the same default styling to HTML elements, a CSS reset will ensure that all element have no particular style. For example: css-reset
✅ Write consistent CSS. At the beginning part of the project you can set some rules for maintain throughout to your entire stylesheet. If you follow the convention or BEM, you’ll be able to write CSS without being afraid of side effects.
You can combine all these rules: body { font-family: "Red Hat Display", sans-serif; font-weight: 500; } body p { font-size: 1.6rem; } body { background-color: #f5f7ff; background-repeat: no-repeat; background-image: url("../images/pattern-background-desktop.svg"); }
different naming style: .Annual-Plan { font-weight: 900; } .plan-box2 { color: #3829e0; font-weight: 700; font-size: 1.2rem; }
✅ Use mobile first development approach. A mobile-first approach to styling means that styles are applied first to mobile devices.
@media screen and (max-width: 450px) { html { font-size: 50%; background-image: url("../images/pattern-background-mobile.svg"); } }
✅ Use CSS Variables . Making the code flexible is equally important so that refactoring won’t be a problem for you. One of the best ways to achieve this is variables.
I hope my feedback will be helpful. You can mark it as useful if so 👍 it is not difficult for you, but I understand that my efforts have been appreciated
Good luck and fun coding 🤝⌨️
Marked as helpful0
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