user3495807
user3495807

Reputation: 11

How is the following not a valid CSS property?

I'm getting an error in dev tools saying that the following is an invalid property. I've tested it in all major browsers, current versions;

font-size: clamp(1.71rem, calc(1.71rem + ((100vw - 1440px) * (6.08rem - 1.71rem) / (3680px))), 6.08rem);

The purpose of this clamp function is to scale a heading between 1440px resolutions, upwards to 5120px resolutions. It assumes a base font-size of 4.56rem at 3840px, and scales in a linear fashion according to increase or decrease contingent to the monitor's resolution.

Am I misunderstanding something here? It looks pretty straight forward;

Minimum Value (Min): 1.71rem

Preferred Value (Value): calc(1.71rem + ((100vw - 1440px) * (6.08rem - 1.71rem) / (3680px)))

Maximum Value (Max): 6.08rem`

Thank you for you assistance.

Kind regards.

Upvotes: 0

Views: 145

Answers (0)

Related Questions