From 9dbee4c686be83db3b600b095d602c8b60851412 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Fri, 6 Aug 2021 08:32:46 -0400 Subject: [PATCH] add neutral color palette --- docs/assets/plugins/code-block/code-block.css | 22 ++--- docs/assets/plugins/metadata/metadata.js | 6 +- docs/assets/styles/docs.css | 90 ++++++++++--------- docs/components/alert.md | 8 +- docs/components/avatar.md | 2 +- docs/components/badge.md | 10 +-- docs/components/button-group.md | 6 +- docs/components/button.md | 6 +- docs/components/card.md | 2 +- docs/components/dialog.md | 2 +- docs/components/drawer.md | 2 +- docs/components/tag.md | 2 +- docs/getting-started/themes.md | 2 + docs/resources/changelog.md | 8 +- docs/resources/contributing.md | 2 +- docs/tokens/color.md | 51 ++++++----- src/components/alert/alert.styles.ts | 14 +-- src/components/alert/alert.ts | 4 +- src/components/avatar/avatar.styles.ts | 4 +- src/components/badge/badge.styles.ts | 18 ++-- src/components/badge/badge.ts | 4 +- src/components/button/button.styles.ts | 76 ++++++++-------- src/components/button/button.ts | 6 +- src/components/card/card.styles.ts | 4 +- src/components/checkbox/checkbox.styles.ts | 2 +- .../color-picker/color-picker.styles.ts | 12 +-- src/components/details/details.styles.ts | 2 +- .../icon-button/icon-button.styles.ts | 2 +- .../image-comparer/image-comparer.styles.ts | 6 +- src/components/menu-item/menu-item.styles.ts | 6 +- .../menu-label/menu-label.styles.ts | 2 +- .../progress-bar/progress-bar.styles.ts | 4 +- .../progress-ring/progress-ring.styles.ts | 2 +- src/components/radio/radio.styles.ts | 2 +- src/components/range/range.styles.ts | 2 +- src/components/rating/rating.styles.ts | 2 +- src/components/select/select.ts | 4 +- src/components/skeleton/skeleton.styles.ts | 4 +- src/components/spinner/spinner.styles.ts | 2 +- src/components/switch/switch.styles.ts | 24 ++--- src/components/tab-group/tab-group.styles.ts | 2 +- src/components/tab/tab.styles.ts | 2 +- src/components/tag/tag.styles.ts | 8 +- src/components/tag/tag.ts | 4 +- src/themes/base.styles.ts | 74 +++++++-------- src/themes/dark.styles.ts | 4 +- 46 files changed, 265 insertions(+), 258 deletions(-) diff --git a/docs/assets/plugins/code-block/code-block.css b/docs/assets/plugins/code-block/code-block.css index 42532e3b1..0cfa59a0b 100644 --- a/docs/assets/plugins/code-block/code-block.css +++ b/docs/assets/plugins/code-block/code-block.css @@ -1,21 +1,21 @@ .code-block { position: relative; border-radius: 3px; - background-color: rgb(var(--sl-color-gray-50)); + background-color: rgb(var(--sl-color-neutral-50)); margin-bottom: 1.5rem; } .sl-theme-dark .code-block { - background-color: rgb(var(--sl-color-gray-200)); + background-color: rgb(var(--sl-color-neutral-200)); } .code-block__preview { position: relative; - border: solid 1px rgb(var(--sl-color-gray-200)); + border: solid 1px rgb(var(--sl-color-neutral-200)); border-bottom: none; border-top-left-radius: 3px; border-top-right-radius: 3px; - background-color: rgb(var(--sl-color-empty)); + background-color: rgb(var(--sl-color-1000)); min-width: 20rem; max-width: 100%; padding: 1.5rem 3.25rem 1.5rem 1.5rem; @@ -43,9 +43,9 @@ bottom: 0; width: 1.75rem; font-size: 20px; - color: rgb(var(--sl-color-gray-500)); - background-color: rgb(var(--sl-color-empty)); - border-left: solid 1px rgb(var(--sl-color-gray-200)); + color: rgb(var(--sl-color-neutral-500)); + background-color: rgb(var(--sl-color-1000)); + border-left: solid 1px rgb(var(--sl-color-neutral-200)); border-top-right-radius: 3px; cursor: ew-resize; transition: 250ms background-color; @@ -71,7 +71,7 @@ } .code-block__source { - border: solid 1px rgb(var(--sl-color-gray-200)); + border: solid 1px rgb(var(--sl-color-neutral-200)); border-bottom: none; border-radius: 0 !important; margin: 0; @@ -94,13 +94,13 @@ justify-content: center; width: 100%; height: 2.5rem; - border: solid 1px rgb(var(--sl-color-gray-200)); + border: solid 1px rgb(var(--sl-color-neutral-200)); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; - background: rgb(var(--sl-color-empty)); + background: rgb(var(--sl-color-1000)); font: inherit; font-size: 0.875rem; - color: rgb(var(--sl-color-gray-600)); + color: rgb(var(--sl-color-neutral-600)); cursor: pointer; transition: 250ms background-color; -webkit-appearance: none; diff --git a/docs/assets/plugins/metadata/metadata.js b/docs/assets/plugins/metadata/metadata.js index b03cc44d0..852d510e5 100644 --- a/docs/assets/plugins/metadata/metadata.js +++ b/docs/assets/plugins/metadata/metadata.js @@ -315,10 +315,10 @@ return next(content); } - let badgeType = 'info'; + let badgeType = 'neutral'; if (component.status === 'stable') badgeType = 'primary'; if (component.status === 'experimental') badgeType = 'warning'; - if (component.status === 'planned') badgeType = 'info'; + if (component.status === 'planned') badgeType = 'neutral'; if (component.status === 'deprecated') badgeType = 'danger'; result += ` @@ -328,7 +328,7 @@
- + Since ${component.since || '?'} diff --git a/docs/assets/styles/docs.css b/docs/assets/styles/docs.css index b4df7dd7e..c7fcc7aaf 100644 --- a/docs/assets/styles/docs.css +++ b/docs/assets/styles/docs.css @@ -13,8 +13,8 @@ body { font-size: var(--sl-font-size-medium); font-weight: var(--sl-font-weight-normal); letter-spacing: var(--sl-letter-spacing-normal); - background-color: rgb(var(--sl-color-empty)); - color: rgb(var(--sl-color-gray-800)); + background-color: rgb(var(--sl-color-1000)); + color: rgb(var(--sl-color-neutral-800)); line-height: var(--sl-line-height-normal); } @@ -28,8 +28,8 @@ strong { /* Sidebar */ .sidebar { - background: rgb(var(--sl-color-empty)); - border-right: solid 1px rgb(var(--sl-color-gray-200)); + background: rgb(var(--sl-color-1000)); + border-right: solid 1px rgb(var(--sl-color-neutral-200)); } .sidebar .app-name { @@ -40,7 +40,7 @@ strong { .sidebar-version { font-size: var(--sl-font-size-x-small); font-weight: var(--sl-font-weight-normal); - color: rgb(var(--sl-color-gray-400)); + color: rgb(var(--sl-color-neutral-400)); text-align: right; padding: 0 var(--sl-spacing-small); margin: -1.25rem 0 0.6rem 0; @@ -68,6 +68,10 @@ strong { transition: var(--sl-transition-fast) color, var(--sl-transition-fast) border, var(--sl-transition-fast) box-shadow; } +.sidebar .search input[type='search']::placeholder { + color: rgb(var(--sl-input-placeholder-color)); +} + .sidebar .search input[type='search']:hover { background-color: rgb(var(--sl-input-background-color-hover)); border-color: rgb(var(--sl-input-border-color-hover)); @@ -101,11 +105,11 @@ strong { } .sidebar .clear-button svg circle { - fill: rgb(var(--sl-color-gray-400)); + fill: rgb(var(--sl-color-neutral-400)); } .sidebar .clear-button svg path { - stroke: rgb(var(--sl-color-empty)); + stroke: rgb(var(--sl-color-1000)); } .sidebar .clear-button:focus { @@ -117,7 +121,7 @@ strong { } .search .matching-post { - border-bottom: solid 1px rgb(var(--sl-color-gray-500)) !important; + border-bottom: solid 1px rgb(var(--sl-color-neutral-500)) !important; padding: 0.25rem 1.5rem; } @@ -142,7 +146,7 @@ strong { width: 2rem; height: 2rem; border-radius: var(--sl-border-radius-medium); - background-color: rgb(var(--sl-color-empty)); + background-color: rgb(var(--sl-color-1000)); padding: 0.5rem; } @@ -188,7 +192,7 @@ strong { .sidebar li > p { font-weight: var(--sl-font-weight-bold); - border-bottom: solid 1px rgb(var(--sl-color-gray-200)); + border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); margin: 0 0.75rem 0.5rem 0; } @@ -269,12 +273,12 @@ strong { } .anchor span { - color: rgb(var(--sl-color-full)); + color: rgb(var(--sl-color-0)); } .markdown-section blockquote { position: relative; - border-left: solid 4px rgb(var(--sl-color-gray-200)); + border-left: solid 4px rgb(var(--sl-color-neutral-200)); font-style: italic; padding: 1rem 1.5rem; margin: 0 0 1rem 0; @@ -298,7 +302,7 @@ strong { } .docsify-pagination-container { - border-top-color: rgb(var(--sl-color-gray-200)) !important; + border-top-color: rgb(var(--sl-color-neutral-200)) !important; } .markdown-section h1, @@ -317,7 +321,7 @@ strong { .markdown-section h2 { font-size: var(--sl-font-size-x-large); - border-bottom: solid 1px rgb(var(--sl-color-gray-200)); + border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); margin-top: 2rem; } @@ -348,39 +352,39 @@ strong { .markdown-section code { font-family: var(--sl-font-mono); font-size: 87.5%; - background-color: rgb(var(--sl-color-gray-50)); + background-color: rgb(var(--sl-color-neutral-50)); border-radius: var(--sl-border-radius-small); padding: 2px 4px; } .sl-theme-dark .markdown-section code { - background-color: rgb(var(--sl-color-gray-100)); + background-color: rgb(var(--sl-color-neutral-100)); } .markdown-section kbd { font-family: var(--sl-font-mono); font-size: 87.5%; border-radius: var(--sl-border-radius-small); - border: solid 1px rgb(var(--sl-color-gray-200)); + border: solid 1px rgb(var(--sl-color-neutral-200)); padding: 2px 4px; } /* Code blocks */ .markdown-section pre { position: relative; - background-color: rgb(var(--sl-color-gray-50)); + background-color: rgb(var(--sl-color-neutral-50)); border-radius: var(--sl-border-radius-medium); } .sl-theme-dark .markdown-section pre { - background-color: rgb(var(--sl-color-gray-100)); + background-color: rgb(var(--sl-color-neutral-100)); } .markdown-section pre > code { display: block; background: none; border-radius: 0; - color: rgb(var(--sl-color-gray-700)); + color: rgb(var(--sl-color-neutral-700)); padding: var(--sl-spacing-medium); overflow: auto; hyphens: none; @@ -388,18 +392,18 @@ strong { } .markdown-section pre .token.comment { - color: rgb(var(--sl-color-gray-400)); + color: rgb(var(--sl-color-neutral-400)); } .markdown-section pre .token.prolog, .markdown-section pre .token.doctype, .markdown-section pre .token.cdata, .markdown-section pre .token.operator { - color: rgb(var(--sl-color-gray-600)); + color: rgb(var(--sl-color-neutral-600)); } .markdown-section pre .token.punctuation { - color: rgb(var(--sl-color-gray-600)); + color: rgb(var(--sl-color-neutral-600)); } .namespace { @@ -466,11 +470,11 @@ strong { } .markdown-section tr:nth-child(2n) { - background: rgb(var(--sl-color-gray-50)); + background: rgb(var(--sl-color-neutral-50)); } .sl-theme-dark .markdown-section tr:nth-child(2n) { - background: rgb(var(--sl-color-gray-100)); + background: rgb(var(--sl-color-neutral-100)); } .markdown-section th { @@ -480,8 +484,8 @@ strong { } .markdown-section td { - border-top: solid 1px rgb(var(--sl-color-gray-200)); - border-bottom: solid 1px rgb(var(--sl-color-gray-200)); + border-top: solid 1px rgb(var(--sl-color-neutral-200)); + border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); border-left: none; border-right: none; } @@ -499,7 +503,7 @@ strong { .markdown-section p.tip, .markdown-section p.warn { position: relative; - background-color: rgb(var(--sl-color-gray-50)); + background-color: rgb(var(--sl-color-neutral-50)); border-left: solid 4px transparent; border-radius: var(--sl-border-radius-medium); padding-left: 1.5rem; @@ -507,14 +511,14 @@ strong { .sl-theme-dark .markdown-section p.tip, .sl-theme-dark .markdown-section p.warn { - background-color: rgb(var(--sl-color-gray-100)); + background-color: rgb(var(--sl-color-neutral-100)); } .markdown-section p.tip:before, .markdown-section p.warn:before { content: '!'; border-radius: 100%; - color: rgb(var(--sl-color-empty)); + color: rgb(var(--sl-color-1000)); font-size: 14px; font-weight: bold; left: -12px; @@ -544,12 +548,12 @@ strong { .markdown-section p.tip code, .markdown-section p.warn code { - background-color: rgb(var(--sl-color-gray-100)); + background-color: rgb(var(--sl-color-neutral-100)); } /* Component headers */ .component-header { - border-bottom: solid 1px rgb(var(--sl-color-gray-200)); + border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); padding-bottom: 2rem; margin-top: -1rem; margin-bottom: 2rem; @@ -563,7 +567,7 @@ strong { .component-header__tag code { background: none; - color: rgb(var(--sl-color-gray-500)); + color: rgb(var(--sl-color-neutral-500)); font-size: var(--sl-font-size-large); padding: 0; margin: 0; @@ -590,15 +594,15 @@ strong { html .repo-button { display: inline-flex; align-items: center; - background-color: rgb(var(--sl-color-empty)); - border: solid 1px rgb(var(--sl-color-gray-200)); + background-color: rgb(var(--sl-color-1000)); + border: solid 1px rgb(var(--sl-color-neutral-200)); border-radius: var(--sl-border-radius-medium); box-shadow: var(--sl-shadow-x-small); font-size: var(--sl-font-size-small); font-weight: var(--sl-font-weight-semibold); line-height: 2; text-decoration: none; - color: rgb(var(--sl-color-gray-700)); + color: rgb(var(--sl-color-neutral-700)); padding: var(--sl-spacing-xx-small) var(--sl-spacing-small); margin-bottom: var(--sl-spacing-xx-small); transition: 0.25s all; @@ -606,12 +610,12 @@ html .repo-button { html .repo-button:hover { text-decoration: none; - background-color: rgb(var(--sl-color-gray-50)); - border: solid 1px rgb(var(--sl-color-gray-200)); + background-color: rgb(var(--sl-color-neutral-50)); + border: solid 1px rgb(var(--sl-color-neutral-200)); } .sl-theme-dark .repo-button:hover { - background-color: rgb(var(--sl-color-gray-100)); + background-color: rgb(var(--sl-color-neutral-100)); } html .repo-button:focus { @@ -640,7 +644,7 @@ html .repo-button--sponsor sl-icon { } html .repo-button--github sl-icon { - color: rgb(var(--sl-color-gray-600)); + color: rgb(var(--sl-color-neutral-600)); } html .repo-button--twitter sl-icon { @@ -662,7 +666,7 @@ body[data-page^='tokens/'] .table-wrapper td:first-child code { /* Transition demo */ .transition-demo { position: relative; - background: rgb(var(--sl-color-gray-200)); + background: rgb(var(--sl-color-neutral-200)); width: 8rem; height: 2rem; } @@ -691,7 +695,7 @@ body[data-page^='tokens/'] .table-wrapper td:first-child code { /* Elevation dmeo */ .elevation-demo { - background: rgb(var(--sl-color-empty)); + background: rgb(var(--sl-color-1000)); border-radius: 3px; width: 4rem; height: 4rem; @@ -727,7 +731,7 @@ body[data-page^='tokens/'] .table-wrapper td:first-child code { } .color-palette__swatch--border { - box-shadow: inset 0 0 0 1px rgb(var(--sl-color-full) / 10%); + box-shadow: inset 0 0 0 1px rgb(var(--sl-color-0) / 10%); } @media screen and (max-width: 1200px) { diff --git a/docs/components/alert.md b/docs/components/alert.md index c113e9bd9..c9f0ccada 100644 --- a/docs/components/alert.md +++ b/docs/components/alert.md @@ -36,7 +36,7 @@ Set the `type` attribute to change the alert's type.
- + Your settings have been updated
Settings will take affect on next login. @@ -126,7 +126,7 @@ You should always use the `closable` attribute so users can dismiss the notifica
Primary Success - Info + Info Warning Danger @@ -142,7 +142,7 @@ You should always use the `closable` attribute so users can dismiss the notifica You can safely exit the app now. - + Your settings have been updated
Settings will take affect on next login. @@ -164,7 +164,7 @@ You should always use the `closable` attribute so users can dismiss the notifica