Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] ml fixes for dark mode #33222

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 15 additions & 23 deletions packages/kbn-ui-framework/dist/kui_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
* 4. Fix an IE bug which causes the last child to overflow the container.
* 5. Fixing this bug means we now need to align the children to the right.
*/
:focus:not([class^="eui"]) {
-webkit-animation: 350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate;
animation: 350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate; }

/**
* 1. Required for IE11.
*/
Expand Down Expand Up @@ -226,59 +222,55 @@ main {
* 1. Override Bootstrap.
*/
.kuiButton--primary {
color: #FFF;
color: #000;
background-color: #1BA9F5; }
.kuiButton--primary:not(a):enabled:focus {
color: #FFF; }
a.kuiButton--primary:not(.kuiButton-isDisabled):focus {
/* 1 */
color: #FFF; }
.kuiButton--primary:enabled:hover {
color: #FFF !important;
/* 1 */
color: #000 !important;
background-color: #098dd4; }
a.kuiButton--primary:not(.kuiButton-isDisabled):hover {
/* 1 */
color: #FFF !important;
/* 1 */
color: #000 !important;
background-color: #098dd4; }
.kuiButton--primary:enabled:active {
color: #FFF !important;
/* 1 */
color: #000 !important;
background-color: #098dd4; }
a.kuiButton--primary:not(.kuiButton-isDisabled):active {
/* 1 */
color: #FFF !important;
/* 1 */
color: #000 !important;
background-color: #098dd4; }

/**
* 1. Override Bootstrap.
*/
.kuiButton--success {
color: #FFF;
color: #000;
background-color: #7DE2D1; }
.kuiButton--success:not(a):enabled:focus {
color: #FFF; }
a.kuiButton--success:not(.kuiButton-isDisabled):focus {
/* 1 */
color: #FFF; }
.kuiButton--success:enabled:hover {
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #53d9c2; }
a.kuiButton--success:not(.kuiButton-isDisabled):hover {
/* 1 */
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #53d9c2; }
.kuiButton--success:enabled:active {
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #53d9c2; }
a.kuiButton--success:not(.kuiButton-isDisabled):active {
/* 1 */
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #53d9c2; }

Expand Down Expand Up @@ -330,7 +322,7 @@ main {
* 1. Override Bootstrap.
*/
.kuiButton--warning {
color: #FFF;
color: #000;
background-color: #FFCE7A; }
.kuiButton--warning:not(a):enabled:focus {
z-index: 1;
Expand All @@ -352,21 +344,21 @@ main {
/* 3 */
color: #FFF; }
.kuiButton--warning:enabled:hover {
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #ffbb47; }
a.kuiButton--warning:not(.kuiButton-isDisabled):hover {
/* 1 */
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #ffbb47; }
.kuiButton--warning:enabled:active {
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #ffbb47; }
a.kuiButton--warning:not(.kuiButton-isDisabled):active {
/* 1 */
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #ffbb47; }
.kuiButton--warning:disabled {
Expand Down
18 changes: 5 additions & 13 deletions packages/kbn-ui-framework/dist/kui_light.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
* 4. Fix an IE bug which causes the last child to overflow the container.
* 5. Fixing this bug means we now need to align the children to the right.
*/
:focus:not([class^="eui"]) {
-webkit-animation: 350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate;
animation: 350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate; }

/**
* 1. Required for IE11.
*/
Expand Down Expand Up @@ -235,21 +231,17 @@ main {
color: #FFF; }
.kuiButton--primary:enabled:hover {
color: #FFF !important;
/* 1 */
background-color: #004d81; }
a.kuiButton--primary:not(.kuiButton-isDisabled):hover {
/* 1 */
color: #FFF !important;
/* 1 */
background-color: #004d81; }
.kuiButton--primary:enabled:active {
color: #FFF !important;
/* 1 */
background-color: #004d81; }
a.kuiButton--primary:not(.kuiButton-isDisabled):active {
/* 1 */
color: #FFF !important;
/* 1 */
background-color: #004d81; }

/**
Expand Down Expand Up @@ -330,7 +322,7 @@ main {
* 1. Override Bootstrap.
*/
.kuiButton--warning {
color: #FFF;
color: #000;
background-color: #F5A700; }
.kuiButton--warning:not(a):enabled:focus {
z-index: 1;
Expand All @@ -352,21 +344,21 @@ main {
/* 3 */
color: #FFF; }
.kuiButton--warning:enabled:hover {
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #c28400; }
a.kuiButton--warning:not(.kuiButton-isDisabled):hover {
/* 1 */
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #c28400; }
.kuiButton--warning:enabled:active {
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #c28400; }
a.kuiButton--warning:not(.kuiButton-isDisabled):active {
/* 1 */
color: #FFF !important;
color: #000 !important;
/* 1 */
background-color: #c28400; }
.kuiButton--warning:disabled {
Expand Down
12 changes: 6 additions & 6 deletions packages/kbn-ui-framework/src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@
* 1. Override Bootstrap.
*/
.kuiButton--primary {
color: $buttonDefaultTextColor;
color: chooseLightOrDarkText($buttonPrimaryBackgroundColor, #FFF, #000);
background-color: $buttonPrimaryBackgroundColor;

@include kuiButtonFocus {
color: $buttonDefaultTextColor;
}

@include kuiButtonHoverAndActive {
color: $buttonDefaultTextColor !important; /* 1 */
color: chooseLightOrDarkText($buttonPrimaryHoverBackgroundColor, #FFF, #000) !important /* 1 */;
background-color: $buttonPrimaryHoverBackgroundColor;
}
}
Expand All @@ -108,15 +108,15 @@
* 1. Override Bootstrap.
*/
.kuiButton--success {
color: $buttonDefaultTextColor;
color: chooseLightOrDarkText($buttonSuccessBackgroundColor, #FFF, #000);
background-color: $buttonSuccessBackgroundColor;

@include kuiButtonFocus {
color: $buttonDefaultTextColor;
}

@include kuiButtonHoverAndActive {
color: $buttonDefaultTextColor !important; /* 1 */
color: chooseLightOrDarkText($buttonSuccessHoverBackgroundColor, #FFF, #000) !important; /* 1 */
background-color: $buttonSuccessHoverBackgroundColor;
}
}
Expand Down Expand Up @@ -144,7 +144,7 @@
* 1. Override Bootstrap.
*/
.kuiButton--warning {
color: $buttonDefaultTextColor;
color: chooseLightOrDarkText($buttonWarningBackgroundColor, #FFF, #000);
background-color: $buttonWarningBackgroundColor;

@include kuiButtonFocus {
Expand All @@ -153,7 +153,7 @@
}

@include kuiButtonHoverAndActive {
color: $buttonDefaultTextColor !important; /* 1 */
color: chooseLightOrDarkText($buttonWarningHoverBackgroundColor, #FFF, #000) !important; /* 1 */
background-color: $buttonWarningHoverBackgroundColor;
}

Expand Down
10 changes: 5 additions & 5 deletions x-pack/plugins/ml/public/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$mlColorCritical: #fe5050;
$mlColorMajor: #fba740;
$mlColorMinor: #fdec25;
$mlColorWarning: #8bc8fb;
$mlColorUnknown: #c0c0c0;
$mlColorCritical: #DD0A73;
$mlColorMajor: #E2543D;
$mlColorMinor: #FEC514;
$mlColorWarning: #0077CC;
$mlColorUnknown: #535966;

$mlColorCriticalText: makeHighContrastColor($mlColorCritical, $euiColorEmptyShade);
$mlColorMajorText: makeHighContrastColor($mlColorMajor, $euiColorEmptyShade);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
// SASSTODO: This entire sass file needs to be rewritten, using a color blind viz palette and proper vars.
// This will need to be done in a more thorough cleanup.
// This will need to be done in a more thorough cleanup.

.ml-field-data-card {
width: 360px;
height: 435px;

.boolean {
background-color: #e6c220;
background-color: $euiColorVis5;
}

.date {
background-color: #f98510;
background-color: $euiColorVis7;
}

.document_count {
background-color: #db1374;
background-color: $euiColorVis2;
}

.geo_point {
background-color: #461a0a;
background-color: $euiColorVis8;
}

.ip {
background-color: #490092;
background-color: $euiColorVis3;
}

.keyword {
background-color: #00b3a4;
background-color: $euiColorVis0;
}

.number {
background-color: #3185fc;
background-color: $euiColorVis1;
}

.text {
background-color: #920000;
background-color: $euiColorVis9;
}

.type-other, .unknown {
background-color: #bfa180;
background-color: $euiColorVis6;
}

// Use euiPanel styling
Expand Down Expand Up @@ -110,12 +110,12 @@

.x.axis path, .x.axis line {
fill: none;
stroke: #cccccc;
stroke: $euiBorderColor;
shape-rendering: crispEdges;
}

.area {
fill: #3185fc;
fill: $euiColorVis1;
}
}

Expand All @@ -134,12 +134,12 @@
}

.bar {
stroke: #ffffff;
stroke: $euiColorEmptyShade;
}

.axis path, .axis line {
fill: none;
stroke: #cccccc;
stroke: $euiBorderColor;
shape-rendering: crispEdges;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.ml-field-title-bar {
color: $euiColorEmptyShade;
color: $euiColorGhost;
@include euiFontSizeL;
text-align: center;
border-radius: $euiBorderRadius $euiBorderRadius 0px 0px;
Expand Down
Loading