forked from peterramsing/lost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lost.js
56 lines (51 loc) · 1.45 KB
/
lost.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
// Module dependencies
var postcss = require('postcss');
var assign = require('object-assign');
var lostAtRule = require('./lib/lost-at-rule');
var lostUtility = require('./lib/lost-utility');
var lostFlexContainer = require('./lib/lost-flex-container');
var lostCenter = require('./lib/lost-center');
var lostAlign = require('./lib/lost-align');
var lostColumn = require('./lib/lost-column');
var lostRow = require('./lib/lost-row');
var lostWaffle = require('./lib/lost-waffle');
var lostOffset = require('./lib/lost-offset');
var lostMove = require('./lib/lost-move');
var lostMasonryWrap = require('./lib/lost-masonry-wrap');
var lostMasonryColumn = require('./lib/lost-masonry-column');
var lgGutter = require('./lib/lg-gutter');
var lostVars = require('./lib/lost-vars');
// Lost At Rules and Declarations
var libs = [
lostAtRule,
lostVars,
lgGutter,
lostMove,
lostUtility,
lostFlexContainer,
lostCenter,
lostAlign,
lostColumn,
lostRow,
lostWaffle,
lostOffset,
lostMasonryWrap,
lostMasonryColumn
];
var defaultSettings = {
gutter: '30px',
flexbox: 'no-flex',
cycle: 'auto',
clearing: 'both',
rounder: 99.9,
gridUnit: '%',
direction: 'ltr'
};
module.exports = postcss.plugin('lost', function lost(settings) {
var theseSettings = assign({}, defaultSettings, settings || {});
return function executeLostGrid(css, result) {
libs.forEach(function executeEachLostRule(lib) {
lib(css, theseSettings, result);
});
};
});