4 Card feature section - HTML, SCSS, Grid, @keyframes & mobile-first!
Design comparison
Solution retrospective
Hi everyone π
Well well well ... mobile-first!
I think this is a turning point for me, i finally embraced the dark-side. And what can i say, it's liberating. My code feels cleaner, simpler and more legible. It might be due to the design but i'm definitely converted π
I took the time at the start of the project to really understand how to work with min-width
instead of max-width
and it paid off. I also got a bit unnecessarily carried away with @keyframe animations at the end and changing them up per breakpoint π
Anyway, your feedback would be greatly appreciated!
Happy coding π€
Community feedback
- @TiasstiassPosted about 3 years ago
Good job! π
Tested it on Safari iOS, looks neat! Few feedbacks:
- Regarding the colored top border:
You could make it a div or the best solution I think, is to use a
::before
pseudo element, - Setting fixed heights is not considered good practice, the content should define the height of an element, be it the padding etc..,
- Any reason behind the
font-size: 50%
, 62.5% makes sense but why 50%? - @import is being depreciated and Sass team is discouraging us to use it, look into @use and @forward,
- You are using scss syntax not sass, consider renaming your folder.
Excellent job overall, keep up the good work πͺ
Marked as helpful1@darryncodesPosted about 3 years agoHi @Tiasstiass thanks for taking time to feedback, I really appreciate it!
Here are my responses:
- why would a div or pseudo element be a better solution to
border-top
? - thanks for the reminder with using height, something i'm aware of and i'm kinda okay with it in this project
- regarding
font-size: 50%
this is something i've picked up in a tutorial, i'm not sure if it's best practice but i find it is a massive help when using REM for responsive design (the rationale - font-size: 50%; // 1rem = 8px for small devices, font-size: 56.25%; // 1rem = 9px for medium devices and font-size: 62.5%; // 1rem = 10px for larger devices) - really great feedback regarding @import being deprecated, i've updated my repo. I'm going to make sure i use @use going forward. It took me a little while to work out this was a helpful article
- i've updated the folder too, i didn't appreciate the difference between scss and sass syntax another solid bit of feedback
Thanks again, all the best π€
0@TiasstiassPosted about 3 years ago@darryncodes Thanks for appreciating the feedback and taking the time to reply as well,
- It wouldn't if it wasn't for the border-radius, you top-border is a little bit 'rounded' on the edges because of that.
- No big deal, we all let go off some of the best practices sometimes π
- I see, a nice way to have less media queries to deal with then, good idea!
- Glad you found it useful, make sure to use dart-sass as they're considered the official 'repo' and get all the updates first.
I really appreciated your work btw, have you started with Js or any frameworks yet? I am just about to submit a solution as well, let me know what you think about it, if you have time π
0@darryncodesPosted about 3 years agoHi @Tiasstiass apologies for the late reply, it's been a busy month!
- ah i see your point about the 'rounded' edges, good call
- thanks for the heads up regarding dart-sass
I'm taking tentative baby steps with JS right now, i'm keen to get somewhat proficient by the end of the year! If you can recommend any useful challenges / resources / courses / top tips that'll help me learn i'd really appreciate that!
I'll check out your solution, take it easy π€
0 - Regarding the colored top border:
You could make it a div or the best solution I think, is to use a
- @arkharman12Posted about 3 years ago
Looks good! But why not import the
<svg>
s in<img>
tags? Instead of putting them in the markup and then linking them.0@darryncodesPosted about 3 years agoThanks @arkharman12. Interesting observation. From what I know in-line svgs create fewer http requests speeding up page load times, you can animate them, control the styles in the image for example adding hover affects, theyβre scalable so you donβt need multiple files for different breakpoints and they donβt lose clarity.
0@arkharman12Posted about 3 years ago@darryncodes Of course! But in a small project like this one where loading times and performance is not an issue and we are not doing any complex interactivity I would prefer using the
<img>
tag. This way markup file looks much cleaner and easy to scan in my opinion!0 - @darryncodesPosted about 3 years ago
Thanks for the nudge in the right direction @mattstuddert π
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