Skip to content

Commit

Permalink
fix(components): theme tokens reference change
Browse files Browse the repository at this point in the history
  • Loading branch information
owilliams320 committed Jan 22, 2024
1 parent d0fb665 commit 68296de
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libs/components/theme/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '../src/skeleton/skeleton.styles' as skeleton; // TODO - should be a component for text and block
@use './mixins' as theme;

@import '@covalent/tokens';
@use '@covalent/tokens/index.scss' as tokens;

@import '../../icons/covalent-icons.css';

Expand All @@ -12,29 +12,29 @@
// Define the base theme using light tokens w/ dark tokens overriting for prefers-color-scheme:dark
:root {
@include theme.components-theme(
map-get($tokens, light),
map-get($tokens, typography)
map-get(tokens.$tokens, 'light'),
map-get(tokens.$tokens, typography)
);

@media (prefers-color-scheme: dark) {
@include theme.components-theme(
map-get($tokens, dark),
map-get($tokens, typography)
map-get(tokens.$tokens, 'dark'),
map-get(tokens.$tokens, typography)
);
}
}

// For convience re-define theme tokens scoped to a light/dark class
.light {
@include theme.components-theme(
map-get($tokens, light),
map-get($tokens, typography)
map-get(tokens.$tokens, 'light'),
map-get(tokens.$tokens, typography)
);
}

.dark {
@include theme.components-theme(
map-get($tokens, dark),
map-get($tokens, typography)
map-get(tokens.$tokens, 'dark'),
map-get(tokens.$tokens, typography)
);
}

0 comments on commit 68296de

Please sign in to comment.