-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Amsterdam] Updating base text sizing (#2936)
* Changing font size to 14px and headings to bold * Unifying font weights across EuiTitle sizes * Setting the scale and using mixins fo `.euiText--medium` * Finally start using the updated version of Inter * A few more fixes * Using a map for title sizing * Fixing text scales * Using only google fonts * Remove uneccesary selector override * Addressing a few review coments * cleanup Co-authored-by: cchaos <[email protected]>
- Loading branch information
1 parent
19971ab
commit 2f04008
Showing
11 changed files
with
127 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@import 'panel'; | ||
@import 'button'; | ||
@import 'panel'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
@import 'buttons'; | ||
@import 'borders'; | ||
@import 'typography'; |
48 changes: 48 additions & 0 deletions
48
src/themes/eui-amsterdam/global_styling/variables/_typography.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Finally start using the non-beta version of Inter | ||
$euiFontFamily: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; | ||
|
||
// Font sizes -- scale is loosely based on Major Third (1.250) with a base of 14px | ||
// Base list is an altered scale based on 16px to match the resulted values below | ||
$euiTextScale: 2.125, 1.6875, 1.375, 1.125, 1, .875, .75; | ||
|
||
$euiFontSize: $euiSize - 2; // 14px | ||
|
||
$euiFontSizeXS: floor($euiFontSize * .86); // 12px // h6 | ||
$euiFontSizeS: floor($euiFontSize * 1); // 14px // h5 --> Now the same as the base $euiFontSize | ||
$euiFontSizeM: ceil($euiFontSize * 1.14); // 16px // h4 | ||
$euiFontSizeL: ceil($euiFontSize * 1.57); // 22px // h3 | ||
$euiFontSizeXL: floor($euiFontSize * 1.93); // 27px // h2 | ||
$euiFontSizeXXL: floor($euiFontSize * 2.43); // 34px // h1 | ||
|
||
$euiTitles: ( | ||
'xxxs': ( | ||
'font-size': $euiFontSizeXS, | ||
'line-height': lineHeightFromBaseline(3), | ||
'font-weight': $euiFontWeightBold, | ||
), | ||
'xxs': ( | ||
'font-size': $euiFontSizeS, | ||
'line-height': lineHeightFromBaseline(3), | ||
'font-weight': $euiFontWeightBold, | ||
), | ||
'xs': ( | ||
'font-size': $euiFontSizeM, | ||
'line-height': lineHeightFromBaseline(3), | ||
'font-weight': $euiFontWeightBold, | ||
), | ||
's': ( | ||
'font-size': $euiFontSizeL, | ||
'line-height': lineHeightFromBaseline(4), | ||
'font-weight': $euiFontWeightBold, | ||
), | ||
'm': ( | ||
'font-size': $euiFontSizeXL, | ||
'line-height': lineHeightFromBaseline(5), | ||
'font-weight': $euiFontWeightBold, | ||
), | ||
'l': ( | ||
'font-size': $euiFontSizeXXL, | ||
'line-height': lineHeightFromBaseline(6), | ||
'font-weight': $euiFontWeightBold, | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
@import 'button'; | ||
@import 'button_empty'; | ||
@import 'button_group'; | ||
@import 'text'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Increase the medium (currently default) size of EuiText to original 16px | ||
.euiText--medium { | ||
@include fontSize($euiFontSizeM); | ||
@include euiScaleText($euiFontSizeM); | ||
} |