Skip to content

Commit

Permalink
use light-dark() function
Browse files Browse the repository at this point in the history
  • Loading branch information
basher committed Nov 14, 2024
1 parent cc41796 commit c927cc8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ui/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "web-ui-boilerplate",
"description": "UI boilerplate for websites/webapps using vanilla HTML/CSS/JavaScript, powered by Storybook, bundled by Parcel.",
"author": "basher",
"version": "4.0.3",
"version": "4.0.4",
"license": "ISC",
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions ui/src/css/base/colors-to-json.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TODO:
/**
* @sass-export-section="main theme colours"
*/
$color-primary-100: hsl(var(--webui-color-brand) / 20%);
$color-primary-100: hsl(var(--webui-color-brand) / 30%);
$color-primary-500: hsl(var(--webui-color-brand));

/**
Expand All @@ -29,10 +29,10 @@ $color-neutral-darkest: hsl(var(--webui-color-neutral-900));
/**
* @sass-export-section="other accent colours"
*/
$color-success-100: hsl(var(--webui-color-accent-positive) / 10%);
$color-success-100: hsl(var(--webui-color-accent-positive) / 30%);
$color-success-500: hsl(var(--webui-color-accent-positive));
$color-error-100: hsl(var(--webui-color-accent-negative) / 10%);
$color-error-100: hsl(var(--webui-color-accent-negative) / 30%);
$color-error-500: hsl(var(--webui-color-accent-negative));
$color-notify-100: hsl(var(--webui-color-accent-neutral) / 10%);
$color-notify-100: hsl(var(--webui-color-accent-neutral) / 30%);
$color-notify-500: hsl(var(--webui-color-accent-neutral));
$color-focus: hsl(var(--webui-color-state-focus));
7 changes: 5 additions & 2 deletions ui/src/css/global/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ html {
scroll-behavior: smooth;
}

background-color: Canvas;
color: CanvasText;
background-color: light-dark(
var(--color-neutral-lightest),
var(--color-neutral-dark)
);
color: light-dark(var(--color-neutral-darkest), var(--color-neutral-light));
min-block-size: 100vh; /* 100dvb might have performance implications */
}

Expand Down

0 comments on commit c927cc8

Please sign in to comment.