Design comparison
Solution retrospective
Again I got valuable feedback and tips π₯° and changed my code. The buttons are now anchors with class button. Added box-sizing:border-box. Made html more readable. And added hover- and focus-styles. ...
I am really looking forward to the next project!
Happy coding! π€©
Community feedback
- @grace-snowPosted over 3 years ago
This looks great!
I would use a transparent border on those buttons so the size doesn't increase when clicked/hovered.
Also consider adding a transition to the buttons and clear focus-visible styles βΊ
Marked as helpful1@grace-snowPosted over 3 years agoLooking at the html, I recommend
- changing the font links in the head to links not imports, and doing all fonts in one link. Google fonts gives you the links you need, including a preconnect one.
- fixing the formatting/indentation on html. That will become so important as you progress. It's hard to read at the moment because of elements starting and ending on the same lines in some places.
- changing all the buttons to anchor tags. 'learn more' implies it's taking you somewhere - navigation. So we have to use the element for navigation.
I hope that all makes sense
0@grace-snowPosted over 3 years agoIn css, I would
- definitely change font size to rem (never px)
- maybe use reusable classes on the buttons
- use mix-blend-mode screen on all buttons to create a cutout text effect to make them the color of their background instead. Then you could have the same hover effect for all too if you wanted, using something like opacity or just changing the background color.
- maybe start the desktop styles earlier
0@ellienndeaPosted over 3 years ago@grace-snow Thank you for your many tips! π₯° Again so much to learn for meπ What do you mean by "clear focus-visible styles"? The style guide said font-size: 15px. Would you recommend to change it to rem? Maybe 1rem because it equals 16px? Or 0.9rem? I will google mix-blend-mode screen and reusable classes π Thank you! π€©
0@grace-snowPosted over 3 years ago@ellienndea yes always convert px to rem, especially with font sizes. You work it out by doing desired-font-size/16, so in this case it would be 0.9375rem.
If you use scss you have have a reusable function that takes in pixels and returns rem to the css, that's quite handy.
By clear focus-visible styles, I mean make it really obvious to keyboard users where focus is as you tab around the page. You can do this with
:focus
but that affects all focus, including clicks on buttons and inputs etc. There is a new css property that's worth implementing now called:focus-visible
which allows you to styles the focus with keyboard differently, making it really obvious. Eg you might havea:focus-visible { outline: solid 0.25rem orange; outline-offset: 0.25rem; }
(or similar effect using box-shadow for curved buttons)
0@ellienndeaPosted over 3 years ago@grace-snow Thank you for the explanation and the tips! I changed it. π
0 - @tedikoPosted over 3 years ago
Hello, Ellienndea! π
Congrats on finishing another challenge! π Your solution looks very good and also responds well. Here's my few tips:
- To make your solution a bit more responsive set a
max-width
on.card
to 550px for example and alsobox-sizing: border-box
. What border-box does is that your padding get pushed in your container and don't affect width of that container. Doing it that way your container will be stretching untill it achieve 550px width. I would suggest you to read about boxmodel. Everything in CSS has a box around it, and understanding these boxes is key to being able to create layouts with CSS, or to align items with other items.
Good luck with that, have fun coding! πͺ
Marked as helpful0@ellienndeaPosted over 3 years ago@tediko Thank you so much for the tips and the explanation! π
0 - To make your solution a bit more responsive set a
- @palgrammingPosted over 3 years ago
Looks like you are making great progress just need to work on the hover state on the buttons and you will have a very successful challenge completed
0@ellienndeaPosted over 3 years ago@palgramming Thank you! I totally forgot the hover state π²π¬.
0@palgrammingPosted over 3 years ago@ellienndea no problem so many things to watch for on these projects
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