diff --git a/docs/_includes/default.njk b/docs/_includes/default.njk index 22a7d7f..cf7ca99 100644 --- a/docs/_includes/default.njk +++ b/docs/_includes/default.njk @@ -65,7 +65,7 @@ diff --git a/docs/assets/scripts/docs.js b/docs/assets/scripts/docs.js index 43b3c81..9fb2cc3 100644 --- a/docs/assets/scripts/docs.js +++ b/docs/assets/scripts/docs.js @@ -3,11 +3,11 @@ const toast = document.querySelector('#toast'); const toggleToast = () => toast.classList.toggle('active'); const toastPositions = ['br', 'tr', 'tl', 'bl']; const positionToast = (pos) => { - toastPositions.filter(p => p !== pos).forEach(p => toast.classList.remove(p)); + toastPositions.forEach(p => toast.classList.remove(p)); toast.classList.add(pos); } const toastColors = ['neutral', 'accent', 'positive', 'negative']; const colorToast = (col) => { - toastColors.filter(c => c !== col).forEach(c => toast.classList.remove(c)); + toastColors.forEach(c => toast.classList.remove(c)); toast.classList.add(col); } diff --git a/docs/pages/components/badge.md b/docs/pages/components/badge.md index 50ba54e..4880484 100644 --- a/docs/pages/components/badge.md +++ b/docs/pages/components/badge.md @@ -9,32 +9,38 @@ Badges indicate the status of an element, the appearance of an event or counts o ### Basic text badges -Use the `.badge` class to add a small bubble indicator at the top right corner of the enclosed element. Use the `data-badge` attribute to add content to that bubble. If you want to draw even more attention to the badge, you can use the `.pulse` class in addition. +Use the `badge` class to add a small bubble indicator at the top right corner of the enclosed element. Use the `data-badge` attribute to add content to that bubble. If you want to draw even more attention to the badge, you can use the `pulse` class in addition. -
The demo can be seen directly on this page in the bottom right corner.
@@ -33,27 +33,27 @@ Use the `br`, `tr`, `tl` and `bl` classes to position the toast notification onThe demo can be seen directly on this page. Use the following controls to change it's position.
-Default text
-Inverted color .text-accent
Accent color .text-accent
Muted text .text-muted
Positive message .text-positive
Negative message .text-negative
Inverted color .text-accent
Default text
-Inverted color
Accent color
Muted text
Positive message
Negative message
+Inverted color
``` -> Note that you can use `.text-light` and `.text-dark` to keep the text color despite the color scheme. But please only use this with sufficient contrast to the background. +> Note that you can use `text-light` and `text-dark` to keep the text color despite the color scheme. But please only use this with sufficient contrast to the background. Colors can be overwritten by the corresponding custom property: diff --git a/docs/pages/utilities/cursors.md b/docs/pages/utilities/cursor.md similarity index 84% rename from docs/pages/utilities/cursors.md rename to docs/pages/utilities/cursor.md index 73f9925..33a44c9 100644 --- a/docs/pages/utilities/cursors.md +++ b/docs/pages/utilities/cursor.md @@ -1,13 +1,13 @@ --- -title: 'Utilities: Cursors - Sloth.css' +title: 'Utilities: Cursor - Sloth.css' description: Utility classes of Sloth.css for cursors. --- -## Cursors +## Cursor Utility classes for controlling cursor types. -The following 4 types of cursors are supported. Hover over the colored fields on a device that supports cursors to see them in action. +Use the `cursor-*` classes to control the mouse cursor appearance. Hover over the colored fields on a device that supports cursors to see them in action..flex-center */
code {
background: color-mix(in srgb, var(--color-border) 60%, transparent);
+ color: var(--color-text-emphasized);
border-radius: .25rem;
font-family: var(--font-mono);
font-weight: 400;
@@ -154,6 +155,10 @@ code {
pre > & {
padding: 0;
}
+ del > &, ins > & {
+ padding: 0 .25em;
+ color: inherit;
+ }
}
/* */