Skip to content

Commit

Permalink
feat: expose tokens as CSS custom properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tillywoodfield committed Jun 25, 2024
1 parent d5e5611 commit 1ddaa46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/scss/iati.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
@use "sass:meta";
@use "base";
@use "tokens";
@use "typography";
@use "components";
@use "layout";

// Expose tokens for use in downstream applications
// Expose tokens as Sass variables
@forward "tokens";

// Expose tokens as CSS custom properties
:root {
@each $name, $value in meta.module-variables("tokens") {
--#{$name}: #{$value};
}
}
8 changes: 8 additions & 0 deletions src/scss/tokens/_color.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
$color-blue-10: #f0feff;
$color-blue-20: #b6f6f9;
$color-blue-30: #7bedf2;
$color-blue-40: #41e4eb;
$color-blue-50: #06dbe4;
$color-blue-60: #09b6bd;
$color-blue-70: #0b9095;
$color-blue-80: #0e6a6e;
$color-blue-90: #104446;

$color-teal-10: #e6f9fe;
$color-teal-20: #cae6ef;
Expand Down

0 comments on commit 1ddaa46

Please sign in to comment.