Skip to content
Merged
Changes from all commits
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
9 changes: 9 additions & 0 deletions packages/dev/docs/pages/react-spectrum/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ ReactDOM.render(<DimensionViewer />, document.getElementById('dimension-viewer')

<div id="dimension-viewer" />

### CSS functions

Dimension variables may also be used as part of CSS functions like `calc()`, `min()`, and `max()`. This can be done by simply referring to the variable within the CSS expression.
For example, you could make an element take up 100% of the width of it's container minus a certain dimension value.

```tsx example
<View width="calc(100% - size-2000)" height="single-line-height" backgroundColor="green-500" />
```

## Responsive styles

In addition to static values, all style props support object syntax to specify different values for the prop depending on the
Expand Down