PeculiarVentures / peculiar-react-components

https://peculiarventures.github.io/peculiar-react-components/
MIT License
2 stars 3 forks source link

Add an ability to dynamically change colors of `HighlightCode` component #103

Closed p1nta closed 2 years ago

p1nta commented 2 years ago

According to https://github.com/PeculiarVentures/hancock-app/issues/5291 we want to have different colors of highlighted code examples on dark and light modes of Hancock. Currently, it's impossible because colors for these elements are set by hex value in the theme file. We can solve it by using CSS variables to apply colors instead of hardcoded values. Now to style the code example we are using the next colors variables:

  1. highlightCodeColor
  2. highlightCodeBorderColor
  3. highlightCodeBackgroundColor
  4. highlightCodeColorComment
  5. highlightCodeColorKeyword
  6. highlightCodeColorPunctuation
  7. highlightCodeColorProperty
  8. highlightCodeColorSelector
  9. highlightCodeColorOperator
  10. highlightCodeColorFunction
  11. highlightCodeColorVariable
donskov commented 2 years ago

@p1nta Did you like the changes and can we close this issue?

p1nta commented 2 years ago

@donskov ❤️