Skip to content

Commit b6c3f87

Browse files
committed
update
1 parent cd19e35 commit b6c3f87

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/routes/reference/jsx-attributes/style.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ CSS string or style object.
3131
## Behavior
3232

3333
- String values are written as inline CSS text.
34-
- Object values are applied property by property with `element.style.setProperty`.
35-
- Object keys should use lower-case, dash-separated CSS property names.
36-
- CSS custom properties can be set with keys such as `--my-color`.
34+
- Object values are applied property by property with `element.style.setProperty`, so keys should use lower-case, dash-separated CSS property names. CSS custom properties can use keys such as `--my-color`.
35+
- Nullish values in a style object remove that property, and falsy overall `style` values remove the `style` attribute.
3736

3837
## Examples
3938

@@ -60,3 +59,8 @@ CSS string or style object.
6059
```tsx
6160
<div style={{ "--my-custom-color": state.themeColor }} />
6261
```
62+
63+
## Related
64+
65+
- [`class`](/reference/jsx-attributes/class)
66+
- [`classList`](/reference/jsx-attributes/classlist)

0 commit comments

Comments
 (0)