style: update colors

This commit is contained in:
Lucas Larroche 2022-12-26 11:35:56 +07:00
parent 52e1072a08
commit 6ade871f3f
20 changed files with 892 additions and 756 deletions

View file

@ -1,5 +1,5 @@
@use "sass:map";
@use "colors" as *;
@use "../../../node_modules/@picocss/colors/scss/colors" as *;
@use "../../settings" as *;
@use "../../utils/box-shadow";
@use "../../utils/functions";
@ -9,50 +9,68 @@
#{$✨}background-color: #{$white};
// Text color
#{$✨}color: #{$grey-700};
#{$✨}color: #{$zinc-750};
// Muted colors
#{$✨}muted-color: #{$grey-500};
#{$✨}muted-border-color: #{$grey-50};
#{$✨}muted-color: #{$zinc-550};
#{$✨}muted-border-color: #{mix($slate-100, $slate-50)};
// Primary colors
#{$✨}primary: #{$primary-600};
#{$✨}primary-hover: #{$primary-700};
#{$✨}primary-focus: #{rgba($primary-600, 0.125)};
#{$✨}primary: #{$azure-550};
#{$✨}primary-hover: #{$azure-600};
#{$✨}primary-underline: #{rgba($azure-550, 0.5)};
#{$✨}primary-underline-hover: var(#{$}primary);
#{$✨}primary-background: #{$azure-550};
#{$✨}primary-background-hover: #{$azure-600};
#{$✨}primary-border: var(#{$}primary-background);
#{$✨}primary-border-hover: var(#{$}primary-background-hover);
#{$✨}primary-focus: #{rgba($azure-400, 0.25)};
#{$✨}primary-inverse: #{$white};
// Secondary colors
#{$✨}secondary: #{$grey-600};
#{$✨}secondary-hover: #{$grey-700};
#{$✨}secondary-focus: #{rgba($grey-600, 0.125)};
#{$✨}secondary: #{$slate-550};
#{$✨}secondary-hover: #{$slate-600};
#{$✨}secondary-underline: #{rgba($slate-550, 0.5)};
#{$✨}secondary-underline-hover: var(#{$}secondary);
#{$✨}secondary-background: #{$slate-550};
#{$✨}secondary-background-hover: #{$slate-600};
#{$✨}secondary-border: var(#{$}secondary-background);
#{$✨}secondary-border-hover: var(#{$}secondary-background-hover);
#{$✨}secondary-focus: #{rgba($slate-550, 0.25)};
#{$✨}secondary-inverse: #{$white};
// Contrast colors
#{$✨}contrast: #{$grey-900};
#{$✨}contrast-hover: #{$black};
#{$✨}contrast-focus: #{rgba($grey-600, 0.125)};
#{$✨}contrast: #{$slate-900};
#{$✨}contrast-hover: #{$slate-950};
#{$✨}contrast-underline: #{rgba($slate-900, 0.5)};
#{$✨}contrast-underline-hover: var(#{$}secondary);
#{$✨}contrast-background: #{$slate-900};
#{$✨}contrast-background-hover: #{$black};
#{$✨}contrast-border: var(#{$}contrast-background);
#{$✨}contrast-border-hover: var(#{$}contrast-background-hover);
#{$✨}contrast-focus: #{rgba($slate-550, 0.25)};
#{$✨}contrast-inverse: #{$white};
// Box shadow
#{$✨}box-shadow: box-shadow.shadow($grey-900);
#{$✨}box-shadow: box-shadow.shadow($slate-500);
// Typography
@if map.get($modules, "content/typography") {
// Headings colors
#{$✨}h1-color: #{$grey-900};
#{$✨}h2-color: #{mix($grey-900, $grey-800)};
#{$✨}h3-color: #{$grey-800};
#{$✨}h4-color: #{mix($grey-800, $grey-700)};
#{$✨}h5-color: #{$grey-700};
#{$✨}h6-color: #{mix($grey-700, $grey-600)};
#{$✨}h1-color: #{$zinc-800};
#{$✨}h2-color: #{$zinc-750};
#{$✨}h3-color: #{$zinc-700};
#{$✨}h4-color: #{$zinc-650};
#{$✨}h5-color: #{$zinc-600};
#{$✨}h6-color: #{$zinc-550};
// Highlighted text (<mark>)
#{$✨}mark-background-color: #{mix($amber-100, $amber-50)};
#{$✨}mark-color: #{mix($grey-900, $amber-900, 75%)};
#{$✨}mark-color: #{$zinc-950};
// Inserted (<ins>) & Deleted (<ins>)
#{$✨}ins-color: #{$green-700};
#{$✨}del-color: #{$red-800};
#{$✨}ins-color: #{$jade-600};
#{$✨}del-color: #{$red-650};
// Blockquote
#{$✨}blockquote-border-color: var(#{$}muted-border-color);
@ -70,55 +88,56 @@
// Table
@if map.get($modules, "content/table") {
#{$✨}table-border-color: var(#{$}muted-border-color);
#{$✨}table-row-stripped-background-color: #{mix($grey-50, $white)};
#{$✨}table-row-stripped-background-color: #{rgba($zinc-500, 0.0375)};
}
// Code
@if map.get($modules, "content/code") {
#{$✨}code-background-color: #{$grey-50};
#{$✨}code-background-color: #{mix($slate-50, $white, 25%)};
#{$✨}code-color: var(#{$}muted-color);
#{$✨}code-kbd-background-color: var(#{$}contrast);
#{$✨}code-kbd-color: var(#{$}contrast-inverse);
#{$✨}code-tag-color: #{hsl(330, 40%, 50%)};
#{$✨}code-property-color: #{hsl(185, 40%, 40%)};
#{$✨}code-value-color: #{hsl(40, 20%, 50%)};
#{$✨}code-comment-color: #{$grey-300};
#{$✨}code-kbd-background-color: var(#{$}color);
#{$✨}code-kbd-color: var(#{$}background-color);
}
// Form elements
@if map.get($modules, "forms/basics") {
#{$✨}form-element-background-color: transparent;
#{$✨}form-element-border-color: #{$grey-300};
#{$✨}form-element-color: var(#{$}color);
#{$✨}form-element-background-color: #{mix($slate-50, $white, 25%)};
#{$✨}form-element-border-color: #{$slate-150};
#{$✨}form-element-color: #{$zinc-850};
#{$✨}form-element-placeholder-color: var(#{$}muted-color);
#{$✨}form-element-active-background-color: transparent;
#{$✨}form-element-active-border-color: var(#{$}primary);
#{$✨}form-element-focus-color: var(#{$}primary-focus);
#{$✨}form-element-disabled-background-color: #{$grey-100};
#{$✨}form-element-disabled-border-color: #{$grey-300};
#{$✨}form-element-active-background-color: #{$white};
#{$✨}form-element-active-border-color: var(#{$}primary-border);
#{$✨}form-element-focus-color: var(#{$}primary-border);
#{$✨}form-element-disabled-background-color: var(#{$}form-element-background-color);
#{$✨}form-element-disabled-border-color: var(#{$}form-element-border-color);
#{$✨}form-element-disabled-opacity: 0.5;
#{$✨}form-element-invalid-border-color: #{$red-800};
#{$✨}form-element-invalid-active-border-color: #{$red-700};
#{$✨}form-element-invalid-focus-color: #{rgba($red-700, 0.125)};
#{$✨}form-element-valid-border-color: #{$green-700};
#{$✨}form-element-valid-active-border-color: #{$green-600};
#{$✨}form-element-valid-focus-color: #{rgba($green-600, 0.125)};
#{$✨}form-element-invalid-border-color: #{$red-600};
#{$✨}form-element-invalid-active-border-color: #{$red-650};
#{$✨}form-element-invalid-focus-color: var(#{$}form-element-invalid-active-border-color);
#{$✨}form-element-valid-border-color: #{$jade-500};
#{$✨}form-element-valid-active-border-color: #{$jade-550};
#{$✨}form-element-valid-focus-color: var(#{$}form-element-valid-active-border-color);
// Focus for buttons, radio and select
input:is([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [type="file"]) {
#{$✨}form-element-focus-color: var(#{$}primary-focus);
}
}
// Switch (input[type="checkbox"][role="switch"])
@if map.get($modules, "forms/checkbox-radio-switch") {
#{$✨}switch-background-color: #{$grey-200};
#{$✨}switch-background-color: #{$slate-200};
#{$✨}switch-color: var(#{$}primary-inverse);
#{$✨}switch-checked-background-color: var(#{$}primary);
#{$✨}switch-checked-background-color: var(#{$}primary-background);
}
// Range (input[type="range"])
@if map.get($modules, "forms/input-range") {
#{$✨}range-border-color: #{$grey-100};
#{$✨}range-active-border-color: #{$grey-200};
#{$✨}range-border-color: #{$slate-100};
#{$✨}range-active-border-color: #{$slate-200};
#{$✨}range-thumb-border-color: var(#{$}background-color);
#{$✨}range-thumb-color: var(#{$}secondary);
#{$✨}range-thumb-hover-color: var(#{$}secondary-hover);
#{$✨}range-thumb-color: var(#{$}secondary-background);
#{$✨}range-thumb-hover-color: var(#{$}secondary-background-hover);
#{$✨}range-thumb-active-color: var(#{$}primary);
}
@ -135,16 +154,16 @@
#{$✨}card-background-color: var(#{$}background-color);
#{$✨}card-border-color: var(#{$}muted-border-color);
#{$✨}card-box-shadow: var(#{$}box-shadow);
#{$✨}card-sectionning-background-color: #{mix($grey-50, $white, 25%)};
#{$✨}card-sectionning-background-color: #{mix($slate-50, $white, 25%)};
}
// Dropdown (<details role="list">)
@if map.get($modules, "components/dropdown") {
#{$✨}dropdown-background-color: #{mix($grey-50, $white, 25%)};
#{$✨}dropdown-border-color: #{mix($grey-100, $grey-50)};
#{$✨}dropdown-background-color: #{$white};
#{$✨}dropdown-border-color: #{$slate-50};
#{$✨}dropdown-box-shadow: var(#{$}box-shadow);
#{$✨}dropdown-color: var(#{$}color);
#{$✨}dropdown-hover-background-color: #{$grey-50};
#{$✨}dropdown-hover-background-color: #{mix($slate-50, $white)};
}
// Loading ([aria-busy=true])
@ -154,18 +173,18 @@
// Modal (<dialog>)
@if map.get($modules, "components/modal") {
#{$✨}modal-overlay-background-color: #{rgba($grey-100, 0.7)};
#{$✨}modal-overlay-background-color: #{rgba($slate-50, 0.7)};
}
// Progress
@if map.get($modules, "components/progress") {
#{$✨}progress-background-color: #{$grey-100};
#{$✨}progress-color: var(#{$}primary);
#{$✨}progress-background-color: #{$slate-100};
#{$✨}progress-color: var(#{$}primary-background);
}
// Tooltip ([data-tooltip])
@if map.get($modules, "components/tooltip") {
#{$✨}tooltip-background-color: var(#{$}contrast);
#{$✨}tooltip-background-color: var(#{$}contrast-background);
#{$✨}tooltip-color: var(#{$}contrast-inverse);
}
@ -176,35 +195,35 @@
}
// Chevron icons
@if map.get($modules, "forms/basic") or
@if map.get($modules, "forms/basics") or
map.get($modules, "components/accordion") or
map.get($modules, "components/dropdown")
{
#{$✨}icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($grey-700)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-chevron-button: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($white)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-chevron-button-inverse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($white)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($zinc-400)}' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-chevron-button: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($white)}' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-chevron-button-inverse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($white)}' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
// Datetime icons
@if map.get($modules, "input-date") {
#{$✨}icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($grey-700)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
#{$✨}icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($grey-700)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
@if map.get($modules, "forms/input-date") {
#{$✨}icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($zinc-400)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
#{$✨}icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($zinc-400)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}
// Form validation icons
@if map.get($modules, "forms/basic") {
#{$✨}icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($green-700)}' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($red-800)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
@if map.get($modules, "forms/basics") {
#{$✨}icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($jade-500)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
#{$✨}icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($red-600)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
}
// Search icon
@if map.get($modules, "forms/input-search") {
#{$✨}icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($grey-700)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
#{$✨}icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($zinc-400)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}
// Close icon
@if map.get($modules, "components/modal") {
#{$✨}icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($grey-500)}' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
#{$✨}icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb($zinc-400)}' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}
// Document