File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2424 - take Markdown rendering into account before testing the maximum preview length
2525- ` <NodeContent /> `
2626 - header-menu items are vertically centered now
27+ ` <TabTitle /> `
28+ - adjust displaying fallback symbols in different browsers
2729
2830### Changed
2931
Original file line number Diff line number Diff line change 11import React from "react" ;
22import { Meta , StoryFn } from "@storybook/react" ;
33
4- import { Tabs , TabTitle as TabTitleOrg } from "./../../../" ;
4+ import { Tabs , TabTitle as TabTitleOrg , TabTitleProps } from "./../../../" ;
55
66export default {
77 title : "Components/Tabs/TabTitle" ,
88 component : TabTitleOrg ,
99 argTypes : { } ,
1010} as Meta < typeof TabTitleOrg > ;
1111
12- const TabTitle = ( args ) => {
12+ const TabTitle = ( args : React . JSX . IntrinsicAttributes & TabTitleProps ) => {
1313 return (
1414 < Tabs
1515 id = "titledemo"
@@ -31,3 +31,8 @@ TabTitleElement.args = {
3131 titlePrefix : "[" ,
3232 titleSuffix : < span > ]</ span > ,
3333} ;
34+
35+ export const TabTitleSymbolElement = TemplateFull . bind ( { } ) ;
36+ TabTitleSymbolElement . args = {
37+ text : "★" ,
38+ } ;
Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ $tab-indicator-width: 3px !default;
4646 overflow-x : hidden ;
4747 text-overflow : ellipsis ;
4848 white-space : nowrap ;
49+ // Tab titles are user-configured and may contain Unicode symbols (e.g. "★") that fall outside
50+ // the primary font stack. Browsers pick different system fallback fonts for such characters,
51+ // causing glyphs to render at different optical sizes (smaller in Firefox).
52+ // font-size-adjust normalises the fallback font size by matching the primary font's x-height,
53+ // reducing the visual size discrepancy across browsers.
54+ font-size-adjust : from- font;
4955
5056 // min-width: 6em;
5157 }
You can’t perform that action at this time.
0 commit comments