You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2018/12/17 10:14:30 UTC

[incubator-weex-site] branch master updated: * [Doc] Update css-unit. (#241)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a97558  * [Doc] Update css-unit. (#241)
3a97558 is described below

commit 3a97558aad99e9375e9b614b3530f88d841b554d
Author: YorkShen <sh...@gmail.com>
AuthorDate: Mon Dec 17 18:14:26 2018 +0800

    * [Doc] Update css-unit. (#241)
---
 source/cn/wiki/css-units.md | 27 ++++++++++-----------------
 source/wiki/css-units.md    | 22 +++++++++++-----------
 2 files changed, 21 insertions(+), 28 deletions(-)

diff --git a/source/cn/wiki/css-units.md b/source/cn/wiki/css-units.md
index 512544c..e2edb44 100644
--- a/source/cn/wiki/css-units.md
+++ b/source/cn/wiki/css-units.md
@@ -33,32 +33,25 @@ version: 2.1
 
 ### 注意
 
-* 不支持 `hsl()`, `hsla()`, `currentColor`, 8个字符的十六进制颜色。
+> 不支持 `hsl()`, `hsla()`, `currentColor`
 
-* `rgb(a,b,c)` 或 `rgba(a,b,c,d)` 的性能比其他颜色格式差很多,请选择合适的颜色格式。
+> `6-chars hex`是性能最好的颜色使用方式。除非有特殊原因,请使用`6-chars hex`格式。
 
-颜色名称可查看 [颜色名称列表](./color-names.html).
+>  颜色名称可查看 [颜色名称列表](./color-names.html)。
 
 ## CSS `length` 单位
 
-在 Weex 中,我们只支持 `px` 长度单位。并且它将在 JavaScript 运行时和本机渲染器中解析为数字类型。
-
-下面这些不同的写法,解析的结果完全相同。
-
+在 Weex 中,我们只支持 `px` 长度单位。
 ```css
 .classA { font-size: 48px; line-height: 64px; }
 ```
 
-不支持类似 `em`,`rem`,`pt` 这样的 CSS 标准中的其他长度单位。
+> 不支持类似 `em`,`rem`,`pt` 这样的 CSS 标准中的其他长度单位。
 
 ## CSS `number` 单位
+number可用于以下CSS属性:
+* [opacity](./common-styles.html)
+* [lines](./text-styles.html)
+* [flex](./common-styles.html)
 
-仅仅一个数字。用于 [`opacity`](./common-styles.html),[`lines`](./text-styles.html)等。
-
-有时值必须是整数,例如:`lines`。
-
-## CSS `percentage` 单位 (暂不支持)
-
-表示百分比值,如“50%”,“66.7%”等。
-
-它是 CSS 标准的一部分,但 Weex 暂不支持。
+## CSS `percentage` 单位 (暂不支持)
\ No newline at end of file
diff --git a/source/wiki/css-units.md b/source/wiki/css-units.md
index 1a220aa..972f836 100644
--- a/source/wiki/css-units.md
+++ b/source/wiki/css-units.md
@@ -29,28 +29,28 @@ version: 2.1
 }
 ```
 
-## Notes
+### Notes
 
-* Not support `hsl()`, `hsla()`, `currentColor`, or 8-character hexadecimal color.
+> `hsl()`, `hsla()`, `currentColor`, nor 8-character hexadecimal color are not supported.
 
-* Performance of `rgb(a,b,c)` or `rgba(a,b,c,d)` is much worse than other color formats, please select the appropriate color format.
+> `6-chars hex` format is the most efficient way. Use it unless you have a special reason.
 
-build-in color name you can see [Color Names](./color-names.html).
+> build-in [color names](./color-names.html).
 
 ## CSS `length` units
-
-In weex we only support px length units. It will resolve to a numeric type in the JavaScript runtime and native renderer.
+`px` is the only supported length units.
 You can use it like this :
 
 ```css
 .classA { font-size: 48px; line-height: 64px; }
 ```
 
-Other length units in the CSS standard like `em`, `rem`, and `pt` are not supported.
+> Other length units in the CSS standard like `em`, `rem`, and `pt` are not supported.
 
 ## CSS `number` units
+You can use `number` on following properties:
+* [opacity](./common-styles.html)
+* [lines](./text-styles.html)
+* [flex](./common-styles.html)
 
-You can use `number` on property [`opacity`](./common-styles.html) and [`lines`](./text-styles.html).
-
-
-## CSS `percentage` units (Not support now)
+## CSS `percentage` (Not support)
\ No newline at end of file