fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Different font sizes between fabric theme and design resource

Open jacksonv1lle opened this issue 6 years ago • 4 comments

When building and styling a custom fabric react component, I am utilizing the theme.fonts object within the styles file. By default this object shows definitions for various font sizes, eg. small, medium, large, xLarge etc. By default, I understand these font sizes start as follows: 10, 11, 12, 13, 14, 15, 17...

The components that I am building are initially designed by my colleague using Sketch. My problem is that he is referring to the Sketch Design Resource here which lists a different set of font sizes (10, 12, 14, 16, 18). So when it comes to building the component, I have a problem because there is no font slot with a size of 16 or 18 by default. I don't want to manually specify the font size and I also don't want to change the theme.fonts definition.

Is it possible to update this design resource to include the additional font sizes used by the theme.fonts object?

jacksonv1lle avatar Jan 22 '20 13:01 jacksonv1lle

Hi @jacksonv1lle, from my understanding the default definition for our fonts in the theme we provide derives from our design system. I think changing the theme.fonts definition would be the best way to tackle your problem, since what you want is to customize our library to your own needs instead of using our default font definition.

That said, @betrue-final-final, do you think what I said above is correct or is there a use case for us to expand our font sizes beyond the ones we already have?

khmakoto avatar Jan 22 '20 18:01 khmakoto

Hi @khmakoto. I would prefer to keep my theme.fonts default as it is the intended configuration of fabric. Any components that we design and build should match the default style.

I would like to instruct my colleague to use the theme.fonts configuration but it would be nice to have these styles matched in the Sketch design resource file also. That way he knows what font sizes are available in the theme object.

jacksonv1lle avatar Jan 22 '20 21:01 jacksonv1lle

I understand your concern @jacksonv1lle. Let's wait for what @betrue-final-final has to say about this and we can look into how to move forward.

khmakoto avatar Jan 22 '20 22:01 khmakoto

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot avatar Apr 26 '21 12:04 msft-fluent-ui-bot