elastic / eui

Elastic UI Framework 🙌
https://eui.elastic.co/
Other
54 stars 841 forks source link

[Visual Refresh] Setup semantic color tokens #8097

Closed mgadewoll closed 3 weeks ago

mgadewoll commented 1 month ago

Summary

closes https://github.com/elastic/eui-private/issues/125 closes https://github.com/elastic/eui-private/issues/126

This PR implements the base setup for colors tokens. The main idea is to remove our dependency on color calculations and use direct token values instead. To ensure this works in both themes we lift the old color calculations up to the theme definitions level. Additionally all existing tokens are kept to ensure backwards compatibility and the values were updated for the new theme to match expected output.

The token naming is mapped to variables in Figma.

The implemented theme structure:

{
  colors, <- updated with more tokens
  base,
  size,
  border,
  font,
  animation,
  breakpoint,
  levels,
  focus,
  components <- NEW
}

The colors key now holds a lot more color tokens. These new tokens are (grouped):

The components key contains:

Changes

[!IMPORTANT] This update does not include an update to the static JSON token files.

QA

kibanamachine commented 3 weeks ago

Preview staging links for this PR:

elasticmachine commented 3 weeks ago

:green_heart: Build Succeeded

History

tkajtoch commented 3 weeks ago

I'm happy with the latest changes. LGTM!