diff --git a/package.json b/package.json index 24697a9a..a9f77035 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "fbjs": "^0.7.2", - "inline-style-prefixer": "^0.6.7", + "inline-style-prefix-all": "^1.0.2", "lodash.debounce": "^3.1.1", "react-tappable": "^0.7.1", "react-textarea-autosize": "^3.1.0" diff --git a/src/apis/StyleSheet/Store.js b/src/apis/StyleSheet/Store.js index 02bcc60f..251afd37 100644 --- a/src/apis/StyleSheet/Store.js +++ b/src/apis/StyleSheet/Store.js @@ -1,5 +1,5 @@ +import prefixAll from 'inline-style-prefix-all' import hyphenate from './hyphenate' -import prefixer from './prefixer' export default class Store { constructor( @@ -46,7 +46,7 @@ export default class Store { // transform the declarations into CSS rules with vendor-prefixes const buildCSSRules = (property, values) => { return values.reduce((cssRules, value) => { - const declarations = prefixer({ [property]: value }) + const declarations = prefixAll({ [property]: value }) const cssDeclarations = Object.keys(declarations).reduce((str, prop) => { const value = declarations[prop] str += `${hyphenate(prop)}:${value};` diff --git a/src/apis/StyleSheet/StyleSheetRegistry.js b/src/apis/StyleSheet/StyleSheetRegistry.js index 4c6df605..823e730a 100644 --- a/src/apis/StyleSheet/StyleSheetRegistry.js +++ b/src/apis/StyleSheet/StyleSheetRegistry.js @@ -6,8 +6,8 @@ * @flow */ +import prefixAll from 'inline-style-prefix-all' import flattenStyle from './flattenStyle' -import prefixer from './prefixer' export default class StyleSheetRegistry { static registerStyle(style: Object, store): number { @@ -39,7 +39,7 @@ export default class StyleSheetRegistry { } _className = classList.join(' ') - _style = prefixer(_style) + _style = prefixAll(_style) return { className: _className, style: _style } } diff --git a/src/apis/StyleSheet/prefixer.js b/src/apis/StyleSheet/prefixer.js deleted file mode 100644 index 7868d92d..00000000 --- a/src/apis/StyleSheet/prefixer.js +++ /dev/null @@ -1,3 +0,0 @@ -import Prefixer from 'inline-style-prefixer' -const prefixer = Prefixer.prefixAll -export default prefixer