Space Travel Project - Button hover state

Hi, I am working at the space travel project (building it in React and with Sass) I am just wondering for the 'Large button' hover state, can we just use: .main-cta { padding: 0 2em; transition: 0.3s ease; &:hover { outline: 2.5em solid hsl(var(--clr-white) / 0.15); } } instead of the ::after solution? It's just one line of code. Would there be any issues or drawbacks with this solution?
Thanks for any thoughts on this!
5 Replies
snxxwyy
snxxwyy17mo ago
that works perfectly fine too, i was told that there are a million different ways to do things in css so i'll say the same thing to you 😄, as long as the method doesn't use any bad practices then it's perfectly okay, there are obviously simpler ways to do things than others but if you like the more complex way or simpler way of making something there's nothing wrong with either.
Frida
FridaOP17mo ago
Thank you!
as long as the method doesn't use any bad practices
That's the key 😁 I don't think there is any bad practice, but wanted to get some other opinions on that too 🙂
snxxwyy
snxxwyy17mo ago
of course! yeah i don't see any bad practices there either, you've definitely found a simpler version 👍
Frida
FridaOP17mo ago
Thank you!
snxxwyy
snxxwyy17mo ago
of course!
Want results from more Discord servers?
Add your server