Basic use
example.css
@function --transparent(--color, --alpha) {
result: oklch(from var(--color) l c h / var(--alpha));
}
The @function at-rule declares a custom CSS function with parameters and a result descriptor you can call like --name(args).
@function --transparent(--color, --alpha) {
result: oklch(from var(--color) l c h / var(--alpha));
}@function --transparent(--color, --alpha) {
result: oklch(from var(--color) l c h / var(--alpha));
}@function --transparent(--color, --alpha) {
result: oklch(from var(--color) l c h / var(--alpha));
}Keep learning CSS.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
2 people found this page helpful