Skip to content

Commit 461ba75

Browse files
[v3.2] Document supports-foo configuration (tailwindlabs#1400)
* document `supports-foo` configuration * Tweak supports docs Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
1 parent 419e68a commit 461ba75

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/pages/docs/hover-focus-and-other-states.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,26 @@ For terseness, if you only need to check if a property is supported (and not a s
10771077
</div>
10781078
```
10791079

1080+
You can configure shortcuts for common `@supports` rules you're using in your project in the `theme.supports` section of your `tailwind.config.js` file:
1081+
1082+
```js tailwind.config.js
1083+
module.exports = {
1084+
theme: {
1085+
supports: {
1086+
grid: 'display: grid',
1087+
},
1088+
},
1089+
}
1090+
```
1091+
1092+
You can then use these custom `supports-*` modifiers in your project:
1093+
1094+
```html
1095+
<div class="**supports-grid:grid**">
1096+
<!-- ... -->
1097+
</div>
1098+
```
1099+
10801100
---
10811101

10821102
## Attribute selectors

0 commit comments

Comments
 (0)