Error evaluating function `rgba`: color functions take numbers as parameters
示例代码:
.box-1 { 50px; height: 50px; margin-bottom: 30px; background: rgba(@primaryColor, 1); border: 5px solid skyblue; }
:roots {
--color-accent: 169,57,255;
}
button:hover {
background-color: rgba(var(--color-accent), 0.2);
color: rgb(var(--color-accent));
}
修改之后:
.box-1 { 50px; height: 50px; margin-bottom: 30px; background: ~"rgba(@primaryColor, 1)"; border: 5px solid skyblue; }
:roots {
--color-accent: 169,57,255;
}
button:hover {
background-color: ~"rgba(var(--color-accent), 0.2)";
color: ~"rgb(var(--color-accent))";
}