You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/adding-custom-styles.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,14 @@ It's even possible to use the [`theme` function](/docs/functions-and-directives#
91
91
</div>
92
92
```
93
93
94
+
When using a CSS variable as an arbitrary value, wrapping your variable in `var(...)` isn't needed — just providing the actual variable name is enough:
95
+
96
+
```html
97
+
<divclass="bg-[--my-color]">
98
+
<!-- ... -->
99
+
</div>
100
+
```
101
+
94
102
### Arbitrary properties
95
103
96
104
If you ever need to use a CSS property that Tailwind doesn't include a utility for out of the box, you can also use square bracket notation to write completely arbitrary CSS:
0 commit comments