Skip to content

Commit

Permalink
Extract typography mixins into the mixins directory. Make headings bold.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Nov 21, 2017
1 parent ebfe8d0 commit bc4a06f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 61 deletions.
3 changes: 3 additions & 0 deletions src/global_styling/k6/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ $euiFontSize: 14px;
$euiFontSizeL: 18px;
$euiFontSizeXL: 22px;
$euiFontSizeXXL: 28px;

// Make titles bold.
$euiFontWeightLight: 500;
1 change: 1 addition & 0 deletions src/global_styling/mixins/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
@import 'responsive';
@import 'shadow';
@import 'size';
@import 'typography';
@import 'helpers';
58 changes: 58 additions & 0 deletions src/global_styling/mixins/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

// Our base fonts

@mixin euiFont {
font-family: $euiFontFamily;
font-weight: $euiFontWeightRegular;
}

@mixin euiCodeFont {
font-family: $euiCodeFontFamily;
}

@mixin euiTitle {
color: $euiTitleColor;
font-weight: $euiFontWeightLight;
}

@mixin euiText {
color: $euiTextColor;
font-weight: $euiFontWeightRegular;
}

// Font sizing extends, using rem mixin

@mixin euiFontSize {
@include fontSize($euiFontSize);
line-height: $euiLineHeight;
}

@mixin euiFontSizeXS {
@include fontSize($euiFontSizeXS);
line-height: $euiLineHeight;
}

@mixin euiFontSizeS {
@include fontSize($euiFontSizeS);
line-height: $euiLineHeight;
}

@mixin euiFontSizeM {
@include fontSize($euiFontSizeM);
line-height: $euiLineHeight;
}

@mixin euiFontSizeL {
@include fontSize($euiFontSizeL);
line-height: $euiLineHeight;
}

@mixin euiFontSizeXL {
@include fontSize($euiFontSizeXL);
line-height: $euiLineHeight;
}

@mixin euiFontSizeXXL {
@include fontSize($euiFontSizeXXL);
line-height: $euiLineHeight;
}
64 changes: 3 additions & 61 deletions src/global_styling/variables/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,64 +39,6 @@ $euiLineHeight: 1.5;

// Font weights

$euiFontWeightLight: 300;
$euiFontWeightRegular: 400;
$euiFontWeightMedium: 500;

// Our base fonts

@mixin euiFont {
font-family: $euiFontFamily;
font-weight: $euiFontWeightRegular;
}

@mixin euiCodeFont {
font-family: $euiCodeFontFamily;
}

@mixin euiTitle {
color: $euiTitleColor;
font-weight: $euiFontWeightLight;
}

@mixin euiText {
color: $euiTextColor;
font-weight: $euiFontWeightRegular;
}

// Font sizing extends, using rem mixin

@mixin euiFontSize {
@include fontSize($euiFontSize);
line-height: $euiLineHeight;
}

@mixin euiFontSizeXS {
@include fontSize($euiFontSizeXS);
line-height: $euiLineHeight;
}

@mixin euiFontSizeS {
@include fontSize($euiFontSizeS);
line-height: $euiLineHeight;
}

@mixin euiFontSizeM {
@include fontSize($euiFontSizeM);
line-height: $euiLineHeight;
}

@mixin euiFontSizeL {
@include fontSize($euiFontSizeL);
line-height: $euiLineHeight;
}

@mixin euiFontSizeXL {
@include fontSize($euiFontSizeXL);
line-height: $euiLineHeight;
}

@mixin euiFontSizeXXL {
@include fontSize($euiFontSizeXXL);
line-height: $euiLineHeight;
}
$euiFontWeightLight: 300 !default;
$euiFontWeightRegular: 400 !default;
$euiFontWeightMedium: 500 !default;

0 comments on commit bc4a06f

Please sign in to comment.