inline-style-prefixer
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -24,2 +24,3 @@ import prefixProperty from './utils/prefixProperty'; | ||
var processedValue = prefixValue(plugins, property, value[i], style, prefixMap); | ||
addNewValuesOnly(combinedValue, processedValue || value[i]); | ||
@@ -26,0 +27,0 @@ } |
@@ -5,3 +5,2 @@ import backgroundClip from 'inline-style-prefixer/lib/plugins/backgroundClip'; | ||
import imageSet from 'inline-style-prefixer/lib/plugins/imageSet'; | ||
import position from 'inline-style-prefixer/lib/plugins/position'; | ||
import sizing from 'inline-style-prefixer/lib/plugins/sizing'; | ||
@@ -17,4 +16,4 @@ import transition from 'inline-style-prefixer/lib/plugins/transition'; | ||
export default { | ||
plugins: [backgroundClip, crossFade, gradient, imageSet, position, sizing, transition], | ||
prefixMap: { "appearance": wmms, "textEmphasisPosition": wms, "textEmphasis": wms, "textEmphasisStyle": wms, "textEmphasisColor": wms, "boxDecorationBreak": wms, "maskImage": wms, "maskMode": wms, "maskRepeat": wms, "maskPosition": wms, "maskClip": wms, "maskOrigin": wms, "maskSize": wms, "maskComposite": wms, "mask": wms, "maskBorderSource": wms, "maskBorderMode": wms, "maskBorderSlice": wms, "maskBorderWidth": wms, "maskBorderOutset": wms, "maskBorderRepeat": wms, "maskBorder": wms, "maskType": wms, "userSelect": wms, "backdropFilter": w, "clipPath": w, "textDecorationStyle": w, "textDecorationSkip": w, "textDecorationLine": w, "textDecorationColor": w, "hyphens": wms, "textOrientation": w, "tabSize": m, "wrapFlow": ms, "wrapThrough": ms, "wrapMargin": ms, "scrollSnapType": ms, "scrollSnapPointsX": ms, "scrollSnapPointsY": ms, "scrollSnapDestination": ms, "scrollSnapCoordinate": ms, "textSizeAdjust": ["ms", "Webkit"], "flowInto": ms, "flowFrom": ms, "breakBefore": ms, "breakAfter": ms, "breakInside": ms, "regionFragment": ms, "fontKerning": w } | ||
plugins: [backgroundClip, crossFade, gradient, imageSet, sizing, transition], | ||
prefixMap: { "appearance": wmms, "textEmphasisPosition": wms, "textEmphasis": wms, "textEmphasisStyle": wms, "textEmphasisColor": wms, "boxDecorationBreak": wms, "maskImage": wms, "maskMode": wms, "maskRepeat": wms, "maskPosition": wms, "maskClip": wms, "maskOrigin": wms, "maskSize": wms, "maskComposite": wms, "mask": wms, "maskBorderSource": wms, "maskBorderMode": wms, "maskBorderSlice": wms, "maskBorderWidth": wms, "maskBorderOutset": wms, "maskBorderRepeat": wms, "maskBorder": wms, "maskType": wms, "userSelect": wms, "backdropFilter": w, "clipPath": w, "hyphens": wms, "textOrientation": w, "tabSize": m, "wrapFlow": ms, "wrapThrough": ms, "wrapMargin": ms, "scrollSnapType": ms, "scrollSnapPointsX": ms, "scrollSnapPointsY": ms, "scrollSnapDestination": ms, "scrollSnapCoordinate": ms, "textSizeAdjust": ["ms", "Webkit"], "flowInto": ms, "flowFrom": ms, "breakBefore": ms, "breakAfter": ms, "breakInside": ms, "regionFragment": ms, "fontKerning": w, "textDecorationStyle": w, "textDecorationSkip": w, "textDecorationLine": w, "textDecorationColor": w } | ||
}; |
@@ -42,10 +42,13 @@ import { getSupport } from 'caniuse-api'; | ||
for (var i = 0, len = keywordProperties.length; i < len; ++i) { | ||
if (versions[browser].x >= browserList[browser]) { | ||
var property = keywordProperties[i]; | ||
if (!prefixMap[property]) { | ||
prefixMap[property] = []; | ||
} | ||
if (versions[browser]) { | ||
if (versions[browser].x >= browserList[browser]) { | ||
var property = keywordProperties[i]; | ||
if (prefixMap[property].indexOf(prefix) === -1) { | ||
prefixMap[property].push(prefix); | ||
if (!prefixMap[property]) { | ||
prefixMap[property] = []; | ||
} | ||
if (prefixMap[property].indexOf(prefix) === -1) { | ||
prefixMap[property].push(prefix); | ||
} | ||
} | ||
@@ -52,0 +55,0 @@ } |
@@ -5,3 +5,2 @@ import createPrefixer from './createPrefixer'; | ||
import backgroundClip from './plugins/backgroundClip'; | ||
import cursor from './plugins/cursor'; | ||
@@ -20,3 +19,3 @@ import crossFade from './plugins/crossFade'; | ||
var plugins = [backgroundClip, crossFade, cursor, filter, flexboxOld, gradient, grid, imageSet, logical, position, sizing, transition, flex]; | ||
var plugins = [crossFade, cursor, filter, flexboxOld, gradient, grid, imageSet, logical, position, sizing, transition, flex]; | ||
@@ -23,0 +22,0 @@ var prefix = createPrefixer({ |
@@ -1,11 +0,12 @@ | ||
import isPrefixedValue from 'css-in-js-utils/lib/isPrefixedValue'; | ||
import { isPrefixedValue } from 'css-in-js-utils'; | ||
var CALC_REGEX = /calc\(/g; | ||
var prefixes = ['-webkit-', '-moz-', '']; | ||
export default function calc(property, value) { | ||
if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('calc(') > -1) { | ||
if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('calc(') !== -1) { | ||
return prefixes.map(function (prefix) { | ||
return value.replace(/calc\(/g, prefix + 'calc('); | ||
return value.replace(CALC_REGEX, prefix + 'calc('); | ||
}); | ||
} | ||
} |
@@ -1,3 +0,4 @@ | ||
import isPrefixedValue from 'css-in-js-utils/lib/isPrefixedValue'; | ||
import { isPrefixedValue } from 'css-in-js-utils'; | ||
var CROSS_FADE_REGEX = /cross-fade\(/g; | ||
// http://caniuse.com/#search=cross-fade | ||
@@ -7,7 +8,7 @@ var prefixes = ['-webkit-', '']; | ||
export default function crossFade(property, value) { | ||
if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('cross-fade(') > -1) { | ||
if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('cross-fade(') !== -1) { | ||
return prefixes.map(function (prefix) { | ||
return value.replace(/cross-fade\(/g, prefix + 'cross-fade('); | ||
return value.replace(CROSS_FADE_REGEX, prefix + 'cross-fade('); | ||
}); | ||
} | ||
} |
@@ -1,3 +0,4 @@ | ||
import isPrefixedValue from 'css-in-js-utils/lib/isPrefixedValue'; | ||
import { isPrefixedValue } from 'css-in-js-utils'; | ||
var FILTER_REGEX = /filter\(/g; | ||
// http://caniuse.com/#feat=css-filter-function | ||
@@ -7,7 +8,7 @@ var prefixes = ['-webkit-', '']; | ||
export default function filter(property, value) { | ||
if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('filter(') > -1) { | ||
if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('filter(') !== -1) { | ||
return prefixes.map(function (prefix) { | ||
return value.replace(/filter\(/g, prefix + 'filter('); | ||
return value.replace(FILTER_REGEX, prefix + 'filter('); | ||
}); | ||
} | ||
} |
@@ -16,2 +16,3 @@ var alternativeValues = { | ||
flexBasis: 'msFlexPreferredSize' | ||
// Full expanded syntax is flex-grow | flex-shrink | flex-basis. | ||
@@ -27,6 +28,8 @@ };var flexShorthandMappings = { | ||
var logTag = 'inline-style-prefixer.flexboxIE plugin'; | ||
export default function flexboxIE(property, value, style) { | ||
if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) { | ||
if (alternativeProps.hasOwnProperty(property)) { | ||
style[alternativeProps[property]] = alternativeValues[value] || value; | ||
} | ||
if (property === 'flex') { | ||
@@ -48,3 +51,3 @@ // For certain values we can do straight mappings based on the spec | ||
// ignore negative values; | ||
console.warn(logTag + ': "flex: ' + value + '", negative values is not valid and will be ignored.'); | ||
console.warn(logTag + ': "flex: ' + value + '", negative values are not valid and will be ignored.'); | ||
return; | ||
@@ -54,3 +57,3 @@ } | ||
if (!value.split) { | ||
console.warn(logTag + ': "flex: ' + value + '", value format is not detected, it will be remain as is'); | ||
console.warn(logTag + ': "flex: ' + value + '", value format are not detected, it will be remain as is'); | ||
style.msFlex = value; | ||
@@ -57,0 +60,0 @@ return; |
@@ -1,2 +0,1 @@ | ||
import backgroundClip from './backgroundClip'; | ||
import calc from './calc'; | ||
@@ -17,2 +16,2 @@ import cursor from './cursor'; | ||
export default [backgroundClip, calc, crossFade, cursor, filter, flex, flexboxIE, flexboxOld, gradient, grid, imageSet, logical, position, sizing, transition]; | ||
export default [calc, crossFade, cursor, filter, flex, flexboxIE, flexboxOld, gradient, grid, imageSet, logical, position, sizing, transition]; |
import capitalizeString from './capitalizeString'; | ||
export default function prefixProperty(prefixProperties, property, style) { | ||
var requiredPrefixes = prefixProperties[property]; | ||
export default function prefixProperty(prefixProperties, property, style) { | ||
if (prefixProperties.hasOwnProperty(property)) { | ||
var newStyle = {}; | ||
var requiredPrefixes = prefixProperties[property]; | ||
if (requiredPrefixes && style.hasOwnProperty(property)) { | ||
var capitalizedProperty = capitalizeString(property); | ||
var keys = Object.keys(style); | ||
for (var i = 0; i < keys.length; i++) { | ||
var styleProperty = keys[i]; | ||
if (styleProperty === property) { | ||
for (var j = 0; j < requiredPrefixes.length; j++) { | ||
newStyle[requiredPrefixes[j] + capitalizedProperty] = style[property]; | ||
} | ||
for (var i = 0; i < requiredPrefixes.length; ++i) { | ||
var prefixedProperty = requiredPrefixes[i] + capitalizedProperty; | ||
if (!style[prefixedProperty]) { | ||
style[prefixedProperty] = style[property]; | ||
} | ||
newStyle[styleProperty] = style[styleProperty]; | ||
} | ||
return newStyle; | ||
} | ||
return style; | ||
} |
@@ -43,2 +43,3 @@ 'use strict'; | ||
var processedValue = (0, _prefixValue2.default)(plugins, property, value[i], style, prefixMap); | ||
(0, _addNewValuesOnly2.default)(combinedValue, processedValue || value[i]); | ||
@@ -45,0 +46,0 @@ } |
@@ -23,6 +23,2 @@ 'use strict'; | ||
var _position = require('inline-style-prefixer/lib/plugins/position'); | ||
var _position2 = _interopRequireDefault(_position); | ||
var _sizing = require('inline-style-prefixer/lib/plugins/sizing'); | ||
@@ -46,4 +42,4 @@ | ||
exports.default = { | ||
plugins: [_backgroundClip2.default, _crossFade2.default, _gradient2.default, _imageSet2.default, _position2.default, _sizing2.default, _transition2.default], | ||
prefixMap: { "appearance": wmms, "textEmphasisPosition": wms, "textEmphasis": wms, "textEmphasisStyle": wms, "textEmphasisColor": wms, "boxDecorationBreak": wms, "maskImage": wms, "maskMode": wms, "maskRepeat": wms, "maskPosition": wms, "maskClip": wms, "maskOrigin": wms, "maskSize": wms, "maskComposite": wms, "mask": wms, "maskBorderSource": wms, "maskBorderMode": wms, "maskBorderSlice": wms, "maskBorderWidth": wms, "maskBorderOutset": wms, "maskBorderRepeat": wms, "maskBorder": wms, "maskType": wms, "userSelect": wms, "backdropFilter": w, "clipPath": w, "textDecorationStyle": w, "textDecorationSkip": w, "textDecorationLine": w, "textDecorationColor": w, "hyphens": wms, "textOrientation": w, "tabSize": m, "wrapFlow": ms, "wrapThrough": ms, "wrapMargin": ms, "scrollSnapType": ms, "scrollSnapPointsX": ms, "scrollSnapPointsY": ms, "scrollSnapDestination": ms, "scrollSnapCoordinate": ms, "textSizeAdjust": ["ms", "Webkit"], "flowInto": ms, "flowFrom": ms, "breakBefore": ms, "breakAfter": ms, "breakInside": ms, "regionFragment": ms, "fontKerning": w } | ||
plugins: [_backgroundClip2.default, _crossFade2.default, _gradient2.default, _imageSet2.default, _sizing2.default, _transition2.default], | ||
prefixMap: { "appearance": wmms, "textEmphasisPosition": wms, "textEmphasis": wms, "textEmphasisStyle": wms, "textEmphasisColor": wms, "boxDecorationBreak": wms, "maskImage": wms, "maskMode": wms, "maskRepeat": wms, "maskPosition": wms, "maskClip": wms, "maskOrigin": wms, "maskSize": wms, "maskComposite": wms, "mask": wms, "maskBorderSource": wms, "maskBorderMode": wms, "maskBorderSlice": wms, "maskBorderWidth": wms, "maskBorderOutset": wms, "maskBorderRepeat": wms, "maskBorder": wms, "maskType": wms, "userSelect": wms, "backdropFilter": w, "clipPath": w, "hyphens": wms, "textOrientation": w, "tabSize": m, "wrapFlow": ms, "wrapThrough": ms, "wrapMargin": ms, "scrollSnapType": ms, "scrollSnapPointsX": ms, "scrollSnapPointsY": ms, "scrollSnapDestination": ms, "scrollSnapCoordinate": ms, "textSizeAdjust": ["ms", "Webkit"], "flowInto": ms, "flowFrom": ms, "breakBefore": ms, "breakAfter": ms, "breakInside": ms, "regionFragment": ms, "fontKerning": w, "textDecorationStyle": w, "textDecorationSkip": w, "textDecorationLine": w, "textDecorationColor": w } | ||
}; |
@@ -53,10 +53,13 @@ 'use strict'; | ||
for (var i = 0, len = keywordProperties.length; i < len; ++i) { | ||
if (versions[browser].x >= browserList[browser]) { | ||
var property = keywordProperties[i]; | ||
if (!prefixMap[property]) { | ||
prefixMap[property] = []; | ||
} | ||
if (versions[browser]) { | ||
if (versions[browser].x >= browserList[browser]) { | ||
var property = keywordProperties[i]; | ||
if (prefixMap[property].indexOf(prefix) === -1) { | ||
prefixMap[property].push(prefix); | ||
if (!prefixMap[property]) { | ||
prefixMap[property] = []; | ||
} | ||
if (prefixMap[property].indexOf(prefix) === -1) { | ||
prefixMap[property].push(prefix); | ||
} | ||
} | ||
@@ -63,0 +66,0 @@ } |
@@ -16,6 +16,2 @@ 'use strict'; | ||
var _backgroundClip = require('./plugins/backgroundClip'); | ||
var _backgroundClip2 = _interopRequireDefault(_backgroundClip); | ||
var _cursor = require('./plugins/cursor'); | ||
@@ -71,3 +67,3 @@ | ||
var plugins = [_backgroundClip2.default, _crossFade2.default, _cursor2.default, _filter2.default, _flexboxOld2.default, _gradient2.default, _grid2.default, _imageSet2.default, _logical2.default, _position2.default, _sizing2.default, _transition2.default, _flex2.default]; | ||
var plugins = [_crossFade2.default, _cursor2.default, _filter2.default, _flexboxOld2.default, _gradient2.default, _grid2.default, _imageSet2.default, _logical2.default, _position2.default, _sizing2.default, _transition2.default, _flex2.default]; | ||
@@ -74,0 +70,0 @@ var prefix = (0, _createPrefixer2.default)({ |
@@ -8,15 +8,13 @@ 'use strict'; | ||
var _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue'); | ||
var _cssInJsUtils = require('css-in-js-utils'); | ||
var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); | ||
var CALC_REGEX = /calc\(/g; | ||
var prefixes = ['-webkit-', '-moz-', '']; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var prefixes = ['-webkit-', '-moz-', '']; | ||
function calc(property, value) { | ||
if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { | ||
if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('calc(') !== -1) { | ||
return prefixes.map(function (prefix) { | ||
return value.replace(/calc\(/g, prefix + 'calc('); | ||
return value.replace(CALC_REGEX, prefix + 'calc('); | ||
}); | ||
} | ||
} |
@@ -8,16 +8,14 @@ 'use strict'; | ||
var _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue'); | ||
var _cssInJsUtils = require('css-in-js-utils'); | ||
var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var CROSS_FADE_REGEX = /cross-fade\(/g; | ||
// http://caniuse.com/#search=cross-fade | ||
var prefixes = ['-webkit-', '']; | ||
function crossFade(property, value) { | ||
if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('cross-fade(') > -1) { | ||
if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('cross-fade(') !== -1) { | ||
return prefixes.map(function (prefix) { | ||
return value.replace(/cross-fade\(/g, prefix + 'cross-fade('); | ||
return value.replace(CROSS_FADE_REGEX, prefix + 'cross-fade('); | ||
}); | ||
} | ||
} |
@@ -8,16 +8,14 @@ 'use strict'; | ||
var _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue'); | ||
var _cssInJsUtils = require('css-in-js-utils'); | ||
var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var FILTER_REGEX = /filter\(/g; | ||
// http://caniuse.com/#feat=css-filter-function | ||
var prefixes = ['-webkit-', '']; | ||
function filter(property, value) { | ||
if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('filter(') > -1) { | ||
if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('filter(') !== -1) { | ||
return prefixes.map(function (prefix) { | ||
return value.replace(/filter\(/g, prefix + 'filter('); | ||
return value.replace(FILTER_REGEX, prefix + 'filter('); | ||
}); | ||
} | ||
} |
@@ -22,2 +22,3 @@ 'use strict'; | ||
flexBasis: 'msFlexPreferredSize' | ||
// Full expanded syntax is flex-grow | flex-shrink | flex-basis. | ||
@@ -33,6 +34,8 @@ };var flexShorthandMappings = { | ||
var logTag = 'inline-style-prefixer.flexboxIE plugin'; | ||
function flexboxIE(property, value, style) { | ||
if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) { | ||
if (alternativeProps.hasOwnProperty(property)) { | ||
style[alternativeProps[property]] = alternativeValues[value] || value; | ||
} | ||
if (property === 'flex') { | ||
@@ -54,3 +57,3 @@ // For certain values we can do straight mappings based on the spec | ||
// ignore negative values; | ||
console.warn(logTag + ': "flex: ' + value + '", negative values is not valid and will be ignored.'); | ||
console.warn(logTag + ': "flex: ' + value + '", negative values are not valid and will be ignored.'); | ||
return; | ||
@@ -60,3 +63,3 @@ } | ||
if (!value.split) { | ||
console.warn(logTag + ': "flex: ' + value + '", value format is not detected, it will be remain as is'); | ||
console.warn(logTag + ': "flex: ' + value + '", value format are not detected, it will be remain as is'); | ||
style.msFlex = value; | ||
@@ -63,0 +66,0 @@ return; |
@@ -15,3 +15,2 @@ 'use strict'; | ||
var prefixes = ['-webkit-', '-moz-', '']; | ||
var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi; | ||
@@ -18,0 +17,0 @@ |
@@ -16,2 +16,3 @@ 'use strict'; | ||
var prefixes = ['-webkit-', '']; | ||
function imageSet(property, value) { | ||
@@ -18,0 +19,0 @@ if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('image-set(') > -1) { |
@@ -7,6 +7,2 @@ 'use strict'; | ||
var _backgroundClip = require('./backgroundClip'); | ||
var _backgroundClip2 = _interopRequireDefault(_backgroundClip); | ||
var _calc = require('./calc'); | ||
@@ -70,2 +66,2 @@ | ||
exports.default = [_backgroundClip2.default, _calc2.default, _crossFade2.default, _cursor2.default, _filter2.default, _flex2.default, _flexboxIE2.default, _flexboxOld2.default, _gradient2.default, _grid2.default, _imageSet2.default, _logical2.default, _position2.default, _sizing2.default, _transition2.default]; | ||
exports.default = [_calc2.default, _crossFade2.default, _cursor2.default, _filter2.default, _flex2.default, _flexboxIE2.default, _flexboxOld2.default, _gradient2.default, _grid2.default, _imageSet2.default, _logical2.default, _position2.default, _sizing2.default, _transition2.default]; |
@@ -31,3 +31,2 @@ 'use strict'; | ||
var prefixMapping = { | ||
@@ -34,0 +33,0 @@ Webkit: '-webkit-', |
@@ -15,19 +15,17 @@ 'use strict'; | ||
function prefixProperty(prefixProperties, property, style) { | ||
if (prefixProperties.hasOwnProperty(property)) { | ||
var newStyle = {}; | ||
var requiredPrefixes = prefixProperties[property]; | ||
var requiredPrefixes = prefixProperties[property]; | ||
if (requiredPrefixes && style.hasOwnProperty(property)) { | ||
var capitalizedProperty = (0, _capitalizeString2.default)(property); | ||
var keys = Object.keys(style); | ||
for (var i = 0; i < keys.length; i++) { | ||
var styleProperty = keys[i]; | ||
if (styleProperty === property) { | ||
for (var j = 0; j < requiredPrefixes.length; j++) { | ||
newStyle[requiredPrefixes[j] + capitalizedProperty] = style[property]; | ||
} | ||
for (var i = 0; i < requiredPrefixes.length; ++i) { | ||
var prefixedProperty = requiredPrefixes[i] + capitalizedProperty; | ||
if (!style[prefixedProperty]) { | ||
style[prefixedProperty] = style[property]; | ||
} | ||
newStyle[styleProperty] = style[styleProperty]; | ||
} | ||
return newStyle; | ||
} | ||
return style; | ||
} |
{ | ||
"name": "inline-style-prefixer", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "Run-time Autoprefixer for JavaScript style objects", | ||
@@ -19,3 +19,3 @@ "module": "es/index.js", | ||
"build": "yarn run check && yarn generate && yarn babel", | ||
"check": "yarn clear && yarn format && yarn lint && yarn coverage && yarn flow", | ||
"check": "yarn clear && yarn format && yarn lint && yarn coverage", | ||
"clear": "rimraf lib es coverage _book", | ||
@@ -31,3 +31,3 @@ "docs": "gitbook install && gitbook build && gh-pages -d _book", | ||
}, | ||
"repository": "https://github.com/rofrischmann/inline-style-prefixer", | ||
"repository": "https://github.com/robinweser/inline-style-prefixer", | ||
"keywords": [ | ||
@@ -42,3 +42,3 @@ "react", | ||
], | ||
"author": "Robin Frischmann", | ||
"author": "Robin Weser", | ||
"license": "MIT", | ||
@@ -49,3 +49,4 @@ "jest": { | ||
"dependencies": { | ||
"css-in-js-utils": "^2.0.0" | ||
"css-in-js-utils": "^3.1.0", | ||
"fast-loops": "^1.1.3" | ||
}, | ||
@@ -64,9 +65,7 @@ "devDependencies": { | ||
"cross-env": "^5.2.0", | ||
"eslint": "^3.14.0", | ||
"eslint": "^5.0.0", | ||
"eslint-config-airbnb": "^14.0.0", | ||
"eslint-plugin-flowtype": "^2.30.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-jsx-a11y": "^3.0.2", | ||
"eslint-plugin-react": "^6.9.0", | ||
"flow-bin": "^0.80.0", | ||
"gh-pages": "^1.2.0", | ||
@@ -73,0 +72,0 @@ "gitbook": "^3.2.2", |
@@ -5,34 +5,34 @@ # inline-style-prefixer | ||
<img alt="TravisCI" src="https://travis-ci.org/rofrischmann/inline-style-prefixer.svg?branch=master"> <a href="https://codeclimate.com/github/rofrischmann/inline-style-prefixer/coverage"><img alt="Test Coverage" src="https://codeclimate.com/github/rofrischmann/inline-style-prefixer/badges/coverage.svg"></a> <img alt="npm downloads" src="https://img.shields.io/npm/dm/inline-style-prefixer.svg"> <img alt="gzipped size" src="https://img.shields.io/bundlephobia/minzip/inline-style-prefixer.svg?colorB=4c1&label=gzipped%20size"> <img alt="npm version" src="https://badge.fury.io/js/inline-style-prefixer.svg"> | ||
<img alt="npm downloads" src="https://img.shields.io/npm/dm/inline-style-prefixer.svg"> <img alt="gzipped size" src="https://img.shields.io/bundlephobia/minzip/inline-style-prefixer.svg?colorB=4c1&label=gzipped%20size"> <img alt="npm version" src="https://badge.fury.io/js/inline-style-prefixer.svg"> | ||
## Support Us | ||
Support Robin Frischmann's work on [Fela](https://github.com/rofrischmann/fela) and its ecosystem (inline-style-prefixer) directly via [**Patreon**](https://www.patreon.com/rofrischmann). | ||
## Installation | ||
## Installation | ||
```sh | ||
yarn add inline-style-prefixer | ||
``` | ||
If you're still using npm, you may run `npm i --save inline-style-prefixer`. | ||
## Browser Support | ||
It supports all major browsers with the following versions. For other, unsupported browses, we automatically use a fallback. | ||
* Chrome: 55+ | ||
* Android (Chrome): 55+ | ||
* Android (Stock Browser): 5+ | ||
* Android (UC): 11+ | ||
* Firefox: 52+ | ||
* Safari: 9+ | ||
* iOS (Safari): 9+ | ||
* Opera: 30+ | ||
* Opera (Mini): 12+ | ||
* IE: 11+ | ||
* IE (Mobile): 11+ | ||
* Edge: 12+ | ||
- Chrome: 55+ | ||
- Android (Chrome): 55+ | ||
- Android (Stock Browser): 5+ | ||
- Android (UC): 11+ | ||
- Firefox: 52+ | ||
- Safari: 13+ | ||
- iOS (Safari): 13+ | ||
- Opera: 30+ | ||
- Opera (Mini): 12+ | ||
- IE: 11+ | ||
- IE (Mobile): 11+ | ||
- Edge: 12+ | ||
It will **only** add prefixes if a property still needs them in one of the above mentioned versions.<br> Therefore, e.g. `border-radius` will not be prefixed at all. | ||
> **Need to support legacy browser versions?**<br> | ||
Don't worry - we got you covered. Check [this guide](https://github.com/rofrischmann/inline-style-prefixer/blob/master/docs/guides/CustomPrefixer.md). | ||
> Don't worry - we got you covered. Check [this guide](https://github.com/rofrischmann/inline-style-prefixer/blob/master/docs/guides/CustomPrefixer.md). | ||
## Usage | ||
@@ -63,2 +63,3 @@ | ||
## Usage with TypeScript | ||
You can use TypeScript definition from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/inline-style-prefixer) using [@types/inline-style-prefixer](https://www.npmjs.com/package/@types/inline-style-prefixer) | ||
@@ -74,20 +75,22 @@ | ||
## Documentation | ||
If you got any issue using this prefixer, please first check the FAQ's. Most cases are already covered and provide a solid solution. | ||
* [Usage Guides](https://inline-style-prefixer.js.org/docs/UsageGuides.html) | ||
* [Data Reference](https://inline-style-prefixer.js.org/docs/DataReference.html) | ||
* [API Reference](https://inline-style-prefixer.js.org/docs/API.html) | ||
- [Usage Guides](https://inline-style-prefixer.js.org/docs/UsageGuides.html) | ||
- [Data Reference](https://inline-style-prefixer.js.org/docs/DataReference.html) | ||
- [API Reference](https://inline-style-prefixer.js.org/docs/API.html) | ||
## Community | ||
Here are some popular users of this library: | ||
* [Aphrodite](https://github.com/Khan/aphrodite) | ||
* [Fela](https://github.com/rofrischmann/fela) | ||
* [Glamor](https://github.com/threepointone/glamor) | ||
* [Material UI](https://github.com/callemall/material-ui) | ||
* [nano-css](https://github.com/streamich/nano-css) | ||
* [Radium](https://github.com/FormidableLabs/radium) | ||
* [react-native-web](https://github.com/necolas/react-native-web) | ||
* [styled-components](https://github.com/styled-components/styled-components) | ||
* [Styletron](https://github.com/rtsao/styletron) | ||
- [Aphrodite](https://github.com/Khan/aphrodite) | ||
- [Fela](https://github.com/rofrischmann/fela) | ||
- [Glamor](https://github.com/threepointone/glamor) | ||
- [Material UI](https://github.com/callemall/material-ui) | ||
- [nano-css](https://github.com/streamich/nano-css) | ||
- [Radium](https://github.com/FormidableLabs/radium) | ||
- [react-native-web](https://github.com/necolas/react-native-web) | ||
- [styled-components](https://github.com/styled-components/styled-components) | ||
- [Styletron](https://github.com/rtsao/styletron) | ||
@@ -97,2 +100,3 @@ > PS: Feel free to add your solution! | ||
## Support | ||
Join us on [Gitter](https://gitter.im/rofrischmann/fela). We highly appreciate any contribution.<br> | ||
@@ -102,4 +106,5 @@ We also love to get feedback. | ||
## License | ||
**inline-style-prefixer** is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br> | ||
Documentation is licensed under [Creative Common License](http://creativecommons.org/licenses/by/4.0/).<br> | ||
Created with ♥ by [@rofrischmann](http://rofrischmann.de) and all contributors. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
26
106
77550
2
59
1793
+ Addedfast-loops@^1.1.3
+ Addedcss-in-js-utils@3.1.0(transitive)
+ Addedfast-loops@1.1.4(transitive)
- Removedcss-in-js-utils@2.0.1(transitive)
- Removedisobject@3.0.1(transitive)
Updatedcss-in-js-utils@^3.1.0