Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- take Markdown rendering into account before testing the maximum preview length
- `<NodeContent />`
- header-menu items are vertically centered now
`<TabTitle />`
- adjust displaying fallback symbols in different browsers

### Changed

Expand Down
9 changes: 7 additions & 2 deletions src/components/Tabs/stories/TabTitle.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react";
import { Meta, StoryFn } from "@storybook/react";

import { Tabs, TabTitle as TabTitleOrg } from "./../../../";
import { Tabs, TabTitle as TabTitleOrg, TabTitleProps } from "./../../../";

export default {
title: "Components/Tabs/TabTitle",
component: TabTitleOrg,
argTypes: {},
} as Meta<typeof TabTitleOrg>;

const TabTitle = (args) => {
const TabTitle = (args: React.JSX.IntrinsicAttributes & TabTitleProps) => {
return (
<Tabs
id="titledemo"
Expand All @@ -31,3 +31,8 @@ TabTitleElement.args = {
titlePrefix: "[",
titleSuffix: <span>]</span>,
};

export const TabTitleSymbolElement = TemplateFull.bind({});
TabTitleSymbolElement.args = {
text: "★",
};
6 changes: 6 additions & 0 deletions src/components/Tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ $tab-indicator-width: 3px !default;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// Tab titles are user-configured and may contain Unicode symbols (e.g. "★") that fall outside
// the primary font stack. Browsers pick different system fallback fonts for such characters,
// causing glyphs to render at different optical sizes (smaller in Firefox).
// font-size-adjust normalises the fallback font size by matching the primary font's x-height,
// reducing the visual size discrepancy across browsers.
font-size-adjust: from-font;

//min-width: 6em;
}
Expand Down