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. -
+
Inbox Inbox Inbox + CSS4 now available!
```html Inbox Inbox Inbox +CSS4 now available! ``` +> Note that the badge element itself is by design not part of the text flow to keep spacing between elements consistent. Therefore long badge contents should be avoided or only used where appropriate. + ### Button badges -This also works for button elements. +The `badge` class also works on button elements. -
+
+
```html + ``` diff --git a/docs/pages/components/breadcrumb.md b/docs/pages/components/breadcrumb.md index 2122899..d9e3aa5 100644 --- a/docs/pages/components/breadcrumb.md +++ b/docs/pages/components/breadcrumb.md @@ -11,7 +11,7 @@ a horizontal scrollbar appears. ### Basic breadcrumb path -Use the `.breadcrumb` class on an ordered list to format the contained elements. +Use the `breadcrumb` class on an ordered list to format the contained elements.