Skip to content

Commit

Permalink
fix(angular): update tokens reference
Browse files Browse the repository at this point in the history
  • Loading branch information
owilliams320 committed Jan 19, 2024
1 parent ec6b352 commit d0fb665
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions libs/components/theme/theme.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@use '../../tokens/_generated/_index.scss' as variables;
@use '../src/icon/icon' as icon;
@use '../src/skeleton/skeleton.styles' as skeleton; // TODO - should be a component for text and block
@use './mixins' as theme;

@import '@covalent/tokens';

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

@include icon.core-styles(); // TODO - include future support in icons css
Expand All @@ -11,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(variables.$tokens, light),
map-get(variables.$tokens, typography)
map-get($tokens, light),
map-get($tokens, typography)
);

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

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

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

0 comments on commit d0fb665

Please sign in to comment.