The CSS color spec version 4 introduces this, support has hit Safari, Chrome and Firefox, so this looks like a feature that's here to stay. https://drafts.csswg.org/css-color/#hex-notation
74 lines
532 B
CSS
74 lines
532 B
CSS
@define-color mygreen rgb(0,1,0);
|
|
|
|
a {
|
|
color: initial;
|
|
}
|
|
|
|
b {
|
|
color: inherit;
|
|
}
|
|
|
|
c {
|
|
color: unset;
|
|
}
|
|
|
|
d {
|
|
color: currentColor;
|
|
}
|
|
|
|
e {
|
|
color: transparent;
|
|
}
|
|
|
|
f {
|
|
color: red;
|
|
}
|
|
|
|
g {
|
|
color: rgba(0,1,0,1);
|
|
}
|
|
|
|
h {
|
|
color: rgb(1,0,1);
|
|
}
|
|
|
|
i {
|
|
color: #abc;
|
|
}
|
|
|
|
j {
|
|
color: #0123;
|
|
}
|
|
|
|
k {
|
|
color: #012345;
|
|
}
|
|
|
|
l {
|
|
color: #FFEEDDCC;
|
|
}
|
|
|
|
m {
|
|
color: lighter(red);
|
|
}
|
|
|
|
n {
|
|
color: darker(red);
|
|
}
|
|
|
|
o {
|
|
color: shade(green,0.5);
|
|
}
|
|
|
|
p {
|
|
color: alpha(green,0.5);
|
|
}
|
|
|
|
q {
|
|
color: mix(red,blue,0.25);
|
|
}
|
|
|
|
r {
|
|
color: @mygreen;
|
|
}
|