fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Link: ms-Link font-family should "inherit" rather than define any font details.

Open dzearing opened this issue 10 years ago • 6 comments

dzearing avatar Nov 07 '16 23:11 dzearing

Right now all of the components apply the ms-baseFont() mixin, defined here in Fabric Core. The problem is that these aren't localized, so changing an app's language will only affect classes like ms-font-m and not the components.

A solution is to only set the font-family on the root ms-Fabric wrapper class, and then inherit into all of the other type and component classes. This will provide a single selector we can override to adjust the font stack for localized content.

See the related issue in Fabric Core.

mikewheaton avatar Nov 07 '16 23:11 mikewheaton

The .ms-Fabric class already does add the definition. DetailsList relies on this, for example, so if you don't wrap it in Fabric, then you get a Times New Roman styled list. But if you use a Link in a DetailsList, it will pick up the baseFont one. So ... if we just remove the Link's hardcoded font styling, it can behave consistently.

dzearing avatar Nov 08 '16 03:11 dzearing

Nice, I didn't realize that was implemented in the base ms-Fabric component. 😄 So we should remove baseFont() from all of the components, right?

mikewheaton avatar Nov 09 '16 18:11 mikewheaton

@mikewheaton Is this still an issue? Or can I close this?

micahgodbolt avatar Mar 20 '17 21:03 micahgodbolt

I'm removing the baseFont() mixin from all of the components as part of the update to Fabric Core 6.0. Here's the PR: #1290

mikewheaton avatar Mar 20 '17 21:03 mikewheaton

Issue is closed. Updating the status.

gitjain avatar Mar 21 '17 18:03 gitjain