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.
[K7]: KUI variable naming, sizing and responsive breakpoints (elastic…
…#12846) variable naming, sizing and responsive breakpoints
- Loading branch information
Showing
20 changed files
with
161 additions
and
158 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,2 @@ | ||
@import 'naming'; | ||
@import 'responsive'; |
29 changes: 29 additions & 0 deletions
29
ui_framework/components/global_styles/mixins/_responsive.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,29 @@ | ||
// Responsiveness | ||
|
||
$breakpoints: ("xSmall": 575px, "small": 768px, "medium": 992px, "large": 1200px) !default; | ||
|
||
|
||
@mixin screenXSmall { | ||
@media only screen and (max-width: map-get($breakpoints, "small")) { | ||
@content; | ||
} | ||
} | ||
|
||
|
||
@mixin screenSmall { | ||
@media only screen and (min-width: map-get($breakpoints, "small") + 1) and (max-width: map-get($breakpoints, "medium") - 1) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin screenMedium { | ||
@media only screen and (min-width: map-get($breakpoints, "medium")) and (max-width: map-get($breakpoints, "large") - 1) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin screenLarge { | ||
@media only screen and (min-width: map-get($breakpoints, "large")) { | ||
@content; | ||
} | ||
} |
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,9 @@ | ||
$kuiSize: 16px; | ||
|
||
$kuiSizeS: $kuiSize / 2; | ||
$kuiSizeXS: $kuiSize / 4; | ||
$kuiSizeM: $kuiSize; | ||
$kuiSizeL: $kuiSize * 1.5; | ||
$kuiSizeXL: $kuiSize * 2; | ||
$kuiSizeXXL: $kuiSize * 2.5; | ||
|
21 changes: 21 additions & 0 deletions
21
ui_framework/components/global_styles/variables/_z_index.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,21 @@ | ||
// Z-Index | ||
|
||
|
||
$kuiZLevel0: 0; | ||
$kuiZLevel1: 1000; | ||
$kuiZLevel2: 2000; | ||
$kuiZLevel3: 3000; | ||
$kuiZLevel4: 4000; | ||
$kuiZLevel5: 5000; | ||
$kuiZLevel6: 6000; | ||
$kuiZLevel7: 7000; | ||
$kuiZLevel8: 8000; | ||
$kuiZLevel9: 9000; | ||
|
||
|
||
|
||
$kuiZContent: 0; | ||
$kuiZContentMenu: 2000; | ||
$kuiZNavigation: 4000; | ||
$kuiZMask: 6000; | ||
$kuiZModal: 8000; |
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 |
---|---|---|
|
@@ -13,4 +13,3 @@ | |
// instead adding them to this library and deprecating that dependency. | ||
|
||
// Components | ||
@import "popover/index"; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
@import 'global_mixins'; | ||
@import 'responsive'; |
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,29 @@ | ||
// Responsiveness | ||
|
||
$breakpoints: ("xSmall": 575px, "small": 768px, "medium": 992px, "large": 1200px) !default; | ||
|
||
|
||
@mixin screenXSmall { | ||
@media only screen and (max-width: map-get($breakpoints, "small")) { | ||
@content; | ||
} | ||
} | ||
|
||
|
||
@mixin screenSmall { | ||
@media only screen and (min-width: map-get($breakpoints, "small") + 1) and (max-width: map-get($breakpoints, "medium") - 1) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin screenMedium { | ||
@media only screen and (min-width: map-get($breakpoints, "medium")) and (max-width: map-get($breakpoints, "large") - 1) { | ||
@content; | ||
} | ||
} | ||
|
||
@mixin screenLarge { | ||
@media only screen and (min-width: map-get($breakpoints, "large")) { | ||
@content; | ||
} | ||
} |
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,9 +1,10 @@ | ||
// Animations | ||
|
||
$globalAnimSlightBounce: cubic-bezier(0.34,1.61,0.7,1); | ||
$globalAnimSlightResistance: cubic-bezier(0.694, 0.0482, 0.335, 1); | ||
$globalAnimSpeedVeryFast: 90ms; | ||
$globalAnimSpeedFast: 150ms; | ||
$globalAnimSpeedNormal: 250ms; | ||
$globalAnimSpeedSlow: 350ms; | ||
$globalAnimSpeedVerySlow: 500ms; | ||
$kuiAnimSlightBounce: cubic-bezier(0.34,1.61,0.7,1); | ||
$kuiAnimSlightResistance: cubic-bezier(0.694, 0.0482, 0.335, 1); | ||
|
||
$kuiAnimSpeedExtraFast: 90ms; | ||
$kuiAnimSpeedFast: 150ms; | ||
$kuiAnimSpeedNormal: 250ms; | ||
$kuiAnimSpeedSlow: 350ms; | ||
$kuiAnimSpeedExtra: 500ms; |
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,6 +1,6 @@ | ||
// Borders | ||
|
||
$globalBorderColor: $globalColorLightGray; | ||
$globalBorderRadius: 4px; | ||
$globalBorderThick: 2px solid $globalBorderColor; | ||
$globalBorderThin: 1px solid $globalBorderColor; | ||
$kuiBorderColor: $kuiColorLightGray; | ||
$kuiBorderRadius: 4px; | ||
$kuiBorderThick: 2px solid $kuiBorderColor; | ||
$kuiBorderThin: 1px solid $kuiBorderColor; |
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,49 +1,13 @@ | ||
// True colors | ||
|
||
$globalColorBlue: #0079a5; | ||
$globalColorTeal: #00A69B; | ||
$globalColorRed: #A30000; | ||
$globalColorLightestGray: #F5F5F5; | ||
$globalColorLightGray: #D9D9D9; | ||
$globalColorMediumGray: #999; | ||
$globalColorDarkGray: #666; | ||
$globalColorDarkestGray: #3F3F3F; | ||
$globalColorBlack: #000; | ||
$globalColorWhite: #FFF; | ||
|
||
// Normal colors | ||
|
||
$globalTextColor: #2d2d2d; | ||
$globalLinkColor: $globalColorBlue; | ||
$globalLinkColor-isHover: darken($globalLinkColor, 10%); | ||
$globalInputTextColor: $globalTextColor; | ||
$globalInputBackgroundColor: $globalColorWhite; | ||
$globalInputBorderColor: $globalColorLightGray; | ||
|
||
// Dark theme colors | ||
|
||
$globalTextColor--darkTheme: #cecece; | ||
$globalBackgroundColor--darkTheme: #777777; | ||
$globalLinkColor--darkTheme: #b7e2ea; | ||
$globalLinkColor-isHover--darkTheme: #def2f6; | ||
$globalInputTextColor--darkTheme: $globalTextColor--darkTheme; | ||
$globalInputBackgroundColor--darkTheme: #444444; | ||
$globalInputBorderColor--darkTheme: $globalInputBackgroundColor--darkTheme; | ||
|
||
// Colors | ||
|
||
$globalInfoColor: #3fa8c7; | ||
$globalInactiveColor: #c3c3c3; | ||
$globalSuccessColor: #417505; | ||
$globalWarningColor: #ec9800; | ||
$globalDangerColor: $globalColorRed; | ||
$globalFocusColor: $globalColorBlue; | ||
$globalFocusDangerColor: #ff523c; | ||
$globalFocusWarningColor: #ffa500; | ||
$globalFocusBackgroundColor: #ffffff; | ||
$globalFontColor: #191E23; | ||
$globalSubduedTextColor: $globalColorDarkGray; | ||
$globalLinkHoverColor: #006E8A; | ||
$globalSelectedBorderColor: $globalColorBlue; | ||
$globalDangerBorderColor: $globalDangerColor; | ||
$globalFormControlBorderColor: #DEDEDE; | ||
$kuiColorBlue: #0079a5; | ||
$kuiColorTeal: #00A69B; | ||
$kuiColorRed: #A30000; | ||
$kuiColorOrange: #E5830E; | ||
$kuiColorLightestGray: #F5F5F5; | ||
$kuiColorLightGray: #D9D9D9; | ||
$kuiColorMediumGray: #999; | ||
$kuiColorDarkGray: #666; | ||
$kuiColorDarkestGray: #3F3F3F; | ||
$kuiColorBlack: #000; | ||
$kuiColorWhite: #FFF; |
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,9 +1,16 @@ | ||
// Font | ||
|
||
$globalFontFamily: "Open Sans", Helvetica, Arial, sans-serif; | ||
$globalFontSize: 14px; | ||
$globalLineHeight: 1.5; | ||
$globalSubTextFontSize: 12px; | ||
$globalTitleFontSize: 18px; | ||
$globalFontWeightRegular: 400; | ||
$globalFontWeightBold: 700; | ||
$kuiFontFamily: Roboto, Helvetica, Arial, sans-serif; | ||
$kuiCodeFontFamily: "Roboto Mono", monospace; | ||
|
||
$kuiLineHeight: 1.5; | ||
|
||
$kuiFontSize: $kuiSize; | ||
$kuiFontSizeXS: $kuiSize; | ||
$kuiFontSizeS: $kuiSize; | ||
$kuiFontSizeM: $kuiSize; | ||
$kuiFontSizeL: $kuiSize; | ||
$kuiFontSizeXL: $kuiSize; | ||
$kuiFontSizeXXL: $kuiSize; | ||
|
||
|
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
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 @@ | ||
// Shadows | ||
|
||
$globalBoxShadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1); |
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,8 @@ | ||
$kuiSize: 16px; | ||
|
||
$kuiSizeS: $kuiSize / 2; | ||
$kuiSizeXS: $kuiSize / 4; | ||
$kuiSizeM: $kuiSize; | ||
$kuiSizeL: $kuiSize * 1.5; | ||
$kuiSizeXL: $kuiSize * 2; | ||
$kuiSizeXXL: $kuiSize * 2.5; |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
// Z-Index | ||
|
||
|
||
$kuiZLevel0: 0; | ||
$kuiZLevel1: 1000; | ||
$kuiZLevel2: 2000; | ||
$kuiZLevel3: 3000; | ||
$kuiZLevel4: 4000; | ||
$kuiZLevel5: 5000; | ||
$kuiZLevel6: 6000; | ||
$kuiZLevel7: 7000; | ||
$kuiZLevel8: 8000; | ||
$kuiZLevel9: 9000; | ||
|
||
|
||
|
||
$kuiZContent: 0; | ||
$kuiZContentMenu: 2000; | ||
$kuiZNavigation: 4000; | ||
$kuiZMask: 6000; | ||
$kuiZModal: 8000; |