brandocms / europacss

A design system for responsive websites
MIT License
0 stars 0 forks source link

Write a @fontsize handler for vw units #87

Closed tmjoen closed 2 years ago

tmjoen commented 2 years ago

If we have a config key

sm: {
  font-size: '1vw',
  line-height: '0.1vw'
}

we should convert this to the same syntax as between(x-y) uses.

This is to not lose browser zoom compatibility

The smallest breakpoint is fine, we'll just fallback to a px size in the config key -- but how to solve the largest size. For instance if desktop_xl is 1920, we should be able to scale to infinity. Maybe just fallback to the actual vw size provided for the largest key?