Combining currentcolor with relative color syntax
#CSS
https://fullystacked.net/currentcolor-with-relative-color-syntax/
code:css
.btn-warn {
background-color: transparent;
color: red;
&:hover {
background-color: oklch(from currentcolor l c h / 10%);
}
&:active {
background-color: oklch(from currentcolor l c h / 15%);
}
}
こんな感じで、currentColorを元に計算で関連する色を決めていくといいよ、という話。
いつか試したいのでブックマーク。