I'm trying to define a CSS @property rule for a font-size with a rem-based initial value.
https://developer.mozilla.org/en-US/docs/Web/CSS/@property
It works as long as no syntax is defined:
@property --font-size {
syntax: '*';
initial-value: 2rem;
}
But when setting the length syntax, which includes rem units based on the docs, it's ignored by browser:
@property --font-size {
syntax: '<length>';
initial-value: 2rem;
}
Example: https://stackblitz.com/edit/stackblitz-starters-axmosbgb?file=styles.css