forked from tailwindlabs/tailwindcss
-
Notifications
You must be signed in to change notification settings - Fork 1
/
defaultPlugins.js
111 lines (109 loc) · 3.21 KB
/
defaultPlugins.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import lists from './plugins/lists'
import appearance from './plugins/appearance'
import backgroundAttachment from './plugins/backgroundAttachment'
import backgroundColors from './plugins/backgroundColors'
import backgroundPosition from './plugins/backgroundPosition'
import backgroundRepeat from './plugins/backgroundRepeat'
import backgroundSize from './plugins/backgroundSize'
import borderCollapse from './plugins/borderCollapse'
import borderColors from './plugins/borderColors'
import borderRadius from './plugins/borderRadius'
import borderStyle from './plugins/borderStyle'
import borderWidths from './plugins/borderWidths'
import cursor from './plugins/cursor'
import display from './plugins/display'
import flexbox from './plugins/flexbox'
import float from './plugins/float'
import fonts from './plugins/fonts'
import fontWeights from './plugins/fontWeights'
import height from './plugins/height'
import leading from './plugins/leading'
import margin from './plugins/margin'
import maxHeight from './plugins/maxHeight'
import maxWidth from './plugins/maxWidth'
import minHeight from './plugins/minHeight'
import minWidth from './plugins/minWidth'
import negativeMargin from './plugins/negativeMargin'
import objectFit from './plugins/objectFit'
import objectPosition from './plugins/objectPosition'
import opacity from './plugins/opacity'
import outline from './plugins/outline'
import overflow from './plugins/overflow'
import padding from './plugins/padding'
import pointerEvents from './plugins/pointerEvents'
import position from './plugins/position'
import resize from './plugins/resize'
import shadows from './plugins/shadows'
import svgFill from './plugins/svgFill'
import svgStroke from './plugins/svgStroke'
import tableLayout from './plugins/tableLayout'
import textAlign from './plugins/textAlign'
import textColors from './plugins/textColors'
import textSizes from './plugins/textSizes'
import textStyle from './plugins/textStyle'
import tracking from './plugins/tracking'
import userSelect from './plugins/userSelect'
import verticalAlign from './plugins/verticalAlign'
import visibility from './plugins/visibility'
import whitespace from './plugins/whitespace'
import width from './plugins/width'
import zIndex from './plugins/zIndex'
function loadPlugins(modules, plugins) {
return Object.keys(plugins)
.filter(plugin => modules[plugin] !== false)
.map(plugin => plugins[plugin]())
}
export default function(config) {
return loadPlugins(config.modules, {
lists,
appearance,
backgroundAttachment,
backgroundColors,
backgroundPosition,
backgroundRepeat,
backgroundSize,
borderCollapse,
borderColors,
borderRadius,
borderStyle,
borderWidths,
cursor,
display,
flexbox,
float,
fonts,
fontWeights,
height,
leading,
margin,
maxHeight,
maxWidth,
minHeight,
minWidth,
negativeMargin,
objectFit,
objectPosition,
opacity,
outline,
overflow,
padding,
pointerEvents,
position,
resize,
shadows,
svgFill,
svgStroke,
tableLayout,
textAlign,
textColors,
textSizes,
textStyle,
tracking,
userSelect,
verticalAlign,
visibility,
whitespace,
width,
zIndex,
})
}