mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #4577 from marjan-georgiev/add-stopOpacity-to-unitless-props
Add stop-opacity to unitless style properties
This commit is contained in:
@@ -18,6 +18,7 @@ React.render(<div style={divStyle}>Hello World!</div>, mountNode);
|
||||
|
||||
개발 하다보면 CSS 속성들이 단위 없이 그대로 유지되어야 할 때가 있을 겁니다. 아래의 프로퍼티들은 자동으로 "px"가 붙지 않는 속성 리스트 입니다:
|
||||
|
||||
- `animationIterationCount`
|
||||
- `boxFlex`
|
||||
- `boxFlexGroup`
|
||||
- `boxOrdinalGroup`
|
||||
@@ -35,7 +36,10 @@ React.render(<div style={divStyle}>Hello World!</div>, mountNode);
|
||||
- `opacity`
|
||||
- `order`
|
||||
- `orphans`
|
||||
- `stopOpacity`
|
||||
- `strokeDashoffset`
|
||||
- `strokeOpacity`
|
||||
- `strokeWidth`
|
||||
- `tabSize`
|
||||
- `widows`
|
||||
- `zIndex`
|
||||
|
||||
@@ -18,6 +18,7 @@ See [Inline Styles](/react/tips/inline-styles.html) for more info.
|
||||
|
||||
Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix:
|
||||
|
||||
- `animationIterationCount`
|
||||
- `boxFlex`
|
||||
- `boxFlexGroup`
|
||||
- `boxOrdinalGroup`
|
||||
@@ -35,7 +36,10 @@ Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of pr
|
||||
- `opacity`
|
||||
- `order`
|
||||
- `orphans`
|
||||
- `stopOpacity`
|
||||
- `strokeDashoffset`
|
||||
- `strokeOpacity`
|
||||
- `strokeWidth`
|
||||
- `tabSize`
|
||||
- `widows`
|
||||
- `zIndex`
|
||||
|
||||
@@ -39,6 +39,7 @@ var isUnitlessNumber = {
|
||||
|
||||
// SVG-related properties
|
||||
fillOpacity: true,
|
||||
stopOpacity: true,
|
||||
strokeDashoffset: true,
|
||||
strokeOpacity: true,
|
||||
strokeWidth: true,
|
||||
|
||||
Reference in New Issue
Block a user