Miron on Nostr: #css people. I'm using CSS variables and I'm running into an issue. I assign CSS ...
#css people. I'm using CSS variables and I'm running into an issue.
I assign CSS variables on :root like this:
--fontSize1xFixed: 16px
--fontSize1xFluid: clamp(...)
--tabsFontSize: var(--fontSize1xFluid)
later on I add this class on a parent:
.fixedSize {
--fontSize1xFluid: var(--fontSize1xFixed)
}
I expected --tabsFontSize to be 16px, but it's still clamp(...)
Anyone know why this is?
#askfedi
Published at
2024-06-01 15:16:38Event JSON
{
"id": "ee8e509bd122019e5bd60f6d64dd26eabbb82ae82c911f911ea6354fe558b4e3",
"pubkey": "ddc2933687c101530955fe093fbfe173ccde742c1da04ea87c2919dbb7f91b4e",
"created_at": 1717254998,
"kind": 1,
"tags": [
[
"t",
"css"
],
[
"t",
"askfedi"
],
[
"proxy",
"https://fosstodon.org/users/hmiron/statuses/112542023551846487",
"activitypub"
]
],
"content": "#css people. I'm using CSS variables and I'm running into an issue.\n\nI assign CSS variables on :root like this:\n\n--fontSize1xFixed: 16px\n--fontSize1xFluid: clamp(...)\n--tabsFontSize: var(--fontSize1xFluid)\n\nlater on I add this class on a parent:\n\n.fixedSize {\n --fontSize1xFluid: var(--fontSize1xFixed)\n}\n\nI expected --tabsFontSize to be 16px, but it's still clamp(...)\n\nAnyone know why this is?\n\n#askfedi",
"sig": "b7c1342323d5aa32129cfec1199e80523d3ae7f0cf64c330937f59f149830b9f39529ccf97b2418d776689fdaaf795892d7cf68ae56996c7b9935dee488d836d"
}