-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement workaround for sass-export npm
- Loading branch information
Showing
5 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
---------------------------------------------------------------------------- | ||
Color settings. | ||
1. Copied from the CSS Custom properties in 'base/colors.css', ans converted to Sass variables. | ||
2. The 'sass-export' Node package then correctly exports all the colors as JSON for consumption by Storybook. | ||
3. This file is NOT imported so is NOT part of the Parcel build. | ||
TODO: | ||
- Write custom Node script to convert CSS into JSON without the manual copy/paste step into this Sass file. | ||
---------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* @sass-export-section="main theme colours" | ||
*/ | ||
$color-brand: hsl(var(--color-brand)); | ||
$color-text: hsl(var(--color-text)); | ||
$color-background: hsl(var(--color-background)); | ||
|
||
/** | ||
* @sass-export-section="neutral colours" | ||
*/ | ||
$color-neutral-900: hsl(var(--color-neutral-900)); | ||
$color-neutral-100: hsl(var(--color-neutral-100)); | ||
|
||
/** | ||
* @sass-export-section="other accent colours" | ||
*/ | ||
$color-success: hsl(var(--color-accent-positive)); | ||
$color-error: hsl(var(--color-accent-negative)); | ||
$color-notify: hsl(var(--color-accent-neutral)); | ||
$color-focus: hsl(var(--color-focus)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters