mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
[fix] -ms- CSS vendor prefix
This commit is contained in:
@@ -6,8 +6,11 @@ import hyphenate from '../hyphenate'
|
|||||||
suite('modules/StyleSheet/hyphenate', () => {
|
suite('modules/StyleSheet/hyphenate', () => {
|
||||||
test('style property', () => {
|
test('style property', () => {
|
||||||
assert.equal(hyphenate('alignItems'), 'align-items')
|
assert.equal(hyphenate('alignItems'), 'align-items')
|
||||||
|
assert.equal(hyphenate('color'), 'color')
|
||||||
})
|
})
|
||||||
test('vendor prefixed style property', () => {
|
test('vendor prefixed style property', () => {
|
||||||
assert.equal(hyphenate('WebkitAppearance'), '-webkit-appearance')
|
assert.equal(hyphenate('MozTransition'), '-moz-transition')
|
||||||
|
assert.equal(hyphenate('msTransition'), '-ms-transition')
|
||||||
|
assert.equal(hyphenate('WebkitTransition'), '-webkit-transition')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export default (string) => string.replace(/([A-Z])/g, '-$1').toLowerCase()
|
export default (string) => (string.replace(/([A-Z])/g, '-$1').toLowerCase()).replace(/^ms-/, '-ms-')
|
||||||
|
|||||||
Reference in New Issue
Block a user