Skip to content

Commit 0285d08

Browse files
authored
Make EuiTitleS usable, make $euiFontSizeM a real thing (#204)
EuiTitle small upped to 18px.
1 parent 9cff695 commit 0285d08

File tree

10 files changed

+37
-30
lines changed

10 files changed

+37
-30
lines changed

src/components/call_out/_call_out.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $callOutTypes: (
3535
* 3. Apply margin to all but last item in the flex.
3636
*/
3737
.euiCallOutHeader {
38-
@include euiFontSizeM;
38+
@include euiFontSize;
3939
display: flex;
4040
align-items: baseline; /* 1 */
4141

src/components/description_list/_description_list.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
&.euiDescriptionList--row {
1212

1313
.euiDescriptionList__title {
14-
@include euiFontSizeM;
14+
@include euiFontSize;
1515
margin-top: $euiSize;
1616

1717
// Make sure the first <dt> doesn't get a margine.
@@ -62,13 +62,13 @@
6262
}
6363

6464
.euiDescriptionList__title {
65-
@include euiFontSizeM;
65+
@include euiFontSize;
6666
flex-basis: 50%;
6767
padding-right: $euiSizeS;
6868
}
6969

7070
.euiDescriptionList__description {
71-
@include euiFontSizeM;
71+
@include euiFontSize;
7272
flex-basis: 50%;
7373
padding-left: $euiSizeS;
7474
}

src/components/header/header_alert/_header_alert.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
.euiHeaderAlert__title {
2626
font-weight: $euiFontWeightMedium;
27-
@include euiFontSizeM;
27+
@include euiFontSize;
2828
padding-right: $euiSizeL; // Accounts for the dismiss button.
2929
}
3030

src/components/side_nav/_side_nav_item.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999

100100
.euiSideNavItemButton__label {
101101
@include euiTitle;
102-
font-size: $euiSize + 2px;
102+
font-size: $euiFontSizeM;
103103
}
104104
}
105105

src/components/text/_text.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.euiText {
22
@include euiText;
3-
@include euiFontSizeM;
3+
@include euiFontSize;
44

55
a {
66
color: $euiLinkColor;
@@ -57,6 +57,7 @@
5757
}
5858

5959
h3 {
60+
font-size: 112.5%;
6061
font-weight: $euiFontWeightMedium;
6162
}
6263

src/components/toast/_toast.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $toastTypes: (
6666
* 3. Account for close button.
6767
*/
6868
.euiToastHeader {
69-
@include euiFontSizeM;
69+
@include euiFontSize;
7070
padding-right: $euiSizeL; /* 3 */
7171

7272
display: flex;

src/components/tooltip/_tooltip.scss

+16-16
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
}
2222

2323
// ANIMATING -- with slight delay
24-
transition:
24+
transition:
2525
opacity $euiAnimSpeedNormal ease-out $euiAnimSpeedSlow,
2626
visibility $euiAnimSpeedNormal ease-out $euiAnimSpeedSlow,
2727
transform $euiAnimSpeedNormal ease-out $euiAnimSpeedSlow;
28-
opacity: 0;
29-
visibility: hidden;
28+
opacity: 0;
29+
visibility: hidden;
3030
transform: translateX(0) translateY($euiSize * -1) translateY(0); // default starting position of top
3131

3232
// Don't delay the animation if the tooltip is on click
3333
.euiTooltip--click & {
34-
transition:
34+
transition:
3535
opacity $euiAnimSpeedNormal ease-out,
3636
visibility $euiAnimSpeedNormal ease-out,
3737
transform $euiAnimSpeedNormal ease-out;
@@ -40,8 +40,8 @@
4040
&.euiTooltip-isVisible {
4141
opacity: 1;
4242
visibility: visible;
43-
transform: translateX(0) translateY(0) translateZ(0) !important;
44-
// Using important here so we're always at (0,0,0) when visible, no matter the position.
43+
transform: translateX(0) translateY(0) translateZ(0) !important;
44+
// Using important here so we're always at (0,0,0) when visible, no matter the position.
4545
// May need to revisit if we find override issues.
4646
}
4747

@@ -59,8 +59,8 @@
5959
}
6060
}
6161

62-
// The tooltip content (for styling)
63-
62+
// The tooltip content (for styling)
63+
6464
.euiTooltip__content {
6565

6666
// Scoped variables for component-only re-use
@@ -70,13 +70,13 @@
7070

7171
// STYLING
7272
@include euiBottomShadow;
73-
@include euiFontSizeS();
73+
@include euiFontSizeS();
7474
background-color: $background-color;
7575
border-radius: $euiBorderRadius;
7676
padding: $euiSizeM;
7777
color: $text-color;
7878
white-space: nowrap;
79-
79+
8080
// ARROW
8181
position: relative;
8282
&::before {
@@ -89,19 +89,19 @@
8989
background-color: $background-color;
9090
width: $arrow-size;
9191
height: $arrow-size;
92-
92+
9393
// Positions
9494
.euiTooltip--right & {
9595
bottom: 50%;
9696
left: -$arrow-size/2;
9797
transform: translateY(50%) rotateZ(45deg);
9898
}
99-
99+
100100
.euiTooltip--bottom & {
101101
bottom: auto;
102102
top: -$arrow-size/2;
103103
}
104-
104+
105105
.euiTooltip--left & {
106106
bottom: 50%;
107107
left: auto;
@@ -113,8 +113,8 @@
113113

114114
// The tooltip title if it exists
115115
.euiTooltip__title {
116-
@include euiFontSizeM;
117-
font-weight: $euiFontWeightMedium;
116+
@include euiFontSize;
117+
font-weight: $euiFontWeightMedium;
118118
margin-bottom: $euiSizeS;
119119
border-bottom: $euiBorderWidthThin solid $euiColorDarkShade;
120-
}
120+
}

src/global_styling/mixins/_typography.scss

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
line-height: $euiLineHeight;
4343
}
4444

45+
@mixin euiFontSize {
46+
@include fontSize($euiFontSize);
47+
line-height: $euiLineHeight;
48+
}
49+
4550
@mixin euiFontSizeL {
4651
@include fontSize($euiFontSizeL);
4752
line-height: $euiLineHeight;

src/global_styling/variables/_typography.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $euiFontSize: $euiSize !default;
2727

2828
$euiFontSizeXS: $euiFontSize * .75 !default;
2929
$euiFontSizeS: $euiFontSize * .875 !default;
30-
$euiFontSizeM: $euiFontSize !default;
30+
$euiFontSizeM: $euiFontSize * 1.125 !default;
3131
$euiFontSizeL: $euiFontSize * 1.5 !default;
3232
$euiFontSizeXL: $euiFontSize * 2 !default;
3333
$euiFontSizeXXL: $euiFontSize * 3 !default;

src/themes/k6/k6_globals.scss

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
$euiFontSize: 14px;
2+
13
$euiFontSizeXS: 12px;
24
$euiFontSizeS: 14px;
3-
$euiFontSizeM: 14px;
4-
$euiFontSize: 14px;
5-
$euiFontSizeL: 24px;
6-
$euiFontSizeXL: 28px;
5+
$euiFontSizeM: 16px;
6+
$euiFontSizeL: 18px;
7+
$euiFontSizeXL: 24px;
78
$euiFontSizeXXL: 32px;
89

910
// Make titles bold.
10-
$euiFontWeightLight: 400;
11+
$euiFontWeightLight: 500;

0 commit comments

Comments
 (0)