You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by fk...@apache.org on 2017/04/12 08:27:47 UTC

[04/17] incubator-weex git commit: * [html5] change viewport adapting algorithmn.

* [html5] change viewport adapting algorithmn.


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

Branch: refs/heads/0.11-dev
Commit: 501cde2fb571b61d4c19e5180e1cab4e6e219d37
Parents: 38f1a97
Author: MrRaindrop <te...@gmail.com>
Authored: Thu Apr 6 14:56:38 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Thu Apr 6 15:38:26 2017 +0800

----------------------------------------------------------------------
 html5/render/vue/README.md                      |  24 +-
 html5/render/vue/components/a.js                |   4 +-
 html5/render/vue/components/div.js              |   9 +-
 html5/render/vue/components/image.js            |  10 +-
 html5/render/vue/components/input.js            |  12 +-
 .../vue/components/scrollable/list/style.js     |  16 +
 .../components/scrollable/loading-indicator.js  |  38 ++-
 html5/render/vue/components/slider/index.js     |  30 +-
 html5/render/vue/components/slider/indicator.js |  32 +-
 html5/render/vue/components/switch.js           |  60 +++-
 html5/render/vue/components/text.js             |  15 +-
 html5/render/vue/components/textarea.js         |  13 +-
 html5/render/vue/components/web.js              |  13 +-
 html5/render/vue/core/style.js                  |   6 +-
 html5/render/vue/env/index.js                   |   2 +-
 html5/render/vue/env/weex.js                    |   7 +
 html5/render/vue/index.js                       |  13 +-
 html5/render/vue/mixins/base.js                 |  10 -
 html5/render/vue/mixins/style.js                | 156 +--------
 html5/render/vue/modules/animation.js           |   7 +-
 html5/render/vue/modules/dom.js                 |   5 +-
 html5/render/vue/modules/index.js               |   2 +-
 html5/render/vue/modules/modal/index.js         |  10 +-
 html5/render/vue/modules/modal/style.js         | 146 +++++++++
 html5/render/vue/styles/base.css                | 319 -------------------
 html5/render/vue/utils/index.js                 |  36 +--
 package.json                                    |   2 +-
 packages/weex-vue-render/README.md              |  24 +-
 packages/weex-vue-render/package.json           |   2 +-
 29 files changed, 447 insertions(+), 576 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/README.md
----------------------------------------------------------------------
diff --git a/html5/render/vue/README.md b/html5/render/vue/README.md
index 867b318..d41f777 100644
--- a/html5/render/vue/README.md
+++ b/html5/render/vue/README.md
@@ -6,29 +6,7 @@ It can be run on browser only based on Vue 2.x (without Weex).
 
 ## use vue-loader
 
-**NOTE: ** you should use `vue-loader` to bundle your `.vue` file, not using `weex-loader`.
-
-you should add config for `vue-loader` as below (`vue-loader` version should be `>= 11.2.0`)
-
-```javascript
-vue: {
-  /**
-   * important! should use postTransformNode to add $processStyle for
-   * inline style prefixing.
-   */
-  compilerModules: [
-    {
-      postTransformNode: el => {
-        el.staticStyle = `$processStyle(${el.staticStyle})`
-        el.styleBinding = `$processStyle(${el.styleBinding})`
-      }
-    }
-  ],
-  autoprefixer: {
-    browsers: ['last 7 versions']
-  }
-},
-```
+**NOTE: ** after `v0.11.3` there's no need to add `$processStyle` and `autoprefixer` in your vue-loader config anymore. The runtime render will take care of it once for all.
 
 ## component -> dom map
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/a.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/a.js b/html5/render/vue/components/a.js
index f0a28e5..18b0b16 100644
--- a/html5/render/vue/components/a.js
+++ b/html5/render/vue/components/a.js
@@ -1,7 +1,7 @@
 import { extractComponentStyle } from '../core'
 // import { validateStyles } from '../validator'
 
-const defaultStyle = `
+const _css = `
 .weex-a {
   text-decoration: none;
 }
@@ -27,5 +27,5 @@ export default {
       staticStyle: extractComponentStyle(this)
     }, this._trimTextNodeChildren(this.$slots.default))
   },
-  _d_style: defaultStyle
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/div.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/div.js b/html5/render/vue/components/div.js
index fd8ed3c..426b678 100644
--- a/html5/render/vue/components/div.js
+++ b/html5/render/vue/components/div.js
@@ -1,6 +1,12 @@
 // import { validateStyles } from '../validator'
 import { extractComponentStyle } from '../core'
 
+const _css = `
+body > .weex-div {
+  min-height: 100%;
+}
+`
+
 export default {
   name: 'weex-div',
   render (createElement) {
@@ -14,5 +20,6 @@ export default {
       staticClass: 'weex-div weex-ct',
       staticStyle: extractComponentStyle(this)
     }, this._trimTextNodeChildren(this.$slots.default))
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/image.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/image.js b/html5/render/vue/components/image.js
index f4980d6..98ad632 100644
--- a/html5/render/vue/components/image.js
+++ b/html5/render/vue/components/image.js
@@ -1,5 +1,12 @@
 import { extractComponentStyle } from '../core/style'
 import { extend } from '../utils'
+
+const _css = `
+.weex-image, .weex-img {
+  background-repeat: no-repeat;
+  background-position: 50% 50%;
+}
+`
 /**
  * get resize (stetch|cover|contain) related styles.
  */
@@ -63,5 +70,6 @@ export default {
       staticClass: 'weex-image weex-el',
       staticStyle: extend(style, resizeStyle)
     })
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/input.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/input.js b/html5/render/vue/components/input.js
index d65ce79..2d3590e 100644
--- a/html5/render/vue/components/input.js
+++ b/html5/render/vue/components/input.js
@@ -7,6 +7,15 @@ import { inputCommon } from '../mixins'
 import { extend, mapFormEvents } from '../utils'
 // import { validateStyles } from '../validator'
 
+const _css = `
+.weex-input, .weex-textarea {
+  font-size: 0.426667rem;
+}
+.weex-input:focus, .weex-textarea:focus {
+  outline: none;
+}
+`
+
 export default {
   mixins: [inputCommon],
   props: {
@@ -60,5 +69,6 @@ export default {
       staticClass: 'weex-input weex-el',
       staticStyle: extractComponentStyle(this)
     })
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/scrollable/list/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/scrollable/list/style.js b/html5/render/vue/components/scrollable/list/style.js
new file mode 100644
index 0000000..c9122af
--- /dev/null
+++ b/html5/render/vue/components/scrollable/list/style.js
@@ -0,0 +1,16 @@
+export default `
+body > .weex-list {
+  max-height: 100%;
+}
+
+.weex-list-wrapper {
+  -webkit-overflow-scrolling: touch;
+  overflow-y: scroll !important;
+  overflow-x: hidden;
+}
+
+.weex-list-inner {
+  -webkit-overflow-scrolling: touch;
+  width: 100%;
+}
+`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/scrollable/loading-indicator.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/scrollable/loading-indicator.js b/html5/render/vue/components/scrollable/loading-indicator.js
index e1f9854..b184cca 100644
--- a/html5/render/vue/components/scrollable/loading-indicator.js
+++ b/html5/render/vue/components/scrollable/loading-indicator.js
@@ -1,5 +1,40 @@
 import { extractComponentStyle } from '../../core'
 
+const _css = `
+.weex-refresh-indicator,
+.weex-loading-indicator {
+  width: 1.0rem;
+  height: 1.0rem;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+  overflow: visible;
+  background: none;
+}
+.weex-refresh-indicator:before,
+.weex-loading-indicator:before {
+  display: block;
+  content: '';
+  font-size: 0.16rem;
+  width: 1em;
+  height: 1em;
+  left: -60%;
+  top: 40%;
+  border-radius: 50%;
+  position: relative;
+  text-indent: -9999em;
+  -webkit-animation: weex-spinner 1.1s infinite ease;
+          animation: weex-spinner 1.1s infinite ease;
+  -webkit-transform: translate3d(1.0rem, 0, 0);
+          transform: translate3d(1.0rem, 0, 0);
+}
+`
+
 export default {
   render (createElement) {
     this.weexType = 'loading-indicator'
@@ -8,5 +43,6 @@ export default {
       staticClass: 'weex-loading-indicator weex-ct',
       staticStyle: extractComponentStyle(this)
     })
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/slider/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/slider/index.js b/html5/render/vue/components/slider/index.js
index b2f4a90..68e4a37 100644
--- a/html5/render/vue/components/slider/index.js
+++ b/html5/render/vue/components/slider/index.js
@@ -4,6 +4,32 @@ import { throttle, bind, extend, fireLazyload } from '../../utils'
 import indicator from './indicator'
 import slideMixin from './slideMixin'
 
+const _css = `
+.weex-slider-wrapper {
+  overflow: hidden;
+}
+
+.weex-slider-inner {
+  position: absolute;
+  height: 100%;
+  top: 0;
+  left: 0;
+}
+
+.weex-slider-cell {
+  display: block;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  margin: 0;
+  padding: 0;
+  height: 100%;
+  overflow: hidden;
+}
+`
+
 export default {
   mixins: [slideMixin],
   props: {
@@ -139,5 +165,7 @@ export default {
         this._indicator
       ]
     )
-  }
+  },
+  // export default css styles for this component.
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/slider/indicator.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/slider/indicator.js b/html5/render/vue/components/slider/indicator.js
index 3340cfd..6722041 100644
--- a/html5/render/vue/components/slider/indicator.js
+++ b/html5/render/vue/components/slider/indicator.js
@@ -1,6 +1,35 @@
 import { extractComponentStyle } from '../../core'
 import { extend, extendKeys } from '../../utils'
 
+const _css = `
+.weex-indicator {
+  position: absolute;
+  z-index: 10;
+  -webkit-flex-direction: row;
+  -ms-flex-direction: row;
+  flex-direction: row;
+  -webkit-box-orient: horizontal;
+  margin: 0;
+  padding: 0;
+}
+
+.weex-indicator-item {
+  display: inline-block;
+  position: relative;
+  border-radius: 50%;
+  width: 0.266667rem;
+  height: 0.266667rem;
+  background-color: #BBBBBB;
+}
+.weex-indicator-item + .weex-indicator-item {
+  margin-left: 0.133333rem;
+}
+
+.weex-indicator-item-active {
+  background-color: blue;
+}
+`
+
 function getIndicatorItemStyle (spec, isActive) {
   const style = {}
   style['background-color'] = spec[isActive ? 'itemSelectedColor' : 'itemColor']
@@ -119,5 +148,6 @@ export default {
   },
   render (createElement) {
     return _render(this, createElement)
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/switch.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/switch.js b/html5/render/vue/components/switch.js
index b04bf90..cf904c3 100644
--- a/html5/render/vue/components/switch.js
+++ b/html5/render/vue/components/switch.js
@@ -1,6 +1,63 @@
 // import { validateStyles } from '../validator'
 import { extractComponentStyle } from '../core'
 
+const _css = `
+.weex-switch {
+  border: 0.013333rem solid #dfdfdf;
+  cursor: pointer;
+  display: inline-block;
+  position: relative;
+  vertical-align: middle;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  box-sizing: content-box;
+  background-clip: content-box;
+  color: #64bd63;
+  width: 1.333333rem;
+  height: 0.8rem;
+  background-color: white;
+  border-color: #dfdfdf;
+  box-shadow: #dfdfdf 0 0 0 0 inset;
+  border-radius: 0.8rem;
+  -webkit-transition: border 0.4s, box-shadow 0.4s, background-color 1.2s;
+          transition: border 0.4s, box-shadow 0.4s, background-color 1.2s;
+}
+
+.weex-switch-checked {
+  background-color: #64bd63;
+  border-color: #64bd63;
+  box-shadow: #64bd63 0 0 0 0.533333rem inset;
+}
+
+.weex-switch-checked.weex-switch-disabled {
+  background-color: #A0CCA0;
+  box-shadow: #A0CCA0 0 0 0 0.533333rem inset;
+}
+
+.weex-switch-disabled {
+  background-color: #EEEEEE;
+}
+
+.weex-switch-inner {
+  width: 0.8rem;
+  height: 0.8rem;
+  background: #fff;
+  border-radius: 100%;
+  box-shadow: 0 0.013333rem 0.04rem rgba(0, 0, 0, 0.4);
+  position: absolute;
+  top: 0;
+  left: 0;
+  -webkit-transition: background-color 0.4s, left 0.2s;
+          transition: background-color 0.4s, left 0.2s;
+}
+
+.weex-switch-checked > .weex-switch-inner {
+  left: 0.533333rem;
+}
+`
+
 export default {
   props: {
     checked: {
@@ -52,5 +109,6 @@ export default {
       staticClass: this.wrapperClass,
       staticStyle: extractComponentStyle(this)
     }, [createElement('small', { staticClass: 'weex-switch-inner' })])
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/text.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/text.js b/html5/render/vue/components/text.js
index 5ecdffa..6963b0b 100644
--- a/html5/render/vue/components/text.js
+++ b/html5/render/vue/components/text.js
@@ -9,6 +9,18 @@
 import { extractComponentStyle } from '../core'
 import { extend } from '../utils'
 
+const _css = `
+.weex-text {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  position: relative;
+  white-space: pre-wrap;  /* not using 'pre': support auto line feed. */
+  font-size: 0.426667rem;
+  word-wrap: break-word;
+  overflow: hidden; /* it'll be clipped if the height is not high enough. */
+}
+`
+
 /**
  * Get text special styles (lines and text-overflow).
  */
@@ -43,5 +55,6 @@ export default {
       staticClass: 'weex-text weex-el',
       staticStyle: extend(style, textSpecStyle)
     }, this.$slots.default || [this.value])
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/textarea.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/textarea.js b/html5/render/vue/components/textarea.js
index d170051..e017512 100644
--- a/html5/render/vue/components/textarea.js
+++ b/html5/render/vue/components/textarea.js
@@ -1,8 +1,18 @@
 import { extractComponentStyle } from '../core'
 import { inputCommon } from '../mixins'
 import { extend, mapFormEvents } from '../utils'
+
 // import { validateStyles } from '../validator'
 
+const _css = `
+.weex-textarea {
+  font-size: 0.426667rem
+}
+.weex-textarea:focus {
+  outline: none;
+}
+`
+
 export default {
   mixins: [inputCommon],
   props: {
@@ -46,5 +56,6 @@ export default {
       staticClass: 'weex-textarea weex-el',
       staticStyle: extractComponentStyle(this)
     })
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/components/web.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/web.js b/html5/render/vue/components/web.js
index cccda37..f810e4b 100644
--- a/html5/render/vue/components/web.js
+++ b/html5/render/vue/components/web.js
@@ -2,6 +2,16 @@ import { extractComponentStyle } from '../core'
 import { createEvent } from '../utils'
 // import { validateStyles } from '../validator'
 
+const _css = `
+.weex-web {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  border: none;
+  box-sizing: border-box;
+}
+`
+
 export default {
   props: {
     src: String
@@ -49,5 +59,6 @@ export default {
       staticClass: 'weex-web weex-el',
       staticStyle: extractComponentStyle(this)
     })
-  }
+  },
+  _css
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/core/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/core/style.js b/html5/render/vue/core/style.js
index 0f3a814..1b5db77 100644
--- a/html5/render/vue/core/style.js
+++ b/html5/render/vue/core/style.js
@@ -38,7 +38,7 @@ export function getHeadStyleMap () {
          * .a { color: red; }
          * etc.
          */
-        const match = str.match(/((?:,?\s*\.[\w-]+\[data-v-\w+\])+)\s*({[^}]+)/)
+        const match = str.match(/((?:,?\s*\.[\w-]+\[data-v-\w+\](?::\w+)?)+)\s*({[^}]+)/)
         if (!match) {
           // not the vue static class styles map. so acquire no rules for this styleSheet.
           // just jump through this styleSheet and go to analyzing next.
@@ -88,10 +88,6 @@ export function getScopeIds (context) {
   return arr
 }
 
-export function setDefaultStyle () {
-  
-}
-
 /**
  * get style in <style scoped> tags for this component.
  */

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/env/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/env/index.js b/html5/render/vue/env/index.js
index 1eb3d21..0d997ee 100644
--- a/html5/render/vue/env/index.js
+++ b/html5/render/vue/env/index.js
@@ -1,4 +1,4 @@
-import css from '../styles/reset.css'
+import '../styles/reset.css'
 import '../styles/base.css'
 
 // import 'lazyimg'

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/env/weex.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/env/weex.js b/html5/render/vue/env/weex.js
index 8b2c7d5..d8b3760 100644
--- a/html5/render/vue/env/weex.js
+++ b/html5/render/vue/env/weex.js
@@ -45,6 +45,13 @@ const weex = {
     if (!this.__vue__) {
       return console.log('[Vue Render] Vue is not found. Please import Vue.js before register a component.')
     }
+    if (component._css) {
+      const css = component._css.replace(/\b[+-]?[\d.]+rem;?\b/g, function (m) {
+        return parseFloat(m) * 75 * weex.config.env.scale + 'px'
+      })
+      utils.appendCss(css, `weex-cmp-${name}`)
+      delete component._css
+    }
     this.__vue__.component(name, component)
   },
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/index.js b/html5/render/vue/index.js
index e381d6c..c782293 100644
--- a/html5/render/vue/index.js
+++ b/html5/render/vue/index.js
@@ -26,20 +26,9 @@ function init (Vue/*, options = {}*/) {
 
   // register sdk components.
   for (const name in components) {
-    Vue.component(name, components[name])
+    weex.registerComponent(name, components[name])
   }
 
-  // // get user extended plugins.
-  // const { components: comps, modules } = options
-  // // register user extended components.
-  // for (const name in comps) {
-  //   Vue.components(name, comps[name])
-  // }
-  // // register user extended modules.
-  // for (const mod in modules) {
-  //   this.registerModule(mod, modules[mod])
-  // }
-
   /* istanbul ignore next */
   // if (process.env.NODE_ENV === 'development') {
   //   if (semver.lt(Vue.version, '2.1.5')) {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/mixins/base.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/base.js b/html5/render/vue/mixins/base.js
index ca30e0c..8f0953e 100644
--- a/html5/render/vue/mixins/base.js
+++ b/html5/render/vue/mixins/base.js
@@ -57,16 +57,6 @@ export default {
   },
 
   methods: {
-    _getTopContext () {
-      let ctx = this
-      let vnode = ctx.$options._parentVnode
-      while (vnode) {
-        ctx = vnode.context
-        vnode = ctx.$options._parentVnode
-      }
-      return ctx
-    },
-
     _getScopeIds () {
       const arr = []
       let ctx = this

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/mixins/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/style.js b/html5/render/vue/mixins/style.js
index 051e6e3..1052501 100644
--- a/html5/render/vue/mixins/style.js
+++ b/html5/render/vue/mixins/style.js
@@ -1,68 +1,11 @@
 import {
-  camelizeKeys,
-  hyphenateKeys,
-  extend,
-  trimComment
-  // normalizeStyle
-} from '../utils'
-import { tagBegin, tagEnd } from '../utils/perf'
-import addPrefix from 'inline-style-prefixer/static'
+  getHeadStyleMap,
+  getComponentStyle,
+  extractComponentStyle
+} from '../core'
 
-function getHeadStyleMap () {
-  if (process.env.NODE_ENV === 'development') {
-    tagBegin('getHeadStyleMap')
-  }
-  const res = Array.from(document.styleSheets || [])
-    .reduce((pre, styleSheet) => {
-      // why not using styleSheet.rules || styleSheet.cssRules to get css rules ?
-      // because weex's components defined non-standard style attributes, which is
-      // auto ignored when access rule.cssText.
-      const strArr = trimComment(styleSheet.ownerNode.textContent.trim()).split(/}/)
-      const len = strArr.length
-      const rules = []
-      for (let i = 0; i < len; i++) {
-        const str = strArr[i]
-        if (!str || str.match(/^\s*$/)) {
-          continue
-        }
-
-        const match = str.match(/((?:,?\s*\.[[\]\w-]+\s*)+)({[^}]+)/)
-        if (!match) {
-          // not the vue static class styles map. so acquire no rules for this styleSheet.
-          // just jump through this styleSheet and go to analyzing next.
-          return pre
-        }
-        const clsNms = match[1].split(',').map(n => n.trim())
-        const cssText = match[2].replace(/[{}]/g, '').trim()
-        let clsNmsIdx = 0
-        const clsNmsLen = clsNms.length
-        while (clsNmsIdx < clsNmsLen) {
-          rules.push({
-            selectorText: clsNms[clsNmsIdx],
-            cssText
-          })
-          clsNmsIdx++
-        }
-      }
-      Array.from(rules).forEach(rule => {
-        const selector = rule.selectorText || ''
-        pre[selector] = trimComment(rule.cssText).split(';')
-          .reduce((styleObj, statement) => {
-            statement = statement.trim()
-            if (statement && statement.indexOf('/*') <= -1) {
-              const resArr = statement.split(':').map((part) => part.trim())
-              styleObj[resArr[0]] = resArr[1]
-            }
-            return styleObj
-          }, {})
-      })
-      return pre
-    }, {})
-  if (process.env.NODE_ENV === 'development') {
-    tagEnd('getHeadStyleMap')
-  }
-  return res
-}
+let warned = false
+const warnInfo = `[vue-render] after v0.11.3 there's no need to add $processStyle in vue-loader config anymore.`
 
 export default {
   beforeCreate () {
@@ -74,85 +17,15 @@ export default {
 
   methods: {
     $processStyle (style) {
-      window._style_processing_added = true
-      if (!style) {
-        return
-      }
-      if (window._process_style) {
-        return window._process_style(style)
-      }
-      if (style.display === 'flex') {
-        this.$nextTick(() => {
-          if (this.$el) {
-            this.$el.classList.add('weex-flex-ct')
-          }
-        })
-      }
-      return hyphenateKeys(addPrefix(camelizeKeys(style)))
-    },
-
-    _mergeStyle (data) {
-      const res = {}
-      const style = data.style
-      const staticStyle = data.staticStyle
-      const classes = typeof data.class === 'string' ? data.class.split(' ') : (data.class || [])
-      const staticClass = typeof data.staticClass === 'string' ? data.staticClass.split(' ') : (data.class || [])
-      const clsNms = staticClass.concat(classes)
-      extend(res, this._getScopeStyle(clsNms))
-      extend(res, staticStyle)
-      extend(res, style)
-      return hyphenateKeys(addPrefix(camelizeKeys(res)))
-    },
-
-    _getScopeStyle (classNames) {
-      const scopeIds = this._getScopeIds()
-      const style = {}
-      const styleMap = weex.styleMap
-      let map
-      let cls
-      let clsNmsIdx
-      let scpIdsIdx
-      const clsNmsLen = classNames.length
-      const scpIdsLen = scopeIds.length
-      if (clsNmsLen <= 0) {
-        return {}
-      }
-      clsNmsIdx = 0
-      while (clsNmsIdx < clsNmsLen) {
-        scpIdsIdx = 0
-        while (scpIdsIdx < scpIdsLen) {
-          cls = `.${classNames[clsNmsIdx]}[${scopeIds[scpIdsIdx]}]`
-          map = styleMap[cls]
-          if (!map) {
-            scpIdsIdx++
-            continue
-          }
-          for (const k in map) {
-            style[k] = map[k]
-          }
-          scpIdsIdx++
-        }
-        clsNmsIdx++
+      if (!warned) {
+        warned = true
+        console.warn(warnInfo)
       }
       return style
     },
 
-    _getSize (data) {
-      const wh = {}
-      const style = data.style
-      const staticStyle = data.staticStyle
-      const classes = typeof data.class === 'string' ? data.class.split(' ') : (data.class || [])
-      const staticClass = typeof data.staticClass === 'string' ? data.staticClass.split(' ') : (data.class || [])
-      const clsNms = staticClass.concat(classes)
-      function extendWHFrom (to, from) {
-        if (!from) { return }
-        from.width && (to.width = from.width)
-        from.height && (to.height = from.height)
-      }
-      extendWHFrom(wh, this._getScopeStyle(clsNms))
-      extendWHFrom(wh, staticStyle)
-      extendWHFrom(wh, style)
-      return wh
+    _extractComponentStyle () {
+      return extractComponentStyle(this)
     },
 
     /**
@@ -164,12 +37,7 @@ export default {
      *  4. data.staticClass style (scoped styles or static classes).
      */
     _getComponentStyle (data) {
-      const staticClassNames = (typeof data.staticClass === 'string') ? data.staticClass.split(' ') : (data.staticClass || [])
-      const classNames = (typeof data.class === 'string') ? data.class.split(' ') : (data.class || [])
-      const clsNms = staticClassNames.concat(classNames)
-      const style = this._getScopeStyle(clsNms)
-      const res = extend(style, data.staticStyle, data.style)
-      return res
+      return getComponentStyle(this)
     },
 
     _getParentRect () {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/modules/animation.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/modules/animation.js b/html5/render/vue/modules/animation.js
index 1177827..bfcc159 100644
--- a/html5/render/vue/modules/animation.js
+++ b/html5/render/vue/modules/animation.js
@@ -1,4 +1,4 @@
-import { nextFrame, toCSSText } from '../utils'
+import { nextFrame, toCSSText, autoPrefix, camelizeKeys, normalizeStyle } from '../utils'
 
 function transitionOnce (vnode, config, callback) {
   const duration = config.duration || 1000 // ms
@@ -24,7 +24,8 @@ function transitionOnce (vnode, config, callback) {
   dom.addEventListener('transitionend', transitionEndHandler)
 
   nextFrame(() => {
-    dom.style.cssText += toCSSText(config.styles || {})
+    dom.style.cssText
+      += toCSSText(autoPrefix(normalizeStyle(camelizeKeys(config.styles))) || {})
   })
 }
 
@@ -36,7 +37,7 @@ export default {
    * @param  {String} callback
    */
   transition (vnode, config, callback) {
-    // TODO: Make sure the transition is only run once
+    if (!config.styles) { return }
     return transitionOnce(vnode, config, () => {
       callback && callback()
     })

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/modules/dom.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/modules/dom.js b/html5/render/vue/modules/dom.js
index 1dd7c0f..b66c71a 100644
--- a/html5/render/vue/modules/dom.js
+++ b/html5/render/vue/modules/dom.js
@@ -1,4 +1,4 @@
-import { camelToKebab, appendStyle } from '../utils'
+import { camelToKebab, appendCss } from '../utils'
 
 function getParentScroller (vnode) {
   if (!vnode) return null
@@ -79,6 +79,7 @@ export default {
 
       if (options) {
         offset += Number(options.offset) || 0
+        offset *= weex.config.env.scale /* adapt offset to different screen scales. */
       }
       else if (process.env.NODE_ENV === 'development') {
         console.warn('[Vue Render] The second parameter of "scrollToElement" is required, '
@@ -144,6 +145,6 @@ export default {
       }
     }
     const styleText = `@${key}{${stylesText}}`
-    appendStyle(styleText, 'dom-added-rules')
+    appendCss(styleText, 'dom-added-rules')
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/modules/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/modules/index.js b/html5/render/vue/modules/index.js
index 917eea7..74fb95d 100644
--- a/html5/render/vue/modules/index.js
+++ b/html5/render/vue/modules/index.js
@@ -25,7 +25,6 @@ const legacyModules = {
 const modules = {
   animation,
   dom,
-  modal,
   navigator,
   webview
 }
@@ -35,6 +34,7 @@ export default {
     for (const k in legacyModules) {
       weex.install(legacyModules[k])
     }
+    weex.install(modal)
     for (const k in modules) {
       weex.registerModule(k, modules[k])
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/modules/modal/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/modules/modal/index.js b/html5/render/vue/modules/modal/index.js
index 4551800..8a74d86 100644
--- a/html5/render/vue/modules/modal/index.js
+++ b/html5/render/vue/modules/modal/index.js
@@ -2,9 +2,10 @@ import toast from './toast'
 import Alert from './alert'
 import Confirm from './confirm'
 import Prompt from './prompt'
+import _css from './style'
 
 // TODO: rewrite the modal styles
-export default {
+const modal = {
 
   // duration: default is 0.8 seconds.
   toast: function (config) {
@@ -46,3 +47,10 @@ export default {
     new Prompt(config).show()
   }
 }
+
+export default {
+  init: function (Weex) {
+    Weex.utils.appendCss(_css, 'weex-mud-modal')
+    Weex.registerModule('modal', modal)
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/modules/modal/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/modules/modal/style.js b/html5/render/vue/modules/modal/style.js
new file mode 100644
index 0000000..f430ff4
--- /dev/null
+++ b/html5/render/vue/modules/modal/style.js
@@ -0,0 +1,146 @@
+export default `
+.weex-toast {
+  font-size: 0.426667rem;
+  line-height: 0.426667rem;
+  position: fixed;
+  z-index: 1999999999;
+  box-sizing: border-box;
+  max-width: 80%;
+  bottom: 50%;
+  left: 50%;
+  padding: 0.213333rem;
+  background-color: #000;
+  color: #fff;
+  text-align: center;
+  opacity: 0.6;
+  -webkit-transition: all 0.4s ease-in-out;
+          transition: all 0.4s ease-in-out;
+  border-radius: 0.066667rem;
+  -webkit-transform: translateX(-50%);
+  -ms-transform: translateX(-50%);
+      transform: translateX(-50%);
+}
+
+.weex-toast.hide {
+  opacity: 0;
+}
+
+.weex-alert .weex-alert-ok {
+  width: 100%;
+}
+
+.weex-confirm .btn-group .btn {
+  float: left;
+  width: 50%;
+}
+
+.weex-confirm .btn-group .btn.btn-ok {
+  border-right: 0.013333rem solid #ddd;
+}
+
+.weex-modal-wrap {
+  display: none;
+  position: fixed;
+  z-index: 999999999;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: #000;
+  opacity: 0.5;
+}
+
+.weex-modal-node {
+  position: fixed;
+  z-index: 9999999999;
+  top: 50%;
+  left: 50%;
+  width: 6.666667rem;
+  min-height: 2.666667rem;
+  border-radius: 0.066667rem;
+  -webkit-transform: translate(-50%, -50%);
+  -ms-transform: translate(-50%, -50%);
+      transform: translate(-50%, -50%);
+  background-color: #fff;
+}
+
+.weex-modal-node.hide {
+  display: none;
+}
+
+.weex-modal-node .content {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-flex-direction: column;
+  -ms-flex-direction: column;
+      flex-direction: column;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+  -ms-flex-align: center;
+      align-items: center;
+  -webkit-box-pack: center;
+  -webkit-justify-content: center;
+  -ms-flex-pack: center;
+      justify-content: center;
+  width: 100%;
+  min-height: 1.866667rem;
+  box-sizing: border-box;
+  font-size: 0.426667rem;
+  line-height: 0.426667rem;
+  padding: 0.213333rem;
+  border-bottom: 0.013333rem solid #ddd;
+}
+
+.weex-modal-node .btn-group {
+  width: 100%;
+  height: 0.8rem;
+  font-size: 0.373333rem;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  border: none;
+}
+
+.weex-modal-node .btn-group .btn {
+  text-align: center;
+}
+
+.weex-modal-node .btn-group .btn {
+  box-sizing: border-box;
+  height: 0.8rem;
+  line-height: 0.8rem;
+  margin: 0;
+  padding: 0;
+  border: none;
+  background: none;
+  text-align: center;
+}
+
+.weex-prompt .input-wrap {
+  box-sizing: border-box;
+  width: 100%;
+  margin-top: 0.133333rem;
+  height: 0.96rem;
+}
+
+.weex-prompt .input-wrap .input {
+  box-sizing: border-box;
+  width: 100%;
+  height: 0.56rem;
+  line-height: 0.56rem;
+  font-size: 0.426667rem;
+  border: 0.013333rem solid #999;
+}
+
+.weex-prompt .btn-group .btn {
+  float: left;
+  width: 50%;
+}
+
+.weex-prompt .btn-group .btn.btn-ok {
+  border-right: 0.013333rem solid #ddd;
+}
+`

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/styles/base.css
----------------------------------------------------------------------
diff --git a/html5/render/vue/styles/base.css b/html5/render/vue/styles/base.css
index 656f3b3..17d0738 100644
--- a/html5/render/vue/styles/base.css
+++ b/html5/render/vue/styles/base.css
@@ -64,169 +64,6 @@
   min-width: 0;
 }
 
-
-
-body > .weex-div {
-  min-height: 100%;
-}
-
-.weex-input, .weex-textarea {
-  font-size: 0.426667rem;
-}
-.weex-input:focus, .weex-textarea:focus {
-  outline: none;
-}
-
-.weex-image, .weex-img {
-  background-repeat: no-repeat;
-  background-position: 50% 50%;
-}
-
-.weex-toast {
-  font-size: 0.426667rem;
-  line-height: 0.426667rem;
-  position: fixed;
-  z-index: 1999999999;
-  box-sizing: border-box;
-  max-width: 80%;
-  bottom: 50%;
-  left: 50%;
-  padding: 0.213333rem;
-  background-color: #000;
-  color: #fff;
-  text-align: center;
-  opacity: 0.6;
-  -webkit-transition: all 0.4s ease-in-out;
-          transition: all 0.4s ease-in-out;
-  border-radius: 0.066667rem;
-  -webkit-transform: translateX(-50%);
-  -ms-transform: translateX(-50%);
-      transform: translateX(-50%);
-}
-
-.weex-toast.hide {
-  opacity: 0;
-}
-
-.weex-alert .weex-alert-ok {
-  width: 100%;
-}
-
-.weex-confirm .btn-group .btn {
-  float: left;
-  width: 50%;
-}
-
-.weex-confirm .btn-group .btn.btn-ok {
-  border-right: 0.013333rem solid #ddd;
-}
-
-.weex-modal-wrap {
-  display: none;
-  position: fixed;
-  z-index: 999999999;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background-color: #000;
-  opacity: 0.5;
-}
-
-.weex-modal-node {
-  position: fixed;
-  z-index: 9999999999;
-  top: 50%;
-  left: 50%;
-  width: 6.666667rem;
-  min-height: 2.666667rem;
-  border-radius: 0.066667rem;
-  -webkit-transform: translate(-50%, -50%);
-  -ms-transform: translate(-50%, -50%);
-      transform: translate(-50%, -50%);
-  background-color: #fff;
-}
-
-.weex-modal-node.hide {
-  display: none;
-}
-
-.weex-modal-node .content {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-orient: vertical;
-  -webkit-flex-direction: column;
-  -ms-flex-direction: column;
-      flex-direction: column;
-  -webkit-box-align: center;
-  -webkit-align-items: center;
-  -ms-flex-align: center;
-      align-items: center;
-  -webkit-box-pack: center;
-  -webkit-justify-content: center;
-  -ms-flex-pack: center;
-      justify-content: center;
-  width: 100%;
-  min-height: 1.866667rem;
-  box-sizing: border-box;
-  font-size: 0.426667rem;
-  line-height: 0.426667rem;
-  padding: 0.213333rem;
-  border-bottom: 0.013333rem solid #ddd;
-}
-
-.weex-modal-node .btn-group {
-  width: 100%;
-  height: 0.8rem;
-  font-size: 0.373333rem;
-  text-align: center;
-  margin: 0;
-  padding: 0;
-  border: none;
-}
-
-.amfe-modal-node .btn-group .btn {
-  text-align: center;
-}
-
-.weex-modal-node .btn-group .btn {
-  box-sizing: border-box;
-  height: 0.8rem;
-  line-height: 0.8rem;
-  margin: 0;
-  padding: 0;
-  border: none;
-  background: none;
-  text-align: center;
-}
-
-.weex-prompt .input-wrap {
-  box-sizing: border-box;
-  width: 100%;
-  margin-top: 0.133333rem;
-  height: 0.96rem;
-}
-
-.weex-prompt .input-wrap .input {
-  box-sizing: border-box;
-  width: 100%;
-  height: 0.56rem;
-  line-height: 0.56rem;
-  font-size: 0.426667rem;
-  border: 0.013333rem solid #999;
-}
-
-.weex-prompt .btn-group .btn {
-  float: left;
-  width: 50%;
-}
-
-.weex-prompt .btn-group .btn.btn-ok {
-  border-right: 0.013333rem solid #ddd;
-}
-
 body > .weex-list,
 body > .weex-scroller {
   max-height: 100%;
@@ -300,90 +137,6 @@ body > .weex-scroller {
   overflow: hidden;
 }
 
-.weex-slider-wrapper {
-  overflow: hidden;
-}
-
-.weex-slider-inner {
-  position: absolute;
-  height: 100%;
-  top: 0;
-  left: 0;
-}
-
-.weex-slider-cell {
-  display: block;
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  margin: 0;
-  padding: 0;
-  height: 100%;
-  overflow: hidden;
-}
-
-.weex-indicator {
-  position: absolute;
-  z-index: 10;
-  -webkit-flex-direction: row;
-  -ms-flex-direction: row;
-  flex-direction: row;
-  -webkit-box-orient: horizontal;
-  margin: 0;
-  padding: 0;
-}
-
-.weex-indicator-item {
-  display: inline-block;
-  position: relative;
-  border-radius: 50%;
-  width: 0.266667rem;
-  height: 0.266667rem;
-  background-color: #BBBBBB;
-}
-.weex-indicator-item + .weex-indicator-item {
-  margin-left: 0.133333rem;
-}
-
-.weex-indicator-item-active {
-  background-color: blue;
-}
-
-.weex-refresh-indicator,
-.weex-loading-indicator {
-  width: 1.0rem;
-  height: 1.0rem;
-  -webkit-box-align: center;
-  -webkit-align-items: center;
-      -ms-flex-align: center;
-          align-items: center;
-  -webkit-box-pack: center;
-  -webkit-justify-content: center;
-      -ms-flex-pack: center;
-          justify-content: center;
-  overflow: visible;
-  background: none;
-}
-.weex-refresh-indicator:before,
-.weex-loading-indicator:before {
-  display: block;
-  content: '';
-  font-size: 0.16rem;
-  width: 1em;
-  height: 1em;
-  left: -60%;
-  top: 40%;
-  border-radius: 50%;
-  position: relative;
-  text-indent: -9999em;
-  -webkit-animation: weex-spinner 1.1s infinite ease;
-          animation: weex-spinner 1.1s infinite ease;
-  -webkit-transform: translate3d(1.0rem, 0, 0);
-          transform: translate3d(1.0rem, 0, 0);
-}
-
 @-webkit-keyframes weex-spinner {
   0%,
   100% {
@@ -439,75 +192,3 @@ body > .weex-scroller {
     box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2), 2.5em 0em 0 0em rgba(255, 255, 255, 0.2), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2), 0em 2.5em 0 0em rgba(255, 255, 255, 0.2), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.5), -2.6em 0em 0 0em rgba(255, 255, 255, 0.7), -1.8em -1.8em 0 0em #ffffff;
   }
 }
-.weex-switch {
-  border: 0.013333rem solid #dfdfdf;
-  cursor: pointer;
-  display: inline-block;
-  position: relative;
-  vertical-align: middle;
-  -webkit-user-select: none;
-     -moz-user-select: none;
-      -ms-user-select: none;
-          user-select: none;
-  box-sizing: content-box;
-  background-clip: content-box;
-  color: #64bd63;
-  width: 1.333333rem;
-  height: 0.8rem;
-  background-color: white;
-  border-color: #dfdfdf;
-  box-shadow: #dfdfdf 0 0 0 0 inset;
-  border-radius: 0.8rem;
-  -webkit-transition: border 0.4s, box-shadow 0.4s, background-color 1.2s;
-          transition: border 0.4s, box-shadow 0.4s, background-color 1.2s;
-}
-
-.weex-switch-checked {
-  background-color: #64bd63;
-  border-color: #64bd63;
-  box-shadow: #64bd63 0 0 0 0.533333rem inset;
-}
-
-.weex-switch-checked.weex-switch-disabled {
-  background-color: #A0CCA0;
-  box-shadow: #A0CCA0 0 0 0 0.533333rem inset;
-}
-
-.weex-switch-disabled {
-  background-color: #EEEEEE;
-}
-
-.weex-switch-inner {
-  width: 0.8rem;
-  height: 0.8rem;
-  background: #fff;
-  border-radius: 100%;
-  box-shadow: 0 0.013333rem 0.04rem rgba(0, 0, 0, 0.4);
-  position: absolute;
-  top: 0;
-  left: 0;
-  -webkit-transition: background-color 0.4s, left 0.2s;
-          transition: background-color 0.4s, left 0.2s;
-}
-
-.weex-switch-checked > .weex-switch-inner {
-  left: 0.533333rem;
-}
-
-.weex-text {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  position: relative;
-  white-space: pre-wrap;  /* not using 'pre': support auto line feed. */
-  font-size: 0.426667rem;
-  word-wrap: break-word;
-  overflow: hidden; /* it'll be clipped if the height is not high enough. */
-}
-
-.weex-web {
-  position: relative;
-  width: 100%;
-  height: 100%;
-  border: none;
-  box-sizing: border-box;
-}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/html5/render/vue/utils/index.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/utils/index.js b/html5/render/vue/utils/index.js
index 46142a8..a010f10 100644
--- a/html5/render/vue/utils/index.js
+++ b/html5/render/vue/utils/index.js
@@ -58,17 +58,17 @@ export function hyphenateKeys (obj) {
   return res
 }
 
-// const vendorsReg = /webkit-|moz-|o-|ms-/
-// export function hyphenateStyleKeys (obj) {
-//   const res = {}
-//   for (const key in obj) {
-//     const hk = hyphenate(key).replace(vendorsReg, function ($0) {
-//       return '-' + $0
-//     })
-//     res[hk] = obj[key]
-//   }
-//   return res
-// }
+const vendorsReg = /webkit-|moz-|o-|ms-/
+export function hyphenateStyleKeys (obj) {
+  const res = {}
+  for (const key in obj) {
+    const hk = hyphenate(key).replace(vendorsReg, function ($0) {
+      return '-' + $0
+    })
+    res[hk] = obj[key]
+  }
+  return res
+}
 
 export function camelToKebab (name) {
   if (!name) { return '' }
@@ -77,8 +77,8 @@ export function camelToKebab (name) {
   })
 }
 
-export function appendStyle (css, styleId, replace) {
-  let style = document.getElementById(styleId)
+export function appendCss (css, cssId, replace) {
+  let style = document.getElementById(cssId)
   if (style && replace) {
     style.parentNode.removeChild(style)
     style = null
@@ -86,7 +86,7 @@ export function appendStyle (css, styleId, replace) {
   if (!style) {
     style = document.createElement('style')
     style.type = 'text/css'
-    styleId && (style.id = styleId)
+    cssId && (style.id = cssId)
     document.getElementsByTagName('head')[0].appendChild(style)
   }
   style.appendChild(document.createTextNode(css))
@@ -100,11 +100,11 @@ export function nextFrame (callback) {
 }
 
 export function toCSSText (object) {
+  if (!object) { return }
+  const obj = hyphenateStyleKeys(object)
   let cssText = ''
-  if (object) {
-    for (const key in object) {
-      cssText += `${hyphenate(key)}:${object[key]};`
-    }
+  for (const key in obj) {
+    cssText += `${key}:${obj[key]};`
   }
   return cssText
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index c60d18b..69aecaf 100644
--- a/package.json
+++ b/package.json
@@ -3,8 +3,8 @@
   "version": "0.4.0",
   "subversion": {
     "browser": "0.5.0",
-    "vue-render": "0.11.2",
     "framework": "0.19.17",
+    "vue-render": "0.11.3",
     "transformer": ">=0.1.5 <0.5"
   },
   "description": "A framework for building Mobile cross-platform UI",

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/packages/weex-vue-render/README.md
----------------------------------------------------------------------
diff --git a/packages/weex-vue-render/README.md b/packages/weex-vue-render/README.md
index 867b318..d41f777 100644
--- a/packages/weex-vue-render/README.md
+++ b/packages/weex-vue-render/README.md
@@ -6,29 +6,7 @@ It can be run on browser only based on Vue 2.x (without Weex).
 
 ## use vue-loader
 
-**NOTE: ** you should use `vue-loader` to bundle your `.vue` file, not using `weex-loader`.
-
-you should add config for `vue-loader` as below (`vue-loader` version should be `>= 11.2.0`)
-
-```javascript
-vue: {
-  /**
-   * important! should use postTransformNode to add $processStyle for
-   * inline style prefixing.
-   */
-  compilerModules: [
-    {
-      postTransformNode: el => {
-        el.staticStyle = `$processStyle(${el.staticStyle})`
-        el.styleBinding = `$processStyle(${el.styleBinding})`
-      }
-    }
-  ],
-  autoprefixer: {
-    browsers: ['last 7 versions']
-  }
-},
-```
+**NOTE: ** after `v0.11.3` there's no need to add `$processStyle` and `autoprefixer` in your vue-loader config anymore. The runtime render will take care of it once for all.
 
 ## component -> dom map
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/501cde2f/packages/weex-vue-render/package.json
----------------------------------------------------------------------
diff --git a/packages/weex-vue-render/package.json b/packages/weex-vue-render/package.json
index 286ae02..48f8d95 100644
--- a/packages/weex-vue-render/package.json
+++ b/packages/weex-vue-render/package.json
@@ -1,6 +1,6 @@
 {
   "name": "weex-vue-render",
-  "version": "0.11.2",
+  "version": "0.11.3",
   "description": "Weex built-in components for Vue 2.x.",
   "license": "Apache-2.0",
   "main": "src/render/vue/index.js",