nuxt-themes/typography

Update tokens structure

bdrtsky opened this issue · 3 comments

Current tokens structure have few limitations. For example links (and all other elements using typography.color) are not automatically inheriting color from app. There's few questions I like to discuss

  1. Simplest thing could be done is moving tokens from typography.color to color, so app colors applying without any user action. But there's a chance that user might want to have separate colors for his typography. For example, we has blue as his color.primary but he wants lightblue palette to be applied on typography.
  2. What about purely typography tokens, like typography.fontSize, typography.letterSpacing, typography.fontWeight, typography.lead? Currently they also scoped to typography. Which means that if user installs Typography, possibly could have 2 separate typography tokens, because he could have fontSize, letterSpacing, fontWeight, lead already. Does it make sense to enforce Typography tokens if user decide to install package?
  3. I would rename lead to lineHeight

I've started PR here, but then those questions appeared - #19

What you think @Tahul @atinux

One solution would be to inherit typography.color.primary from color.primary so the user can customise the typography color if needed.

What do you think @bdrtsky ?

Great suggestion, I've pushed it 863c5da