#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

Reply to this note

Please Login to reply.

Discussion

--tabsFontSize will be 16px only for .fixedSize and below.