diff --git a/docs/assets/plugins/code-block/code-block.css b/docs/assets/plugins/code-block/code-block.css index 2991db2b5..ef6b54fdd 100644 --- a/docs/assets/plugins/code-block/code-block.css +++ b/docs/assets/plugins/code-block/code-block.css @@ -1,17 +1,17 @@ .code-block { position: relative; border-radius: 3px; - background-color: rgb(var(--sl-color-neutral-50)); + background-color: var(--sl-color-neutral-50); margin-bottom: 1.5rem; } .code-block__preview { position: relative; - border: solid 1px rgb(var(--sl-color-neutral-200)); + border: solid 1px var(--sl-color-neutral-200); border-bottom: none; border-top-left-radius: 3px; border-top-right-radius: 3px; - background-color: rgb(var(--sl-color-neutral-0)); + background-color: var(--sl-color-neutral-0); min-width: 20rem; max-width: 100%; padding: 1.5rem 3.25rem 1.5rem 1.5rem; @@ -39,9 +39,9 @@ bottom: 0; width: 1.75rem; font-size: 20px; - color: rgb(var(--sl-color-neutral-600)); - background-color: rgb(var(--sl-color-neutral-0)); - border-left: solid 1px rgb(var(--sl-color-neutral-200)); + color: var(--sl-color-neutral-600); + background-color: var(--sl-color-neutral-0); + border-left: solid 1px var(--sl-color-neutral-200); border-top-right-radius: 3px; cursor: ew-resize; transition: 250ms background-color; @@ -58,7 +58,7 @@ } .code-block__source { - border: solid 1px rgb(var(--sl-color-neutral-200)); + border: solid 1px var(--sl-color-neutral-200); border-bottom: none; border-radius: 0 !important; display: none; @@ -74,7 +74,7 @@ .code-block__buttons { position: relative; - border: solid 1px rgb(var(--sl-color-neutral-200)); + border: solid 1px var(--sl-color-neutral-200); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; display: flex; @@ -86,18 +86,18 @@ min-width: 2.5rem; border: none; border-radius: 0; - background: rgb(var(--sl-color-neutral-0)); + background: var(--sl-color-neutral-0); font: inherit; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; - color: rgb(var(--sl-color-neutral-600)); + color: var(--sl-color-neutral-600); padding: 0 1rem; cursor: pointer; } .code-block__button:not(:last-of-type) { - border-right: solid 1px rgb(var(--sl-color-neutral-200)); + border-right: solid 1px var(--sl-color-neutral-200); } .code-block__button--html, @@ -110,7 +110,7 @@ .code-block__button--selected { font-weight: 700; - color: rgb(var(--sl-color-primary-600)); + color: var(--sl-color-primary-600); } .code-block__button--codepen { @@ -129,20 +129,20 @@ .code-block__button:hover, .code-block__button:active { - box-shadow: 0 0 0 1px rgb(var(--sl-color-primary-400)); + box-shadow: 0 0 0 1px var(--sl-color-primary-400); border-right-color: transparent; - background-color: rgb(var(--sl-color-primary-50)); - color: rgb(var(--sl-color-primary-700)); + background-color: var(--sl-color-primary-50); + color: var(--sl-color-primary-700); z-index: 1; } .code-block__button:focus-visible { outline: none; - color: rgb(var(--sl-color-primary-600)); - border-color: rgb(var(--sl-color-primary-400)); + color: var(--sl-color-primary-600); + border-color: var(--sl-color-primary-400); border-right-color: transparent; - background-color: rgb(var(--sl-color-primary-50)); - box-shadow: 0 0 0 1px rgb(var(--sl-color-primary-400)), var(--sl-focus-ring); + background-color: var(--sl-color-primary-50); + box-shadow: 0 0 0 1px var(--sl-color-primary-400), var(--sl-focus-ring); z-index: 2; } @@ -153,7 +153,7 @@ align-items: center; justify-content: center; width: 100%; - color: rgb(var(--sl-color-neutral-600)); + color: var(--sl-color-neutral-600); cursor: pointer; -webkit-appearance: none; } @@ -172,7 +172,7 @@ .markdown-section .docsify-copy-code-button { top: 4px; right: 4px; - background-color: rgb(var(--sl-color-neutral-600)); + background-color: var(--sl-color-neutral-500); border-radius: var(--sl-border-radius-medium); font-family: var(--sl-font-sans); font-size: var(--sl-font-size-x-small); @@ -185,7 +185,7 @@ .markdown-section .docsify-copy-code-button.copied { animation: pulse 0.75s; - --pulse-color: rgb(var(--sl-color-neutral-600)); + --pulse-color: var(--sl-color-neutral-600); } @keyframes pulse { @@ -210,11 +210,11 @@ } .markdown-section .docsify-copy-code-button:focus-visible { - box-shadow: 0 0 0 3px rgb(var(--sl-color-neutral-500) / 50%); + box-shadow: var(--sl-focus-ring); } .markdown-section .docsify-copy-code-button:active { - background-color: rgb(var(--sl-color-neutral-600)); + background-color: var(--sl-color-neutral-600); transform: scale(0.92); } diff --git a/docs/assets/plugins/search/search.css b/docs/assets/plugins/search/search.css index ab49e8206..3f87d3f8e 100644 --- a/docs/assets/plugins/search/search.css +++ b/docs/assets/plugins/search/search.css @@ -30,7 +30,7 @@ body.site-search-visible { left: 0; right: 0; bottom: 0; - background: rgb(var(--sl-overlay-background-color) / var(--sl-overlay-opacity)); + background: var(--sl-overlay-background-color); z-index: -1; } @@ -39,7 +39,7 @@ body.site-search-visible { flex-direction: column; max-width: 460px; max-height: calc(100vh - 20rem); - background-color: rgb(var(--sl-surface-base-alt)); + background-color: var(--sl-color-neutral-50); border-radius: var(--sl-border-radius-large); box-shadow: var(--sl-shadow-x-large); margin: 10rem auto; @@ -74,7 +74,7 @@ body.site-search-visible { } .site-search--has-results .site-search__body { - border-top: solid 1px rgb(var(--sl-color-neutral-200)); + border-top: solid 1px var(--sl-color-neutral-200); } .site-search__results { @@ -97,15 +97,15 @@ body.site-search-visible { .site-search__results li a:hover, .site-search__results li a:hover small { - background-color: rgb(var(--sl-color-neutral-100)); + background-color: var(--sl-color-neutral-100); } .site-search__results li[aria-selected='true'] a, .site-search__results li[aria-selected='true'] a small, .site-search__results li[aria-selected='true'] a sl-icon { outline: none; - color: rgb(var(--sl-color-neutral-0)); - background-color: rgb(var(--sl-color-primary-600)); + color: var(--sl-color-neutral-0); + background-color: var(--sl-color-primary-600); } .site-search__results h3 { @@ -115,7 +115,7 @@ body.site-search-visible { .site-search__results small { display: block; - color: rgb(var(--sl-color-neutral-600)); + color: var(--sl-color-neutral-600); } .site-search__result { @@ -132,7 +132,7 @@ body.site-search-visible { .site-search__result-icon { flex: 0 0 auto; display: flex; - color: rgb(var(--sl-color-neutral-400)); + color: var(--sl-color-neutral-400); font-size: var(--sl-font-size-x-large); } @@ -142,7 +142,7 @@ body.site-search-visible { .site-search__empty { display: none; - border-top: solid 1px rgb(var(--sl-color-neutral-200)); + border-top: solid 1px var(--sl-color-neutral-200); text-align: center; padding: var(--sl-spacing-x-large); } @@ -155,14 +155,14 @@ body.site-search-visible { display: flex; justify-content: center; gap: var(--sl-spacing-large); - border-top: solid 1px rgb(var(--sl-color-neutral-200)); + border-top: solid 1px var(--sl-color-neutral-200); border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; padding: var(--sl-spacing-medium); } .site-search__footer small { - color: rgb(var(--sl-color-neutral-700)); + color: var(--sl-color-neutral-700); } @media screen and (max-width: 900px) { diff --git a/docs/assets/styles/docs.css b/docs/assets/styles/docs.css index 0fad71bf3..9e0992693 100644 --- a/docs/assets/styles/docs.css +++ b/docs/assets/styles/docs.css @@ -13,17 +13,17 @@ 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-surface-base)); - color: rgb(var(--sl-color-neutral-800)); + background-color: var(--sl-color-neutral-0); + color: var(--sl-color-neutral-800); line-height: var(--sl-line-height-normal); } a { - color: rgb(var(--sl-color-primary-600)); + color: var(--sl-color-primary-600); } a:hover { - color: rgb(var(--sl-color-primary-700)); + color: var(--sl-color-primary-700); } strong { @@ -32,8 +32,8 @@ strong { /* Sidebar */ .sidebar { - background-color: rgb(var(--sl-surface-base)); - border-right: solid 1px rgb(var(--sl-color-neutral-200)); + background-color: var(--sl-color-neutral-0); + border-right: solid 1px var(--sl-color-neutral-200); } .sidebar .app-name { @@ -43,7 +43,7 @@ strong { .sidebar-version { font-size: var(--sl-font-size-x-small); font-weight: var(--sl-font-weight-normal); - color: rgb(var(--sl-color-neutral-500)); + color: var(--sl-color-neutral-500); text-align: right; padding: 0 var(--sl-spacing-small); margin: -1.25rem 0 0.6rem 0; @@ -61,7 +61,7 @@ strong { width: 2rem; height: 2rem; border-radius: var(--sl-border-radius-medium); - background-color: rgb(var(--sl-surface-base)); + background-color: var(--sl-color-neutral-0); padding: 0.5rem; } @@ -70,7 +70,7 @@ strong { } .sidebar-toggle:active .sidebar-toggle-button span { - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } .sidebar-toggle:focus { @@ -110,12 +110,12 @@ strong { .sidebar-nav li.collapse > a, .sidebar-nav li.active > a { - color: rgb(var(--sl-color-primary-600)); + color: var(--sl-color-primary-600); } .sidebar li > p { font-weight: var(--sl-font-weight-bold); - border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); + border-bottom: solid 1px var(--sl-color-neutral-200); margin: 0 0.75rem 0.5rem 0; } @@ -200,12 +200,12 @@ strong { } .anchor span { - color: rgb(var(--sl-color-neutral-1000)); + color: var(--sl-color-neutral-1000); } .markdown-section blockquote { position: relative; - border-left: solid 4px rgb(var(--sl-color-neutral-200)); + border-left: solid 4px var(--sl-color-neutral-200); font-style: italic; padding: 1rem 1.5rem; margin: 0 0 1rem 0; @@ -229,7 +229,7 @@ strong { } .docsify-pagination-container { - border-top-color: rgb(var(--sl-color-neutral-200)) !important; + border-top-color: var(--sl-color-neutral-200) !important; } .pagination-item-label, @@ -254,7 +254,7 @@ strong { .markdown-section h2 { font-size: var(--sl-font-size-x-large); - border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); + border-bottom: solid 1px var(--sl-color-neutral-200); margin-top: 2rem; } @@ -285,30 +285,30 @@ strong { .markdown-section code { font-family: var(--sl-font-mono); font-size: 87.5%; - background-color: rgb(var(--sl-color-neutral-50)); + background-color: var(--sl-color-neutral-50); border-radius: var(--sl-border-radius-small); padding: 2px 4px; } .markdown-section tr:nth-child(2n) code { - background-color: rgb(var(--sl-color-neutral-100)); + background-color: var(--sl-color-neutral-100); } kbd, .markdown-section kbd { font-family: var(--sl-font-mono); font-size: 87.5%; - background-color: rgb(var(--sl-color-neutral-50)); + background-color: var(--sl-color-neutral-50); border-radius: var(--sl-border-radius-small); - border: solid 1px rgb(var(--sl-color-neutral-200)); - box-shadow: inset 0 1px 0 rgb(var(--sl-color-neutral-0)); + border: solid 1px var(--sl-color-neutral-200); + box-shadow: inset 0 1px 0 var(--sl-color-neutral-0); padding: 2px 5px; } /* Code blocks */ .markdown-section pre { position: relative; - background-color: rgb(var(--sl-color-neutral-50)); + background-color: var(--sl-color-neutral-50); border-radius: var(--sl-border-radius-medium); } @@ -316,7 +316,7 @@ kbd, display: block; background: none; border-radius: 0; - color: rgb(var(--sl-color-neutral-800)); + color: var(--sl-color-neutral-800); padding: var(--sl-spacing-medium); overflow: auto; hyphens: none; @@ -324,18 +324,18 @@ kbd, } .markdown-section pre .token.comment { - color: rgb(var(--sl-color-neutral-500)); + color: var(--sl-color-neutral-500); } .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-neutral-600)); + color: var(--sl-color-neutral-600); } .markdown-section pre .token.punctuation { - color: rgb(var(--sl-color-neutral-600)); + color: var(--sl-color-neutral-600); } .namespace { @@ -346,12 +346,12 @@ kbd, .markdown-section pre .token.keyword, .markdown-section pre .token.tag, .markdown-section pre .token.url { - color: rgb(var(--sl-color-sky-600)); + color: var(--sl-color-sky-600); } .markdown-section pre .token.symbol, .markdown-section pre .token.deleted { - color: rgb(var(--sl-color-pink-600)); + color: var(--sl-color-pink-600); } .markdown-section pre .token.boolean, @@ -362,24 +362,24 @@ kbd, .markdown-section pre .token.char, .markdown-section pre .token.builtin, .markdown-section pre .token.inserted { - color: rgb(var(--sl-color-emerald-600)); + color: var(--sl-color-emerald-600); } .markdown-section pre .token.atrule, .markdown-section pre .token.attr-value, .markdown-section pre .token.number, .markdown-section pre .token.variable { - color: rgb(var(--sl-color-violet-600)); + color: var(--sl-color-violet-600); } .markdown-section pre .token.function, .markdown-section pre .token.class-name, .markdown-section pre .token.regex { - color: rgb(var(--sl-color-orange-600)); + color: var(--sl-color-orange-600); } .markdown-section pre .token.important { - color: rgb(var(--sl-color-red-600)); + color: var(--sl-color-red-600); } .markdown-section pre .token.important, @@ -412,7 +412,7 @@ kbd, } .markdown-section tr:nth-child(2n) { - background: rgb(var(--sl-color-neutral-50)); + background: var(--sl-color-neutral-50); } .markdown-section th { @@ -422,8 +422,8 @@ kbd, } .markdown-section td { - border-top: solid 1px rgb(var(--sl-color-neutral-200)); - border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); + border-top: solid 1px var(--sl-color-neutral-200); + border-bottom: solid 1px var(--sl-color-neutral-200); border-left: none; border-right: none; } @@ -433,7 +433,7 @@ kbd, } .markdown-section table sl-tooltip code { - border-bottom: dashed 1px rgb(var(--sl-color-neutral-300)); + border-bottom: dashed 1px var(--sl-color-neutral-300); cursor: help; } @@ -446,7 +446,7 @@ kbd, .markdown-section p.tip, .markdown-section p.warn { position: relative; - background-color: rgb(var(--sl-color-neutral-50)); + background-color: var(--sl-color-neutral-50); border-left: solid 4px transparent; border-radius: var(--sl-border-radius-medium); padding-left: 1.5rem; @@ -456,7 +456,7 @@ kbd, .markdown-section p.warn:before { content: '!'; border-radius: 100%; - color: rgb(var(--sl-color-neutral-0)); + color: var(--sl-color-neutral-0); font-size: 14px; font-weight: bold; left: -12px; @@ -469,29 +469,29 @@ kbd, } .markdown-section p.warn { - border-left-color: rgb(var(--sl-color-primary-600)); + border-left-color: var(--sl-color-primary-600); } .markdown-section p.warn:before { - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } .markdown-section p.tip { - border-left-color: rgb(var(--sl-color-danger-600)); + border-left-color: var(--sl-color-danger-600); } .markdown-section p.tip:before { - background-color: rgb(var(--sl-color-danger-600)); + background-color: var(--sl-color-danger-600); } .markdown-section p.tip code, .markdown-section p.warn code { - background-color: rgb(var(--sl-color-neutral-100)); + background-color: var(--sl-color-neutral-100); } /* Component headers */ .component-header { - border-bottom: solid 1px rgb(var(--sl-color-neutral-200)); + border-bottom: solid 1px var(--sl-color-neutral-200); padding-bottom: 2rem; margin-top: -1rem; margin-bottom: 2rem; @@ -505,7 +505,7 @@ kbd, .markdown-section .component-header__tag code { background: none; - color: rgb(var(--sl-color-neutral-600)); + color: var(--sl-color-neutral-600); font-size: var(--sl-font-size-large); padding: 0; margin: 0; @@ -523,15 +523,15 @@ kbd, /* Repo buttons */ .repo-button--sponsor sl-icon { - color: rgb(var(--sl-color-pink-600)); + color: var(--sl-color-pink-600); } .repo-button--github sl-icon { - color: rgb(var(--sl-color-neutral-700)); + color: var(--sl-color-neutral-700); } .repo-button--twitter sl-icon { - color: rgb(var(--sl-color-sky-500)); + color: var(--sl-color-sky-500); } @media screen and (max-width: 400px) { @@ -550,13 +550,13 @@ body[data-page^='/tokens/'] .table-wrapper td:first-child code { .border-radius-demo { width: 3rem; height: 3rem; - background: rgb(var(--sl-color-primary-600)); + background: var(--sl-color-primary-600); } /* Transition demo */ .transition-demo { position: relative; - background: rgb(var(--sl-color-neutral-200)); + background: var(--sl-color-neutral-200); width: 8rem; height: 2rem; } @@ -564,7 +564,7 @@ body[data-page^='/tokens/'] .table-wrapper td:first-child code { .transition-demo:after { content: ''; position: absolute; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); top: 0; left: 0; width: 0; @@ -580,7 +580,7 @@ body[data-page^='/tokens/'] .table-wrapper td:first-child code { /* Spacing demo */ .spacing-demo { width: 100px; - background: rgb(var(--sl-color-primary-600)); + background: var(--sl-color-primary-600); } /* Elevation dmeo */ @@ -622,7 +622,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-neutral-1000) / 10%); + box-shadow: inset 0 0 0 1px var(--sl-color-neutral-300); } @media screen and (max-width: 1200px) { diff --git a/docs/components/animated-image.md b/docs/components/animated-image.md index 7b102db9c..5f81730e5 100644 --- a/docs/components/animated-image.md +++ b/docs/components/animated-image.md @@ -92,7 +92,7 @@ You can change the appearance and location of the control box by targeting the ` left: 1rem; background-color: deeppink; border: none; - color: white; + color: pink; } ``` @@ -107,7 +107,8 @@ const css = ` bottom: 1rem; left: 1rem; background-color: deeppink; - color: white; + border: none; + color: pink; } `; diff --git a/docs/components/animation.md b/docs/components/animation.md index 0eb61a5f7..4998393f0 100644 --- a/docs/components/animation.md +++ b/docs/components/animation.md @@ -19,7 +19,7 @@ To animate an element, wrap it in `` and set an animation `name`. display: inline-block; width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); margin: 1.5rem; } @@ -33,7 +33,7 @@ const css = ` display: inline-block; width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); margin: 1.5rem; } `; @@ -109,7 +109,7 @@ This example demonstrates all of the baked-in animations and easings. Animations .animation-sandbox .box { width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } .animation-sandbox .controls { @@ -155,7 +155,7 @@ Use an [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/ display: inline-block; width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } ``` @@ -173,7 +173,7 @@ const css = ` display: inline-block; width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } `; @@ -252,7 +252,7 @@ Supply your own [keyframe formats](https://developer.mozilla.org/en-US/docs/Web/ .animation-keyframes .box { width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } ``` @@ -264,7 +264,7 @@ const css = ` .animation-keyframes .box { width: 100px; height: 100px; - background-color: rgb(var(--sl-color-primary-600)); + background-color: var(--sl-color-primary-600); } `; diff --git a/docs/components/avatar.md b/docs/components/avatar.md index a48907b50..0ccb298b8 100644 --- a/docs/components/avatar.md +++ b/docs/components/avatar.md @@ -151,7 +151,7 @@ You can group avatars with a few lines of CSS. } .avatar-group sl-avatar::part(base) { - border: solid 2px rgb(var(--sl-color-neutral-0)); + border: solid 2px var(--sl-color-neutral-0); } ``` @@ -165,7 +165,7 @@ const css = ` } .avatar-group sl-avatar::part(base) { - border: solid 2px rgb(var(--sl-color-neutral-0)); + border: solid 2px var(--sl-color-neutral-0); } `; diff --git a/docs/components/badge.md b/docs/components/badge.md index a8634dcc7..19009b394 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -163,7 +163,7 @@ const App = () => ( When including badges in menu items, use the `suffix` slot to make sure they're aligned correctly. ```html preview - + Messages Comments 4 Replies 12 @@ -177,7 +177,7 @@ const App = () => ( diff --git a/docs/components/card.md b/docs/components/card.md index d10fb1e52..f9d7707d9 100644 --- a/docs/components/card.md +++ b/docs/components/card.md @@ -28,7 +28,7 @@ Cards can be used to group related subjects in a container. } .card-overview small { - color: rgb(var(--sl-color-neutral-500)); + color: var(--sl-color-neutral-500); } .card-overview [slot="footer"] { @@ -52,7 +52,7 @@ const css = ` } .card-overview small { - color: rgb(var(--sl-color-neutral-500)); + color: var(--sl-color-neutral-500); } .card-overview [slot="footer"] { diff --git a/docs/components/dialog.md b/docs/components/dialog.md index e7348a11a..f96c0e207 100644 --- a/docs/components/dialog.md +++ b/docs/components/dialog.md @@ -107,7 +107,7 @@ By design, a dialog's height will never exceed that of the viewport. As such, di ```html preview -
+

Scroll down and give it a try! 👇

Close @@ -137,7 +137,7 @@ const App = () => { setOpen(false)}>

Scroll down and give it a try! 👇

@@ -209,7 +209,7 @@ const App = () => { ### Customizing Initial Focus -By default, the dialog's panel will gain focus when opened. This allows the first tab press to focus on the first tabbable element within the dialog. To set focus on a different element, listen for and cancel the `sl-initial-focus` event. +By default, the dialog's panel will gain focus when opened. This allows a subsequent tab press to focus on the first tabbable element within the dialog. To set focus on a different element, listen for and cancel the `sl-initial-focus` event. ```html preview diff --git a/docs/components/divider.md b/docs/components/divider.md index 5af5b4389..674fe39ca 100644 --- a/docs/components/divider.md +++ b/docs/components/divider.md @@ -112,7 +112,7 @@ const App = () => ( Use dividers in [menus](/components/menu) to visually group menu items. ```html preview - + Option 1 Option 2 Option 3 @@ -134,7 +134,7 @@ const App = () => ( diff --git a/docs/components/drawer.md b/docs/components/drawer.md index 9a1bfea3e..a9526b3e4 100644 --- a/docs/components/drawer.md +++ b/docs/components/drawer.md @@ -199,7 +199,7 @@ By default, the drawer slides out of its [containing block](https://developer.mo ```html preview
The drawer will be contained to this box. This content won't shift or be affected in any way when the drawer opens. @@ -233,7 +233,7 @@ const App = () => {
-
+

Scroll down and give it a try! 👇

Close @@ -346,7 +346,7 @@ const App = () => {
diff --git a/docs/components/dropdown.md b/docs/components/dropdown.md index 3749973ca..59588fa7c 100644 --- a/docs/components/dropdown.md +++ b/docs/components/dropdown.md @@ -334,7 +334,7 @@ Dropdown panels will be clipped if they're inside a container that has `overflow ``` @@ -403,15 +403,15 @@ import { SlInput } from '@shoelace-style/shoelace/dist/react'; const css = ` .custom-input[invalid]:not([disabled])::part(label), .custom-input[invalid]:not([disabled])::part(help-text) { - color: rgb(var(--sl-color-danger-600)); + color: var(--sl-color-danger-600); } .custom-input[invalid]:not([disabled])::part(base) { - border-color: rgb(var(--sl-color-danger-500)); + border-color: var(--sl-color-danger-500); } .custom-input[invalid]:focus-within::part(base) { - box-shadow: 0 0 0 var(--sl-focus-ring-width) rgb(var(--sl-color-danger-500) / var(--sl-focus-ring-alpha)); + box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-color-danger-500); } `; diff --git a/docs/components/icon.md b/docs/components/icon.md index 7a0d6ab78..1ec12431b 100644 --- a/docs/components/icon.md +++ b/docs/components/icon.md @@ -79,6 +79,22 @@ const App = () => ( ); ``` +### Labels + +For non-decorative icons, use the `label` attribute to announce it to assistive devices. + +```html preview + +``` + +```jsx react +import { SlIcon } from '@shoelace-style/shoelace/dist/react'; + +const App = () => ( + +); +``` + ### Custom Icons Custom icons can be loaded individually with the `src` attribute. Only SVGs on a local or CORS-enabled endpoint are supported. If you're using more than one custom icon, it might make sense to register a [custom icon library](#icon-libraries). @@ -592,7 +608,7 @@ If you want to change the icons Shoelace uses internally, you can register an ic