Skip to content

Commit

Permalink
darkmode color variable update
Browse files Browse the repository at this point in the history
  • Loading branch information
sahkyo committed Nov 25, 2023
1 parent 750192c commit 2c6f09c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
32 changes: 13 additions & 19 deletions src/assets/stylesheets/utilities/_utilities.appearance.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

// White
--color-white: #{hex-var($color-white)};
--color-always-white: #{hex-var($color-white)};

// Bases
--color-base-blue-normal: #{hex-var($color-base-blue-normal)};
Expand Down Expand Up @@ -49,25 +50,20 @@

&--dark {
// Black
--color-black: #{hex-var(invert($color-black))};
--color-black: #{hex-var($color-gray-100)};

// White
--color-white: #{hex-var(invert($color-white))};
--color-white: #{hex-var($color-gray-950)};
--color-always-white: #{hex-var($color-white)};

// Bases
--color-base-blue-normal: #{hex-var(lighten($color-base-blue-normal, 4%))};
--color-base-blue-normal: #{hex-var($color-base-indigo)};
--color-base-blue-dark: #{hex-var(lighten($color-base-blue-dark, 6%))};
--color-base-blue-link: #{hex-var(lighten($color-base-blue-link, 4%))};
--color-base-green-normal: #{hex-var(lighten($color-base-green-normal, 18%))};
--color-base-grey-dark: #{hex-var(
lighten(invert($color-base-grey-dark), 2%)
)};
--color-base-grey-light: #{hex-var(
lighten(invert($color-base-grey-light), 2%)
)};
--color-base-grey-normal: #{hex-var(
lighten(invert($color-base-grey-normal), 4%)
)};
--color-base-grey-dark: #{hex-var($color-gray-100)};
--color-base-grey-light: #{hex-var($color-gray-900)};
--color-base-grey-normal: #{hex-var($color-gray-400)};
--color-base-orange-light: #{hex-var(lighten($color-base-orange-light, 6%))};
--color-base-orange-normal: #{hex-var(
lighten($color-base-orange-normal, 2%)
Expand All @@ -82,20 +78,18 @@
--color-border-primary: #{hex-var(
lighten(invert($color-border-primary), 8%)
)};
--color-border-secondary: #{hex-var(
lighten(invert($color-border-secondary), 4%)
)};
--color-border-secondary: #{hex-var($color-gray-800)};
--color-border-tertiary: #{hex-var(
lighten(invert($color-border-tertiary), 4%)
)};

// Backgrounds
--color-background-primary: #{hex-var(invert($color-background-primary))};
--color-background-secondary: #{hex-var(invert($color-background-secondary))};
--color-background-primary: #{hex-var($color-gray-900)};
--color-background-secondary: #{hex-var($color-gray-900)};

// Texts
--color-text-primary: #{hex-var(invert($color-text-primary))};
--color-text-secondary: #{hex-var(invert($color-text-secondary))};
--color-text-primary: #{hex-var($color-gray-100)};
--color-text-secondary: #{hex-var($color-gray-400)};
--color-text-tertiary: #{hex-var(invert($color-text-tertiary))};
--color-text-reverse: #{hex-var(invert($color-text-reverse))};
}
Expand Down
14 changes: 14 additions & 0 deletions src/assets/stylesheets/variables/_variables.colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,17 @@ $color-text-primary: #000000;
$color-text-secondary: #828993;
$color-text-tertiary: #999fa7;
$color-text-reverse: #ffffff;

// Dark mode
$color-gray-950: #010103;
$color-gray-900: #090b0f;
$color-gray-800: #13181f;
$color-gray-700: #364152;
$color-gray-600: #4B5565;
$color-gray-500: #697586;
$color-gray-400: #9AA4B2;
$color-gray-300: #CDD5DF;
$color-gray-200: #E3E8EF;
$color-gray-100: #EEF2F6;

$color-base-indigo: #3458AD;
2 changes: 1 addition & 1 deletion src/components/base/BasePresence.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ $availabilities: (
}

&#{$c}--active {
background-color: rgb(var(--color-white));
background-color: rgb(var(--color-always-white));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ $c: ".c-form-field";

#{$c}__inner {
background-color: rgb(var(--color-white));
border: 1px solid rgba(var(--color-black), 0.1);
border: 1px solid rgba(var(--color-border-secondary));
outline: 0 none;
color: rgb(var(--color-text-primary));
font-family: inherit;
Expand Down
2 changes: 1 addition & 1 deletion src/components/list/ListButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ $c: ".c-list-button";
}

#{$c}__label {
color: rgb(var(--color-white));
color: rgb(var(--color-always-white));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/list/ListDisclosure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ $c: ".c-list-disclosure";

&--separated {
#{$c}__header {
border-block-end: 1px solid rgba(var(--color-base-grey-normal), 0.2);
border-block-end: 1px solid rgba(var(--color-border-secondary));
padding-block-end: 4px;
}
}
Expand Down

0 comments on commit 2c6f09c

Please sign in to comment.