Skip to content

Commit

Permalink
Explain why dividers don't show if you use TailwindCSS and add a work…
Browse files Browse the repository at this point in the history
…around. (#2356)
  • Loading branch information
marcuslimdw authored Feb 3, 2025
1 parent 372ba1f commit 69cf94b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/pages/components/divider.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ import SlDivider from '@shoelace-style/shoelace/dist/react/divider';
const App = () => <SlDivider />;
```

:::tip
Using TailwindCSS with Shoelace [may override divider styles](https://github.com/shoelace-style/shoelace/issues/2088), making them invisible. As a workaround, add this to your TailwindCSS input file:

```css
@layer base {
sl-divider:not([vertical]) {
border-top: solid var(--width) var(--color);
}

sl-divider[vertical] {
border-left: solid var(--width) var(--color);
}
}
```
:::

## Examples

### Width
Expand Down Expand Up @@ -155,4 +171,4 @@ const App = () => (
);
```

{% endraw %}
{% endraw %}

0 comments on commit 69cf94b

Please sign in to comment.