Skip to content

Commit 3fa1a00

Browse files
author
Florian Bouvot
committed
Fix order
1 parent 9dc51a8 commit 3fa1a00

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

defaultTheme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ module.exports = function() {
325325
order: {
326326
first: -1,
327327
last: 1,
328-
none: 0
328+
none: 0,
329329
},
330330
}
331331
}

src/corePlugins.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default function(config) {
105105
flex,
106106
flexGrow,
107107
flexShrink,
108+
order,
108109
float,
109110
fontFamily,
110111
fontWeight,

src/plugins/order.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import _ from 'lodash'
22

33
export default function({ values, variants }) {
4-
return function({ addUtilities, e }) {
5-
addUtilities(
6-
_.fromPairs(
7-
_.map(values, (value, modifier) => {
8-
const className = modifier === 'default' ? 'order' : `order-${modifier}`
9-
return [
10-
`.${e(className)}`,
11-
{
12-
'order': value,
13-
},
14-
]
15-
})
16-
),
17-
variants
4+
return function({ addUtilities }) {
5+
const utilities = _.fromPairs(
6+
_.map(values, (value, modifier) => {
7+
return [
8+
`.order-${modifier}`,
9+
{
10+
'order': value,
11+
},
12+
]
13+
})
1814
)
15+
16+
addUtilities(utilities, variants)
1917
}
2018
}

0 commit comments

Comments
 (0)