forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor UI Framework directory structure to house everything in a sr…
…c directory. (elastic#12880) - Add components.js and services.js files to continue to export JS modules from the root.
- Loading branch information
Showing
14 changed files
with
94 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './src/components'; |
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
ui_framework/components/global_styles/mixins/_responsive.scss
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
ui_framework/components/global_styles/mixins/_typography.scss
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
ui_framework/components/global_styles/variables/_typography.scss
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
ui_framework/components/global_styles/variables/_z_index.scss
This file was deleted.
Oops, something went wrong.
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 @@ | ||
export * from './src/services'; |
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 +1,3 @@ | ||
@import 'responsive'; | ||
@import 'naming'; | ||
@import 'responsive'; | ||
@import 'typography'; |
Empty file.
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,17 @@ | ||
// Some mixins that help us deal with browser scaling of text more consistantly. | ||
// Essentially, fonts across kui should scale agains the root html element, not | ||
// against parent inheritance. | ||
|
||
|
||
// Typography mixins | ||
|
||
@function convertToRem($size) { | ||
@return #{$size / $kuiFontSize}rem; | ||
} | ||
|
||
// Spit out rem and px | ||
|
||
@mixin fontSize($size: $kuiFontSize) { | ||
font-size: $size; | ||
font-size: convert-to-rem($size); | ||
} |
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ $kuiSizeM: $kuiSize; | |
$kuiSizeL: $kuiSize * 1.5; | ||
$kuiSizeXL: $kuiSize * 2; | ||
$kuiSizeXXL: $kuiSize * 2.5; | ||
|
77 changes: 66 additions & 11 deletions
77
ui_framework/src/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 |
---|---|---|
@@ -1,16 +1,71 @@ | ||
// Font | ||
|
||
$kuiFontFamily: Roboto, Helvetica, Arial, sans-serif; | ||
// Families | ||
$kuiFontFamily: "Roboto", Helvetica, Arial, sans-serif; | ||
$kuiCodeFontFamily: "Roboto Mono", monospace; | ||
|
||
$kuiLineHeight: 1.5; | ||
|
||
// Font sizes | ||
$kuiFontSize: $kuiSize; | ||
$kuiFontSizeXS: $kuiSize; | ||
$kuiFontSizeS: $kuiSize; | ||
$kuiFontSizeM: $kuiSize; | ||
$kuiFontSizeL: $kuiSize; | ||
$kuiFontSizeXL: $kuiSize; | ||
$kuiFontSizeXXL: $kuiSize; | ||
|
||
$kuiFontSizeXS: 12px; | ||
$kuiFontSizeS: 14px; | ||
$kuiFontSizeM: $kuiFontSize; | ||
$kuiFontSizeL: 24px; | ||
$kuiFontSizeXL: 32px; | ||
$kuiFontSizeXXL: 48px; | ||
|
||
// Line height | ||
|
||
$kuiLineHeight: 1.5 * $kuiFontSize; | ||
|
||
// Font weights | ||
|
||
$kuiFontWeightLight: 300; | ||
$kuiFontWeightRegular: 400; | ||
$kuiFontWeightMedium: 500; | ||
|
||
// Our base fonts | ||
|
||
%kuiFont { | ||
font-family: $kuiFontFamily; | ||
font-weight: $kuiFontWeightRegular; | ||
} | ||
|
||
%kuiCodeFont { | ||
font-family: $kuiCodeFontFamily; | ||
} | ||
|
||
// Font sizing extends, using rem mixin | ||
|
||
%kuiFontSize { | ||
font-size: rem($kuiFontSize); | ||
line-height: $kuiLineHeight; | ||
} | ||
|
||
%kuiFontSizeXS { | ||
font-size: rem($kuiFontSizeXS); | ||
line-height: $kuiLineHeight; | ||
} | ||
|
||
%kuiFontSizeS { | ||
font-size: rem($kuiFontSizeS); | ||
line-height: $kuiLineHeight; | ||
} | ||
|
||
%kuiFontSizeM { | ||
font-size: rem($kuiFontSizeM); | ||
line-height: $kuiLineHeight; | ||
} | ||
|
||
%kuiFontSizeL { | ||
font-size: rem($kuiFontSizeL); | ||
line-height: $kuiLineHeight * 1.5; | ||
} | ||
|
||
%kuiFontSizeXL { | ||
font-size: rem($kuiFontSizeXL); | ||
line-height: $kuiLineHeight * 2; | ||
} | ||
|
||
%kuiFontSizeXXL { | ||
font-size: rem($kuiFontSizeXXL); | ||
line-height: $kuiLineHeight * 3; | ||
} |
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