Design comparison
Solution retrospective
img:not(p *) {
display: block;
max-inline-size: 100%;
}
I think this is a smarter way to reset img
. The best part is that you can wrap it in a @layer
, so it doesn't matter if the specificity is higher.
I had a little problem with the illustration asset being a pixel higher than it should have been. After some research, I discovered that is a known bug in Figma when exporting an image from a non-integer coordinate.
What specific areas of your project would you like help with?I'm mostly insecure about the readability, so I would appreciate if you have any questions about the code, such as "why did you do this and not that?" or if you can point out any part that seems confusing or unnecessarily complex.
Useful Resources
- CSS Scope by Miriam Suzanne
- Inclusive Components / Cards / #The pseudo-content trick by Heydon Pickering
Community feedback
- @vanshraheja75Posted 4 months ago
Can you please explain why that method of reseting the image is more smarter
0@lucarlePosted 4 months ago@vanshraheja75 Typically, elements inside a
<p>
are inline.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