Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Changed `EuiNavDrawerFlyout` title from `h5` to `div` ([#2040](https://github.com/elastic/eui/pull/2040))
- Added `magnifyWithMinus` and `magnifyWithPlus` glyphs to `EuiIcon` ([2056](https://github.com/elastic/eui/pull/2056))
- Added a fully black (no matter the theme) color SASS variable `$euiColorInk` ([2060](https://github.com/elastic/eui/pull/2060))

**Bug fixes**

Expand Down
3 changes: 2 additions & 1 deletion src-docs/src/views/guidelines/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
} from '../../../../src/components';

const euiColors = [
'euiColorGhost',
'euiColorEmptyShade',
'euiColorLightestShade',
'euiColorLightShade',
Expand All @@ -39,6 +38,8 @@ const euiColors = [
'euiColorDanger',
'euiColorWarning',
'euiColorSuccess',
'euiColorGhost',
'euiColorInk',
];

const euiTextColors = ['euiTextColor', 'euiColorDarkShade', 'euiLinkColor'];
Expand Down
7 changes: 3 additions & 4 deletions src/components/badge/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

&:focus {
background-color: transparentize($euiColorGhost, .2);
color: #000; // sass-lint:disable-line no-color-literals
color: $euiColorInk;
border-radius: 2px;
}

Expand Down Expand Up @@ -105,12 +105,11 @@ $badgeTypes: (

@each $name, $color in $badgeTypes {
.euiBadge--#{$name} {
// sass-lint:disable-block no-color-literals
background-color: $color;
@if (lightness($color) > 50) {
color: #000;
color: $euiColorInk;
} @else {
color: #FFF;
color: $euiColorGhost;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $buttonTypes: (
border-color: $color;

// The function makes that hexes safe for theming
$fillTextColor: chooseLightOrDarkText($color, #FFF, #000); // sass-lint:disable-line no-color-literals
$fillTextColor: chooseLightOrDarkText($color, $euiColorGhost, $euiColorInk);

color: $fillTextColor;

Expand All @@ -127,7 +127,7 @@ $buttonTypes: (
&:enabled {
$shadowColor: $euiShadowColor;
@if ($name == 'ghost') {
$shadowColor: #000;
$shadowColor: $euiColorInk;
} @else if (lightness($euiTextColor) < 50) {
// Only if this is the light theme do we use the button variant color to colorize the shadow
$shadowColor: desaturate($color, 60%);
Expand All @@ -150,7 +150,7 @@ $buttonTypes: (
&:disabled:hover,
&:disabled:focus {
@if ($name == 'ghost') {
@include euiSlightShadow(#000);
@include euiSlightShadow($euiColorInk);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
@mixin euiFormControlReadOnlyStyle {
cursor: default;
// Use transparency since there is no border and in case form is on a non-white background
background: transparentize(lightOrDarkTheme($euiColorLightShade, #000), .88);
background: transparentize(lightOrDarkTheme($euiColorLightShade, $euiColorInk), .88);
border-color: transparent;
box-shadow: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/series_chart/styles/react_vis/plot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $rv-xy-plot-tooltip-padding: 7px 10px;

.rv-xy-plot__series--line {
fill: none;
stroke: #000;
stroke: $euiColorInk;
stroke-width: 2px;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/tool_tip/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@mixin euiToolTipStyle($size: null) {
@include euiBottomShadow($color: #000);
@include euiBottomShadow($color: $euiColorInk);
border-radius: $euiBorderRadius;
background-color: $euiTooltipBackgroundColor;
color: $euiColorGhost;
Expand Down
4 changes: 2 additions & 2 deletions src/global_styling/functions/_colors.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Mixes a provided color with white.
@function tint($color, $percent) {
@return mix(#FFF, $color, $percent);
@return mix($euiColorGhost, $color, $percent);
}

// Mixes a provided color with black.
@function shade($color, $percent) {
@return mix(#000, $color, $percent);
@return mix($euiColorInk, $color, $percent);
}

// For theming. Checks the text color and tells us whether it's light or dark.
Expand Down
6 changes: 4 additions & 2 deletions src/global_styling/variables/_colors.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// Core

$euiColorPrimary: #006BB4 !default;
$euiColorSecondary: #017D73 !default;
$euiColorAccent: #DD0A73 !default;
$euiColorHighlight: #FFFBF1 !default;
$euiColorHighlight: #FFFBF1 !default; // Not used should we deprecate?

// These colors stay the same no matter the theme
$euiColorGhost: #FFF !default;
$euiColorInk: #000 !default;

// Status
$euiColorSuccess: $euiColorSecondary !default;
Expand Down
5 changes: 4 additions & 1 deletion src/themes/eui/eui_colors_dark.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// Code
// Core
$euiColorPrimary: #1BA9F5;
$euiColorSecondary: #7DE2D1;
$euiColorAccent: #F990C0;

// These colors stay the same no matter the theme
$euiColorGhost: #FFF;
$euiColorInk: #000;

// Status
$euiColorSuccess: $euiColorSecondary;
Expand Down