1,596 views · 10 active
A cartoon skull with a hotpink hat on.
atom@argyleink
notecss

Would use:
CSS relative alpha.

button {
  border-color: alpha(from hotpink / calc(alpha * .25));
}

10 comments #

61likes
7reposts

Join the conversation on

Would use: #CSS relative alpha `color: alpha(from black / 50%)` https://t.co/k1DHK8sQ1z
Adam ArgyleAdam Argyle
@argyleink Idk why but I can’t seem to open the csswg link. Just me ?? Looks interesting but why isn’t this the same as color-mix with transparent
Ryan KuruppuRyan Kuruppu
@raiiii_kun @argyleink Could you give an example?
一丝一丝
@yisibl @argyleink color-mix(in srgb, #000, transparent 80%) this I would assume give a similar or same result ?
Ryan KuruppuRyan Kuruppu
@raiiii_kun @argyleink `alpha(from #000 / 80%)` is equivalent to `color-mix(in sRGB, #000 80%, transparent)` You can try it in Chrome Canary.
一丝一丝
@yisibl @argyleink Right. So basically it’s syntax sugar for that ? If so, cool. I assume it auto detects the color space based on what we pass as the color ?
Ryan KuruppuRyan Kuruppu
@raiiii_kun @argyleink Yeah
一丝一丝
@raiiii_kun @argyleink https://t.co/nvz9LfkXA9
一丝一丝
@yisibl @argyleink Love this. Thanks @yisibl. Appreciate it✨
Ryan KuruppuRyan Kuruppu
@yisibl @raiiii_kun mmm sugar
Adam ArgyleAdam Argyle