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: content/docs/reference-dom-elements.md
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,36 @@ function HelloWorldComponent() {
99
99
return<div style={divStyle}>Hello World!</div>;
100
100
}
101
101
```
102
+
Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix:
103
+
104
+
-`animationIterationCount`
105
+
-`boxFlex`
106
+
-`boxFlexGroup`
107
+
-`boxOrdinalGroup`
108
+
-`columnCount`
109
+
-`fillOpacity`
110
+
-`flex`
111
+
-`flexGrow`
112
+
-`flexPositive`
113
+
-`flexShrink`
114
+
-`flexNegative`
115
+
-`flexOrder`
116
+
-`fontWeight`
117
+
-`lineClamp`
118
+
-`lineHeight`
119
+
-`opacity`
120
+
-`order`
121
+
-`orphans`
122
+
-`stopOpacity`
123
+
-`strokeDashoffset`
124
+
-`strokeOpacity`
125
+
-`strokeWidth`
126
+
-`tabSize`
127
+
-`widows`
128
+
-`zIndex`
129
+
-`zoom`
130
+
131
+
See [unitless properties](https://github.com/facebook/react/blob/4131af3e4bf52f3a003537ec95a1655147c81270/src/renderers/dom/shared/CSSProperty.js#L15-L59) for more examples.
0 commit comments