Skip to content

Commit 90c43c6

Browse files
committed
[gh404] Fixes issue where user couldn't override global flex setting inline
1 parent 2efb0c1 commit 90c43c6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/lost-center.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ module.exports = function lostCenterDecl(css, settings, result) {
2424
lostCenterPadding = declArr[1];
2525
}
2626

27+
if(lostCenterFlexbox !== 'flex') {
28+
lostCenterFlexbox = settings.flexbox;
29+
}
30+
2731
if (declArr.indexOf('flex') !== -1) {
2832
lostCenterFlexbox = 'flex';
2933
}
@@ -32,6 +36,8 @@ module.exports = function lostCenterDecl(css, settings, result) {
3236
lostCenterFlexbox = 'no-flex';
3337
}
3438

39+
lostCenterFlexbox = lgLogic.parseLostProperty(decl.parent.nodes, 'lost-center-flexbox', lostCenterFlexbox);
40+
3541
lostCenterPadding = lgLogic.parseLostProperty(decl.parent.nodes, 'lost-center-padding', lostCenterPadding);
3642
lostColumnRounder = lgLogic.parseLostProperty(decl.parent.nodes, 'lost-column-rounder', lostColumnRounder);
3743

@@ -42,12 +48,6 @@ module.exports = function lostCenterDecl(css, settings, result) {
4248
lostUnit = settings.gridUnit;
4349
}
4450

45-
lostCenterFlexbox = lgLogic.parseLostProperty(decl.parent.nodes, 'lost-center-flexbox', lostCenterFlexbox);
46-
47-
if(lostCenterFlexbox !== 'flex') {
48-
lostCenterFlexbox = settings.flexbox;
49-
}
50-
5151
if(declArr[0] !== undefined && isFractionValue(declArr[0])) {
5252
lostCenterMaxWidth = lgLogic.calcValue(declArr[0], lostColumnGutter, lostColumnRounder, lostUnit);
5353
} else {

0 commit comments

Comments
 (0)