Design comparison
SolutionDesign
Solution retrospective
I'm still learning tailwindcss and I dont know if the implementation I did for the button is the best aproach.
index.css file:
@layer base {
.dice-button {
@apply absolute bg-primary-green flex justify-center items-center h-16 w-16 rounded-full -bottom-[11%] left-1/2 -translate-x-1/2 transition-all duration-300 hover:contrast-125 hover:drop-shadow-[0_0_10px_var(--neon-green)]
}
}
That dice-button class is only used in one button, and I put that code in the index.css to have less code inside my react component, is it correct doing that? or that should be done only if I'm going to reuse that class in other elements?
Community feedback
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