Skip to content

Commit

Permalink
Changing font size to 14px and headings to bold
Browse files Browse the repository at this point in the history
  • Loading branch information
daveyholler committed Feb 26, 2020
1 parent e3d4826 commit 2cd96d6
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

**Theme: Amsterdam**

- Text sizes are now based on a 14px base font size. Headings are now bold. ([#2936](https://github.com/elastic/eui/pull/2936))
- Altered `secondary`, `accent` colors to be more saturated ([#2873](https://github.com/elastic/eui/pull/2873))


Expand Down
1 change: 1 addition & 0 deletions src/themes/eui-amsterdam/global_styling/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// Variables come next, and are used in some mixins
@import '../../../global_styling/variables/index';
@import 'variables/index';

// Mixins provide generic code expansion through helpers
@import '../../../global_styling/mixins/index';
Expand Down
1 change: 1 addition & 0 deletions src/themes/eui-amsterdam/global_styling/mixins/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import 'panel';
@import 'typography';
40 changes: 40 additions & 0 deletions src/themes/eui-amsterdam/global_styling/mixins/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@mixin euiTitle($size: 'm') {
color: $euiTitleColor;

@if $size == 'xxxs' {
@include euiFontSizeXS;
@include lineHeightFromBaseline(3);
font-weight: $euiFontWeightSemiBold;
letter-spacing: 0;
} @else if $size == 'xxs' {
@include euiFontSizeS;
@include lineHeightFromBaseline(3);
font-weight: $euiFontWeightSemiBold;
letter-spacing: 0;
} @else if $size == 'xs' {
@include euiFontSize;
@include lineHeightFromBaseline(3);
font-weight: $euiFontWeightSemiBold;
letter-spacing: 0;
} @else if $size == 's' {
@include euiFontSizeL;
@include lineHeightFromBaseline(4);
font-weight: $euiFontWeightBold;
letter-spacing: 0;
} @else if $size == 'm' {
@include euiFontSizeXL;
@include lineHeightFromBaseline(5);
font-weight: $euiFontWeightBold;
letter-spacing: 0;
} @else if $size == 'l' {
@include euiFontSizeXXL;
@include lineHeightFromBaseline(6);
font-weight: $euiFontWeightBold;
letter-spacing: -.0625rem;
} @else {
@include fontSize($size);
@include lineHeightFromBaseline(3);
font-weight: $euiFontWeightBold;
letter-spacing: 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'typography';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$euiFontSize: $euiSize - 2; // 5th position in scale

// These variables are unchanged, but the calculated values are smaller
$euiFontSizeXS: $euiFontSize * nth($euiTextScale, 7); // 11px
$euiFontSizeS: $euiFontSize * nth($euiTextScale, 6); // 12px
$euiFontSizeM: $euiFontSize * nth($euiTextScale, 4); // 16px
$euiFontSizeL: $euiFontSize * nth($euiTextScale, 3); // 18px
$euiFontSizeXL: $euiFontSize * nth($euiTextScale, 2); // 25px
$euiFontSizeXXL: $euiFontSize * nth($euiTextScale, 1); // 32px
8 changes: 8 additions & 0 deletions src/themes/eui-amsterdam/overrides/_text.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: $euiFontWeightBold;
}
4 changes: 4 additions & 0 deletions src/themes/eui-amsterdam/overrides/_title.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.euiTitle {
font-weight: $euiFontWeightBold;
letter-spacing: 0;
}

0 comments on commit 2cd96d6

Please sign in to comment.