Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(sx-prop): add more detail for responsive values. #2116

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/docs/src/pages/sx-prop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ mobile-first responsive styles using arrays as values. This is useful when you
want to change a single property across multiple breakpoints without needing to
write verbose media query syntax.

If you use array, the 0-th element is for every device, and the i-th element
means that it is for (i - 1)-th breakpoint.

```jsx
/** @jsxImportSource theme-ui */

Expand All @@ -235,6 +238,10 @@ export default (props) => (
)
```

For example, its width is defaultly 100%. Then if it is at the 0-th
breakpoint's range, its width will be 50%. Then if it is at the 1-st
breakpoint's range, its width will be 25%.

### Skipping Breakpoints

If you want to skip a breakpoint, you can use the value `null`. This is useful
Expand Down