@correlucas
Posted
👾Oi Bernardo , tudo bem? Parabéns pela sua nova solução!
Respondendo sua pergunta:
Herdar a cor de um elemento pai eu nao sei te responder, mas o jeito mais fácil de trabalhar com cores que se repetem é só usar variaveis no root
e reutilizar essa variavel toda vez que uma cor seja usada mais de uma vez.
👋 Espero que essas dicas te ajudem e que você continue no foco!
Marked as helpful
@BernardoHollmann
Posted
@correlucas Oi Lucas! Pois é, eu me deparei com uma situação neste último desafio e fiquei tentando achar uma melhor solução. Na parte do CSS eu tinha:
.card-1 button{ color: hsl(31, 77%, 52%); border: 3px solid hsl(31, 77%, 52%); }
e queria saber se teria alguma forma de herdar a cor do background da própria div section card-1, por exemplo. Desta forma, pouparia algumas linhas de código aplicando no elemento filho (button) a cor do texto e da borda.
@correlucas
Posted
@BernardoHollmann o melhor jeito seria criar uma class tipo btn
pra essas duas propriedades e aplicar em todos botoes
@correlucas
Posted
@BernardoHollmann o melhor jeito seria criar uma class tipo btn
pra essas duas propriedades e aplicar em todos botoes