Repository: incubator-weex-site
Updated Branches:
  refs/heads/master dfeabe7a7 -> 04e1a8600


Update css-units.md

Add css-units document

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/b4890126
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/b4890126
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/b4890126

Branch: refs/heads/master
Commit: b4890126576cd453540a959c232f47c35f086102
Parents: a192a55
Author: Mario <faterr...@gmail.com>
Authored: Wed Mar 28 14:32:11 2018 +0800
Committer: GitHub <nore...@github.com>
Committed: Wed Mar 28 14:32:11 2018 +0800

----------------------------------------------------------------------
 source/wiki/css-units.md | 48 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/b4890126/source/wiki/css-units.md
----------------------------------------------------------------------
diff --git a/source/wiki/css-units.md b/source/wiki/css-units.md
index ff35300..88125a3 100644
--- a/source/wiki/css-units.md
+++ b/source/wiki/css-units.md
@@ -8,4 +8,50 @@ version: 2.1
 
 <!-- toc -->
 
-Work in progresss.
+## CSS `color` units
+
+```css
+.classA {
+  /* 3-chars hex */
+  color: #0f0;
+  /* 6-chars hex */
+  color: #00ff00;
+  /* rgba */
+  color: rgb(255, 0, 0);
+  /* rgba */
+  color: rgba(255, 0, 0, 0.5);
+  /* transparent */
+  color: transparent;
+  /* Basic color keywords */
+  color: orange;
+  /* Extended color keywords */
+  color: darkgray;
+}
+```
+
+## Notes
+
+* Not support `hsl()`, `hsla()`, `currentColor`, or 8-character hexadecimal 
color.
+
+* 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.
+
+build-in color name you can see [Color Names](./color-names.html).
+
+## CSS `length` units
+
+In weex we only support `px` length units., and it will resolve to a numeric 
type in the JavaScript runtime and native renderer.
+
+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.
+
+## CSS `number` units
+
+You can use `number` on property [`opacity`](./common-styles.html) and 
[`lines`](./text-styles.html).
+
+
+## CSS `percentage` units (Not support now)

Reply via email to