forked from tailwindlabs/tailwindcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposition.js
More file actions
32 lines (32 loc) · 808 Bytes
/
position.js
File metadata and controls
32 lines (32 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export default function({ variants }) {
return function({ addUtilities }) {
addUtilities(
{
'.static': { position: 'static' },
'.fixed': { position: 'fixed' },
'.absolute': { position: 'absolute' },
'.relative': { position: 'relative' },
'.sticky': { position: 'sticky' },
'.pin-none': {
top: 'auto',
right: 'auto',
bottom: 'auto',
left: 'auto',
},
'.pin': {
top: 0,
right: 0,
bottom: 0,
left: 0,
},
'.pin-y': { top: 0, bottom: 0 },
'.pin-x': { right: 0, left: 0 },
'.pin-t': { top: 0 },
'.pin-r': { right: 0 },
'.pin-b': { bottom: 0 },
'.pin-l': { left: 0 },
},
variants
)
}
}