Skip to content

Commit 572f7c7

Browse files
authored
Merge pull request #607 from keirwilliams/skipping-breakpoints
Add section to docs about skipping breakpoints
2 parents 375f3bc + 34a0195 commit 572f7c7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/docs/src/pages/sx-prop.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ export default props => (
108108
)
109109
```
110110

111+
### Skipping Breakpoints
112+
113+
If you want to skip a breakpoint, you can use the value `null`. This is useful if you want to set a value for only the largest breakpoint, for example.
114+
115+
```jsx
116+
/** @jsx jsx */
117+
import { jsx } from 'theme-ui'
118+
119+
export default props => (
120+
<div
121+
{...props}
122+
sx={{
123+
width: [null, null, '25%'],
124+
}}
125+
/>
126+
)
127+
```
128+
111129
## Margin and Padding
112130

113131
Margin and padding are treated as first-class citizens in Theme UI,

0 commit comments

Comments
 (0)