Skip to content

Commit

Permalink
Create global_styles dir with sub-directories. (elastic#12833)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Aug 11, 2017
1 parent 3ae1af3 commit 0f3c8aa
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 119 deletions.
112 changes: 0 additions & 112 deletions ui_framework/components/_variables.scss

This file was deleted.

3 changes: 3 additions & 0 deletions ui_framework/components/global_styles/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import 'reset/index';
@import 'variables/index';
@import 'mixins/index';
File renamed without changes.
1 change: 1 addition & 0 deletions ui_framework/components/global_styles/mixins/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'global_mixins';
1 change: 1 addition & 0 deletions ui_framework/components/global_styles/reset/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "reset";
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// 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;
6 changes: 6 additions & 0 deletions ui_framework/components/global_styles/variables/_borders.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Borders

$globalBorderColor: $globalColorLightGray;
$globalBorderRadius: 4px;
$globalBorderThick: 2px solid $globalBorderColor;
$globalBorderThin: 1px solid $globalBorderColor;
49 changes: 49 additions & 0 deletions ui_framework/components/global_styles/variables/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// 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;
9 changes: 9 additions & 0 deletions ui_framework/components/global_styles/variables/_font.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Font

$globalFontFamily: "Open Sans", Helvetica, Arial, sans-serif;
$globalFontSize: 14px;
$globalLineHeight: 1.5;
$globalSubTextFontSize: 12px;
$globalTitleFontSize: 18px;
$globalFontWeightRegular: 400;
$globalFontWeightBold: 700;
15 changes: 15 additions & 0 deletions ui_framework/components/global_styles/variables/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// --------------------------------------------------------------------------------------
// KUI global variables
// --------------------------------------------------------------------------------------
// This module contains all global variables available within kui. Every variable in this
// document should be prefixed with $global. This lets us know where the variable is
// coming from when looking inside the individual component files. Any component local
// variables should be declared at the top of those documents prefixed with $componentName.

@import 'colors';
@import 'font';
@import 'timing';
@import 'borders';
@import 'shadows';
@import 'z_index';
@import 'animations';
3 changes: 3 additions & 0 deletions ui_framework/components/global_styles/variables/_shadows.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Shadows

$globalBoxShadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
3 changes: 3 additions & 0 deletions ui_framework/components/global_styles/variables/_timing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Timing

$globalInputTransitionTiming: 0.1s linear;
Empty file.
7 changes: 2 additions & 5 deletions ui_framework/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
// When possible, if making changes to those legacy components, please think about
// instead adding them to this library and deprecating that dependency.


// Global constants
@import "variables";
@import "mixins";
@import "common_styles";
// Global styles
@import "global_styles/index"

// Components
@import "accessibility/index";
Expand Down
4 changes: 4 additions & 0 deletions ui_framework/doc_site/src/components/guide/_guide.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html {
height: 100%;
}

.guideBody {
height: 100%;
background-color: #000000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import "../../variables";

.guidePage {
display: flex;
flex: 1 0 auto;
Expand Down

0 comments on commit 0f3c8aa

Please sign in to comment.