Skip to content

Commit 5e6a10e

Browse files
authored
(docs): Move CSS Logical Properties to separate table (#1454)
* (docs): Move CSS Logical Properties to separate table * Fix Prettier issues
1 parent afed40c commit 5e6a10e

1 file changed

Lines changed: 64 additions & 48 deletions

File tree

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

Lines changed: 64 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -66,39 +66,20 @@ The following CSS properties will use values defined in the theme, when availabl
6666
| `ml`, `marginLeft` | `space` |
6767
| `mx`, `marginX` | `space` |
6868
| `my`, `marginY` | `space` |
69-
| `marginBlock` | `space` |
70-
| `marginBlockEnd` | `space` |
71-
| `marginBlockStart` | `space` |
72-
| `marginInline` | `space` |
73-
| `marginInlineEnd` | `space` |
74-
| `marginInlineStart` | `space` |
7569
| `p`, `padding` | `space` |
7670
| `pt`, `paddingTop` | `space` |
7771
| `pr`, `paddingRight` | `space` |
7872
| `pb`, `paddingBottom` | `space` |
7973
| `pl`, `paddingLeft` | `space` |
8074
| `px`, `paddingX` | `space` |
8175
| `py`, `paddingY` | `space` |
82-
| `paddingBlock` | `space` |
83-
| `paddingBlockEnd` | `space` |
84-
| `paddingBlockStart` | `space` |
85-
| `paddingInline` | `space` |
86-
| `paddingInlineEnd` | `space` |
87-
| `paddingInlineStart` | `space` |
8876
| `scrollPadding` | `space` |
8977
| `scrollPaddingTop` | `space` |
9078
| `scrollPaddingRight` | `space` |
9179
| `scrollPaddingBottom` | `space` |
9280
| `scrollPaddingLeft` | `space` |
9381
| `scrollPaddingX` | `space` |
9482
| `scrollPaddingY` | `space` |
95-
| `inset` | `space` |
96-
| `insetBlock` | `space` |
97-
| `insetBlockEnd` | `space` |
98-
| `insetBlockStart` | `space` |
99-
| `insetInline` | `space` |
100-
| `insetInlineEnd` | `space` |
101-
| `insetInlineStart` | `space` |
10283
| `top` | `space` |
10384
| `right` | `space` |
10485
| `bottom` | `space` |
@@ -133,28 +114,6 @@ The following CSS properties will use values defined in the theme, when availabl
133114
| `borderRightWidth` | `borderWidths` |
134115
| `borderRightColor` | `colors` |
135116
| `borderRightStyle` | `borderStyles` |
136-
| `borderBlock` | `borders` |
137-
| `borderBlockEnd` | `borders` |
138-
| `borderBlockEndStyle` | `borderStyles` |
139-
| `borderBlockEndWidth` | `borderWidths` |
140-
| `borderBlockStart` | `borders` |
141-
| `borderBlockStartStyle` | `borderStyles` |
142-
| `borderBlockStartWidth` | `borderWidths` |
143-
| `borderBlockStyle` | `borderStyles` |
144-
| `borderBlockWidth` | `borderWidths` |
145-
| `borderEndEndRadius` | `radii` |
146-
| `borderEndStartRadius` | `radii` |
147-
| `borderInline` | `borders` |
148-
| `borderInlineEnd` | `borders` |
149-
| `borderInlineEndStyle` | `borderStyles` |
150-
| `borderInlineEndWidth` | `borderWidths` |
151-
| `borderInlineStart` | `borders` |
152-
| `borderInlineStartStyle` | `borderStyles` |
153-
| `borderInlineStartWidth` | `borderWidths` |
154-
| `borderInlineStyle` | `borderStyles` |
155-
| `borderInlineWidth` | `borderWidths` |
156-
| `borderStartEndRadius` | `radii` |
157-
| `borderStartStartRadius` | `radii` |
158117
| `boxShadow` | `shadows` |
159118
| `textShadow` | `shadows` |
160119
| `zIndex` | `zIndices` |
@@ -166,15 +125,72 @@ The following CSS properties will use values defined in the theme, when availabl
166125
| `maxHeight` | `sizes` |
167126
| `flexBasis` | `sizes` |
168127
| `size` | `sizes` |
169-
| `blockSize` | `sizes` |
170-
| `inlineSize` | `sizes` |
171-
| `maxBlockSize` | `sizes` |
172-
| `maxInlineSize` | `sizes` |
173-
| `minBlockSize` | `sizes` |
174-
| `minInlineSize` | `sizes` |
175128
| `fill` | `colors` |
176129
| `stroke` | `colors` |
177130

131+
Theme UI also supports [CSS Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties),
132+
which follow this structure:
133+
134+
- `margin-{block,inline}-{start,end}`
135+
- `padding-{block,inline}-{start,end}`
136+
- `border-{block,inline}-{start,end}-{width,style,color}`
137+
- `inset-{block,inline}-{start,end}`
138+
139+
<details>
140+
<summary>See the full list</summary>
141+
142+
| Property | Theme Key |
143+
| ------------------------ | -------------- |
144+
| `marginBlock` | `space` |
145+
| `marginBlockEnd` | `space` |
146+
| `marginBlockStart` | `space` |
147+
| `marginInline` | `space` |
148+
| `marginInlineEnd` | `space` |
149+
| `marginInlineStart` | `space` |
150+
| `paddingBlock` | `space` |
151+
| `paddingBlockEnd` | `space` |
152+
| `paddingBlockStart` | `space` |
153+
| `paddingInline` | `space` |
154+
| `paddingInlineEnd` | `space` |
155+
| `paddingInlineStart` | `space` |
156+
| `inset` | `space` |
157+
| `insetBlock` | `space` |
158+
| `insetBlockEnd` | `space` |
159+
| `insetBlockStart` | `space` |
160+
| `insetInline` | `space` |
161+
| `insetInlineEnd` | `space` |
162+
| `insetInlineStart` | `space` |
163+
| `borderBlock` | `borders` |
164+
| `borderBlockEnd` | `borders` |
165+
| `borderBlockEndStyle` | `borderStyles` |
166+
| `borderBlockEndWidth` | `borderWidths` |
167+
| `borderBlockStart` | `borders` |
168+
| `borderBlockStartStyle` | `borderStyles` |
169+
| `borderBlockStartWidth` | `borderWidths` |
170+
| `borderBlockStyle` | `borderStyles` |
171+
| `borderBlockWidth` | `borderWidths` |
172+
| `borderEndEndRadius` | `radii` |
173+
| `borderEndStartRadius` | `radii` |
174+
| `borderInline` | `borders` |
175+
| `borderInlineEnd` | `borders` |
176+
| `borderInlineEndStyle` | `borderStyles` |
177+
| `borderInlineEndWidth` | `borderWidths` |
178+
| `borderInlineStart` | `borders` |
179+
| `borderInlineStartStyle` | `borderStyles` |
180+
| `borderInlineStartWidth` | `borderWidths` |
181+
| `borderInlineStyle` | `borderStyles` |
182+
| `borderInlineWidth` | `borderWidths` |
183+
| `borderStartEndRadius` | `radii` |
184+
| `borderStartStartRadius` | `radii` |
185+
| `blockSize` | `sizes` |
186+
| `inlineSize` | `sizes` |
187+
| `maxBlockSize` | `sizes` |
188+
| `maxInlineSize` | `sizes` |
189+
| `minBlockSize` | `sizes` |
190+
| `minInlineSize` | `sizes` |
191+
192+
</details>
193+
178194
## Responsive Values
179195

180196
Theme UI, like Styled System, includes a shorthand syntax for writing mobile-first responsive styles using arrays as values.
@@ -341,7 +357,7 @@ Because MDX uses its own custom pragma and `createElement` function, the Theme U
341357
You can use any of the [Theme UI components](/components),
342358
which support the `sx` prop, in an MDX file as a workaround.
343359

344-
```js
360+
```mdx
345361
import { Box } from 'theme-ui'
346362

347363
<Box

0 commit comments

Comments
 (0)