Social links profile implementing `:focus-visible` Pseudo-Class

Solution retrospective
I tried to not use "Rem Font Size Hack". But instead using calc()
function to set the sizes in rem
. I will use this and maybe other rem methods as well in the future challenges.
I'm implementing :focus-visible
pseudo-class selector on the social links, so it won't show the focus ring when being clicked/tapped.
- I solved the issue of card shrinks when using
max-width
inside flex, by usingwidth
andmin()
function..card{ width: min(calc(327rem / 16), calc(100vw - (24px))); /* max-width: 327px */ }
- I was unsure whether or not to use
<nav>
to wrap the links on this challenge. After confimed by a discord member, I removed thenav
element.
- What methods do you usually use to write
rem
? On this challenge I usecalc()
function. - To solve the problem of card shrinks when using
max-width
inside a flex, I usewidth
andmin()
function:
Do you know any other solutions?.card{ width: min(calc(327rem / 16), calc(100vw - (24px))); /* max-width: 327px */ }
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@KonradJam
For converting
px
torem
I'm using this extension px to rem & rpx & vw (cssrem) in the Visual Studio Code.
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