Answer the question
In order to leave comments, you need to log in
How to correctly prescribe different color options for a button?
There is a button for which colors are described through modifiers:
&--yellow {
background-color: #fff324;
&:hover {
background-color: darken(#fff324,15%);
}
&:focus {
background-color: darken(#fff324,25%);
}
}
&--pink {
background-color: $pcolor;
color:#fff;
&:hover {
background-color: darken($pcolor,15%);
}
&:focus {
background-color: darken($pcolor,25%);
}
}
&--blue {
background-color: #1c2f69;
color:#fff;
&:hover {
background-color: darken(#1c2f69,3%);
}
&:focus {
background-color: darken(#1c2f69,10%);
}
}
Answer the question
In order to leave comments, you need to log in
You can map colors to variables like $dark: darken(#1c2f69,10%); And further to use in styles background-color: $dark;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question