Lea Verou on Nostr: Emulate #CSS math functions that are not baseline yet with CSS math functions that ...
Emulate #CSS math functions that are not baseline yet with CSS math functions that are:
1. abs(var(--x)) =
max(var(--x), -1 * var(--x))
2. sign(var(--x)) =
clamp(-1, var(--x) * infinity, 1)
(caveat: will return NaN instead of 0 for 0)
Published at
2024-05-21 17:08:20Event JSON
{
"id": "7fc478730402ec374780233c61cdd599b8f64ccdadbc9f846da207c61cc22e1c",
"pubkey": "effca4793b2710c9d391f2af243fc7228b446437e13c605b2ee931d03319336f",
"created_at": 1716311300,
"kind": 1,
"tags": [
[
"proxy",
"https://front-end.social/@leaverou/112480177356677299",
"web"
],
[
"t",
"css"
],
[
"proxy",
"https://front-end.social/users/leaverou/statuses/112480177356677299",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://front-end.social/users/leaverou/statuses/112480177356677299",
"pink.momostr"
]
],
"content": "Emulate #CSS math functions that are not baseline yet with CSS math functions that are:\n\n1. abs(var(--x)) =\nmax(var(--x), -1 * var(--x))\n\n2. sign(var(--x)) =\nclamp(-1, var(--x) * infinity, 1)\n\n(caveat: will return NaN instead of 0 for 0)",
"sig": "c85d043778ff59f885cd5315a330458cad535b66feed66203f6d7fb23e7d71ff8c7747d6eafcb87a4d9b852fa06a04647cf4d9fdf1679babf3a753b88cb5f034"
}