Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/supported-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function prefixTransitionCallback(match, p1, p2) {
if (p1 === 'var') return 'var'
if (p1 === 'all') return 'all'
if (p2 === 'all') return ', all'
return p1 ? supportedProperty(p1) : `, ${supportedProperty(p2)}`
const prefixedValue = p1 ? supportedProperty(p1) : `, ${supportedProperty(p2)}`
if (!prefixedValue) return p1 || p2
return prefixedValue
}

if (isInBrowser) el = document.createElement('p')
Expand Down
4 changes: 4 additions & 0 deletions src/supported-value.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ describe('css-vendor', () => {
)
})

it('should return dashed property value as it is', () => {
expect(supportedValue('transition', 'ease-in-out 0.3s')).to.eql('ease-in-out 0.3s')
})

it('should return custom CSS variable for transition property as it is', () => {
expect(supportedValue('transition', 'var(--something)')).to.eql('var(--something)')
})
Expand Down
Loading