mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Merge branch 'hacknug-feature/cursors' into next
This commit is contained in:
commit
4c1bf08093
@ -210,6 +210,14 @@ module.exports = function() {
|
||||
lg: '.5rem',
|
||||
full: '9999px',
|
||||
},
|
||||
cursor: {
|
||||
auto: 'auto',
|
||||
default: 'default',
|
||||
pointer: 'pointer',
|
||||
wait: 'wait',
|
||||
move: 'move',
|
||||
'not-allowed': 'not-allowed',
|
||||
},
|
||||
width: theme => ({
|
||||
auto: 'auto',
|
||||
...theme.spacing,
|
||||
|
||||
@ -1,15 +1,18 @@
|
||||
export default function({ variants }) {
|
||||
return function({ addUtilities }) {
|
||||
addUtilities(
|
||||
{
|
||||
'.cursor-auto': { cursor: 'auto' },
|
||||
'.cursor-default': { cursor: 'default' },
|
||||
'.cursor-pointer': { cursor: 'pointer' },
|
||||
'.cursor-wait': { cursor: 'wait' },
|
||||
'.cursor-move': { cursor: 'move' },
|
||||
'.cursor-not-allowed': { cursor: 'not-allowed' },
|
||||
},
|
||||
variants
|
||||
import _ from 'lodash'
|
||||
|
||||
export default function({ values, variants }) {
|
||||
return function({ addUtilities, e }) {
|
||||
const utilities = _.fromPairs(
|
||||
_.map(values, (value, modifier) => {
|
||||
return [
|
||||
`.${e(`cursor-${modifier}`)}`,
|
||||
{
|
||||
cursor: value,
|
||||
},
|
||||
]
|
||||
})
|
||||
)
|
||||
|
||||
addUtilities(utilities, variants)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user