Skip to content

Commit bdcc780

Browse files
committed
EUI font-size compatibility
1 parent abb1c81 commit bdcc780

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/Elastic.Documentation.Site/Assets/styles.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@
2424
@import './api-docs.css';
2525
@import 'tippy.js/dist/tippy.css';
2626

27+
html {
28+
/* We need to use 14px because EUI works best with a 14px base */
29+
font-size: 14px;
30+
}
31+
32+
body {
33+
/* This is still needed because of some usages of ch units and to maintain the previous behavior */
34+
font-size: 16px;
35+
}
36+
2737
:root {
2838
--outline-size: max(2px, 0.08em);
2939
--outline-style: auto;

src/Elastic.Documentation.Site/Assets/theme.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,13 @@
175175
--color-poppy: #fa744e; /* == --color-poppy-90 */
176176

177177
--spacing: 4px;
178+
179+
--text-xs: 0.857rem;
180+
--text-sm: 1rem;
181+
--text-base: 1.143rem;
182+
--text-xl: 1.429rem;
183+
--text-2xl: 1.714rem;
184+
--text-3xl: 2.143rem;
185+
--text-4xl: 2.571rem;
186+
--text-5xl: 3.429rem;
178187
}

src/Elastic.Documentation.Site/Assets/web-components/VersionDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ const VersionDropdown = ({
197197
<EuiText
198198
css={css`
199199
font-weight: ${euiTheme.font.weight.bold};
200-
font-size: ${useEuiFontSize('xs').fontSize};
200+
font-size: ${useEuiFontSize('s').fontSize};
201201
`}
202202
>
203203
Current version ({currentVersion})

0 commit comments

Comments
 (0)