diff --git a/CHANGELOG.md b/CHANGELOG.md index e762277fb48..597ae1ee439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Adjusted the dark theme palette to have a slight blue titn ([#1691](https://github.com/elastic/eui/pull/1691)) - Added `repositionOnScroll` property to the `EuiPopoverProps` type definition ([#1628](https://github.com/elastic/eui/pull/1628)) - Added support to `findTestSubject` for an optional `matcher` argument, which defaults to `~=`, enabling it to identify an element based on one of multiple space-separated values within its `data-test-subj` attribute ([#1587](https://github.com/elastic/eui/pull/1587)) - Converted `EuiFlexGrid`, `EuiFlexGroup`, `EuiFlexItem`, `EuiDescriptionList`, `EuiDescriptionListTitle`, and `EuiDescriptionListDescription` to TypeScript ([#1365](https://github.com/elastic/eui/pull/1365)) diff --git a/src-docs/src/routes.js b/src-docs/src/routes.js index bbaf7fe1e6b..1477b59fa4e 100644 --- a/src-docs/src/routes.js +++ b/src-docs/src/routes.js @@ -25,7 +25,7 @@ import ColorGuidelines import ModalGuidelines from './views/guidelines/modals'; -import SassGuidelines +import { SassGuidelines } from './views/guidelines/sass'; import TextScales diff --git a/src-docs/src/views/app_view.js b/src-docs/src/views/app_view.js index 5d44884d7a8..094f21d07c5 100644 --- a/src-docs/src/views/app_view.js +++ b/src-docs/src/views/app_view.js @@ -80,7 +80,7 @@ export class AppView extends Component {
{rgbToHex(lightColors[color].rgba).toUpperCase()}
{rgbToHex(palette[color].rgba).toUpperCase()}
- rgb({lightColors[color].r}, {lightColors[color].g}, {lightColors[color].b})
+ rgb({palette[color].r}, {palette[color].g}, {palette[color].b})
{visColors.map(function (color, index) {
- return renderPaletteColor(color, index);
+ return renderPaletteColor(palette, color, index);
})}
diff --git a/src-docs/src/views/guidelines/sass.js b/src-docs/src/views/guidelines/sass.js
index c25a394dcc7..3233094ef7b 100644
--- a/src-docs/src/views/guidelines/sass.js
+++ b/src-docs/src/views/guidelines/sass.js
@@ -1,5 +1,6 @@
import React from 'react';
import lightColors from '!!sass-vars-to-js-loader?preserveKeys=true!../../../../src/global_styling/variables/_colors.scss';
+import darkColors from '!!sass-vars-to-js-loader!../../../../src/themes/eui/eui_colors_dark.scss';
import sizes from '!!sass-vars-to-js-loader?preserveKeys=true!../../../../src/global_styling/variables/_size.scss';
import zindexs from '!!sass-vars-to-js-loader?preserveKeys=true!../../../../src/global_styling/variables/_z_index.scss';
import animations from '!!sass-vars-to-js-loader?preserveKeys=true!../../../../src/global_styling/variables/_animations.scss';
@@ -116,7 +117,7 @@ const euiOverFlowShadows = [
const euiBreakPoints = Object.getOwnPropertyNames(breakpoints.euiBreakpoints);
-function renderPaletteColor(color) {
+function renderPaletteColor(palette, color) {
let optionalDefault;
if (color === 'euiTextColor') {
optionalDefault = (
@@ -129,7 +130,7 @@ function renderPaletteColor(color) {
return (
+ Often you need to go beyond the provided color set. When doing so always use
+ color functions to modify the base set. Here are some examples.
+
- Often you need to go beyond the provided color set. When doing so always use
- color functions to modify the base set. Here are some examples.
-
- Remember that EUI provides dark and light mode theming support. Sometimes the traditional
- color functions don't give enough flexibility for both modes.
-
- For example, depending upon what theme you use
- is #0079A5 in the light theme
-
- is #4da1c0 in the dark theme
-
- Taking the default primary color above we want to tint the color
- in the light mode, but shade it in the dark mode. This makes the
- background color more subtle in both use cases.
-
+ Remember that EUI provides dark and light mode theming support. Sometimes the traditional
+ color functions don't give enough flexibility for both modes.
+
+ For example, depending upon what theme you use
+ is #0079A5 in the light theme
+
+ is #4da1c0 in the dark theme
+
+ Taking the default primary color above we want to tint the color
+ in the light mode, but shade it in the dark mode. This makes the
+ background color more subtle in both use cases.
+
- EUI provides some nifty color functions for auto-adjusting color to pass AA contrast checks.
- Often this is needed when using the base colors on top of each other. Here is an example
- similar to our callouts with a pesky orange.
-
+ EUI provides some nifty color functions for auto-adjusting color to pass AA contrast checks.
+ Often this is needed when using the base colors on top of each other. Here is an example
+ similar to our callouts with a pesky orange.
+
- Consult the larger color guidelines page
- for a better explanation about passing color contrast.
-
- View the
+ Consult the larger color guidelines page
+ for a better explanation about passing color contrast.
+
+ View the EUI provides some helper variables for setting common border types. EUI provides some helper variables for setting common border types. In addition, you can utilize In addition, you can utilize
-
+
- Primarily used in modals and flyouts, the overflow shadows add a white
- glow to subtly hide the content they float above.
-
- Minima reprehenderit aperiam at in ea. Veniam nihil quod tempore.
- Dolores sit quo expedita voluptate libero.
- Consequuntur atque nulla atque nemo tenetur numquam.
- Assumenda aspernatur qui aut sit. Aliquam doloribus iure sint id.
- Possimus dolor qui soluta cum id tempore ea illum.
- Facilis voluptatem aut aut ut similique ut.
- Sed repellendus commodi iure officiis exercitationem praesentium
- dolor. Ratione non ut nulla accusamus et. Optio laboriosam id
- incidunt. Ipsam voluptate ab quia necessitatibus sequi earum
- voluptate. Porro tempore et veritatis quo omnis. Eaque ut libero
- tempore sit placeat maxime laudantium.
- Mollitia tempore minus qui autem modi adipisci ad. Iste reprehenderit
- accusamus voluptatem velit. Quidem delectus eos veritatis et vitae
- et nisi. Doloribus ut corrupti voluptates qui exercitationem dolores.
+ Primarily used in modals and flyouts, the overflow shadows add a white
+ glow to subtly hide the content they float above.
+ Minima reprehenderit aperiam at in ea. Veniam nihil quod tempore.
+ Dolores sit quo expedita voluptate libero.
+ Consequuntur atque nulla atque nemo tenetur numquam.
+ Assumenda aspernatur qui aut sit. Aliquam doloribus iure sint id.
+ Possimus dolor qui soluta cum id tempore ea illum.
+ Facilis voluptatem aut aut ut similique ut.
+ Sed repellendus commodi iure officiis exercitationem praesentium
+ dolor. Ratione non ut nulla accusamus et. Optio laboriosam id
+ incidunt. Ipsam voluptate ab quia necessitatibus sequi earum
+ voluptate. Porro tempore et veritatis quo omnis. Eaque ut libero
+ tempore sit placeat maxime laudantium.
+ Mollitia tempore minus qui autem modi adipisci ad. Iste reprehenderit
+ accusamus voluptatem velit. Quidem delectus eos veritatis et vitae
+ et nisi. Doloribus ut corrupti voluptates qui exercitationem dolores.
+ Most shadow mixins can also accept color. Most shadow mixins can also accept color.
-
- Breakpoints in EUI are provided through the use of a Sass
- mixin
+
+ Breakpoints in EUI are provided through the use of a Sass
+ mixin Target mobile devices only Target mobile and tablets Target mobile devices only Target tablets only Target mobile and tablets Target very wide displays only Target tablets only
-
- EUI utilizes the following constants to maintain a similar 'bounce' to its animations.
- That said, animations are tricky, and if they aren't working for your specific application
- this is the one place where we think it's OK to come up with your own rules.
- Target very wide displays only
+
+ EUI utilizes the following constants to maintain a similar 'bounce' to its animations.
+ That said, animations are tricky, and if they aren't working for your specific application
+ this is the one place where we think it's OK to come up with your own rules.
+
- EUI is written in a
- In general, when writing new SCSS in a project that installs EUI as a dependency
- try to follow these best practices:
-
+ EUI is written in a
+ In general, when writing new SCSS in a project that installs EUI as a dependency
+ try to follow these best practices:
+
- Most EUI based projects should already import the EUI global
- scope. For example, Kibana has its own
- liner that will give you everything on this page.
-
- If you want to construct your own import, you would just need to
- import the following core files into a fresh Sass project.
-
+ Most EUI based projects should already import the EUI global
+ scope. For example, Kibana has its own
+ liner that will give you everything on this page.
+
+ If you want to construct your own import, you would just need to
+ import the following core files into a fresh Sass project.
+ Core variables
- Core variables
+ Sizing
- Sizing
+ Z-index
+ Z-index
+ Color
Color
- Theming patterns
+ Theming patterns
- Color contrast patterns
- Color contrast patterns
+ More on color contrast
- Text sizes
- Text colors
+ More on color contrast
Font families
+ Text sizes
Text colors
+ Font families
+ Use mixins for shadows
- Use mixins for shadows
+ Shadows to create graceful overflows
- Shadows to create graceful overflows
+ Adding color to shadows
- Adding color to shadows
+ Breakpoint sizing
- Breakpoint sizing
+ Mixin usage
- Mixin usage
+ Speed
- Timing
- Speed
+ Timing
+ Component based naming
- Writing Sass the EUI way
-
-
- Component based naming
+ Writing Sass the EUI way
+
+
+ Importing EUI global Sass
- Importing EUI global Sass
+