Skip to content

Commit

Permalink
BREAKING CHANGE(web): Set default color to body and each theme selector
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Aug 29, 2024
1 parent 687ade6 commit e4b2f63
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/web/src/scss/foundation/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// 1. We are able to handle our text sizing ourselves, disable any auto adjustments.
// 2. We need to apply a global color to all elements in order to make the theme work.
// Otherwise, we would have to apply the color to every single element in the project.
// 2. Reapply the default text color to all elements with a class starting with
// #{globals.$prefix}theme- to ensure proper color inheritance for theming.

@use '@global' as global-tokens;
@use '../settings/globals';
Expand All @@ -12,9 +12,11 @@

:where(body) {
@include typography.generate(global-tokens.$body-3-regular);

color: var(--#{globals.$prefix}color-text-primary);
}

// stylelint-disable-next-line selector-max-universal -- 2.
* {
// 2.
:where([class*='#{globals.$prefix}theme-']) {
color: var(--#{globals.$prefix}color-text-primary);
}

0 comments on commit e4b2f63

Please sign in to comment.