Solution HTML CSS Responsive carte

Please log in to post a comment
Log in with GitHubCommunity feedback
- @FaridDanilo
Hello KKen007,
I indicate the parts that should be improved or changed in your HTML:
- Duplicate upload of Google Fonts:
This is not necessary and This may affect performance, so please only maintain one version.
Styles.css:
Improvements and fixes:
- You are repeating the "body" property twice:
body { /* 4. Add accessible line-height / line-height: 1.5; / 5. Improve text rendering */ -webkit-font-smoothing: antialiased; }
body { background-color: var(--Cream); padding: 2rem 1rem; color: var(--Grey); font-family: var(--ff-base); font-weight: var(--fw-base); height: 100vh; }
Although CSS allows multiple definitions of the same selector, it's best to unify everything into a single body declaration to avoid:
-
Unnecessary duplication.
-
Cognitive overhead.
-
Maintenance difficulty.
Unified Version:
body { /* Typography */ font-family: var(--ff-base); font-weight: var(--fw-base); color: var(--Grey); line-height: 1.5;
/* Rendering */ -webkit-font-smoothing: antialiased;
/* Background and dimensions */ background-color: var(--Cream); height: 100vh;
/* Spacing */ padding: 2rem 1rem; }
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