From 0d8c3f9cba85ee160ccc0a8c8a6ccb16ca9aa755 Mon Sep 17 00:00:00 2001 From: Marjan Date: Thu, 6 Aug 2015 16:46:13 +0200 Subject: [PATCH 1/2] Add stop-opacity to unitless style properties --- docs/js/react.js | 1 + docs/tips/06-style-props-value-px.ko-KR.md | 4 ++++ docs/tips/06-style-props-value-px.md | 4 ++++ src/renderers/dom/shared/CSSProperty.js | 1 + 4 files changed, 10 insertions(+) diff --git a/docs/js/react.js b/docs/js/react.js index ee718d0832..63bb3fb254 100644 --- a/docs/js/react.js +++ b/docs/js/react.js @@ -711,6 +711,7 @@ var isUnitlessNumber = { // SVG-related properties fillOpacity: true, + stopOpacity: true, strokeDashoffset: true, strokeOpacity: true, strokeWidth: true diff --git a/docs/tips/06-style-props-value-px.ko-KR.md b/docs/tips/06-style-props-value-px.ko-KR.md index 7360a9932a..fa00b57731 100644 --- a/docs/tips/06-style-props-value-px.ko-KR.md +++ b/docs/tips/06-style-props-value-px.ko-KR.md @@ -18,6 +18,7 @@ React.render(
Hello World!
, mountNode); 개발 하다보면 CSS 속성들이 단위 없이 그대로 유지되어야 할 때가 있을 겁니다. 아래의 프로퍼티들은 자동으로 "px"가 붙지 않는 속성 리스트 입니다: +- `animationIterationCount` - `boxFlex` - `boxFlexGroup` - `boxOrdinalGroup` @@ -35,7 +36,10 @@ React.render(
Hello World!
, mountNode); - `opacity` - `order` - `orphans` +- `stopOpacity` +- `strokeDashoffset` - `strokeOpacity` +- `strokeWidth` - `tabSize` - `widows` - `zIndex` diff --git a/docs/tips/06-style-props-value-px.md b/docs/tips/06-style-props-value-px.md index 736372e5bc..896f0fe8c8 100644 --- a/docs/tips/06-style-props-value-px.md +++ b/docs/tips/06-style-props-value-px.md @@ -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` diff --git a/src/renderers/dom/shared/CSSProperty.js b/src/renderers/dom/shared/CSSProperty.js index a42afd92d0..143b641cf9 100644 --- a/src/renderers/dom/shared/CSSProperty.js +++ b/src/renderers/dom/shared/CSSProperty.js @@ -39,6 +39,7 @@ var isUnitlessNumber = { // SVG-related properties fillOpacity: true, + stopOpacity: true, strokeDashoffset: true, strokeOpacity: true, strokeWidth: true, From 2b4d98fa525019602a2e862f0917e55d68c613dc Mon Sep 17 00:00:00 2001 From: Marjan Date: Thu, 6 Aug 2015 19:16:29 +0200 Subject: [PATCH 2/2] Revert change to docs/js/reactj.js --- docs/js/react.js | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/js/react.js b/docs/js/react.js index 63bb3fb254..ee718d0832 100644 --- a/docs/js/react.js +++ b/docs/js/react.js @@ -711,7 +711,6 @@ var isUnitlessNumber = { // SVG-related properties fillOpacity: true, - stopOpacity: true, strokeDashoffset: true, strokeOpacity: true, strokeWidth: true