unoplatform / Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
https://platform.uno
Apache License 2.0
167 stars 28 forks source link

Investigate control-specific typography versus global overrides #1376

Open kazo0 opened 1 month ago

kazo0 commented 1 month ago

We'll need to discuss this further as we're kind of in an in-between state. The problem is what we think should happen if someone overrides something like BodySmallFontFize/Family/Weight. Should it be reflected in all controls or should you allow for more fine-grained control where you can override just the FontSize/Family/Weight scoped to a specific control. The way the staticresource aliasing works, we can't have both. I think we as well go for the global override route as that aligns with what is possible in Figma in terms of generating an app that overrides the semantic font resources at a global level and have it be reflected by all controls.

This would mean more breaking changes in the future though, since we would do away with things like CheckBoxFontFamily, FilledButtonFontSize, etc. and have them use BodyLargeFontFamily, TitleSmallFontSize directly.

cc: @carldebilly / @NVLudwig

_Originally posted by @kazo0 in https://github.com/unoplatform/Uno.Themes/pull/1375#discussion_r1548444484_