forked from robinweser/inline-style-prefixer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrabCursor.js
More file actions
23 lines (21 loc) · 738 Bytes
/
grabCursor.js
File metadata and controls
23 lines (21 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import camelToDashCase from '../utils/camelToDashCase'
const values = {
'grab': true,
'grabbing': true
}
export default function cursor({ property, value, browserInfo: { browser, version }, prefix: { css }, keepUnprefixed }) {
// adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79)
if (
property === 'cursor' && values[value] &&
(
browser === 'firefox' ||
browser === 'chrome' ||
browser === 'safari' ||
browser === 'opera'
)
) {
return {
cursor: css + value + (keepUnprefixed ? ';' + camelToDashCase(property) + ':' + value : '')
}
}
}