Replying to fc654322...

#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

Avatar
zebra 1y ago

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

Reply to this note

Please Login to reply.

Discussion

No replies yet.