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": "b21d026a383e66fe531cf9a904b6575ebdb5921c6e7c383832bf5b744bb95e63",
"pubkey": "deb27057e60b8d796302849309a7c542aa1c718108be4813086deaf9139dff76",
"created_at": 1716311300,
"kind": 1,
"tags": [
[
"t",
"css"
],
[
"proxy",
"https://front-end.social/users/leaverou/statuses/112480177356677299",
"activitypub"
]
],
"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": "e869184ac6a121337de75ca9151b3b51bed409278a5be9e4e93fb3eb6cabf7e8aa27d0389620fc987094232b45ceeb3394d0b14f0ecd8f5c472ef8fc21d5b2f3"
}