diff --git a/.travis.yml b/.travis.yml index c3fbbb55..5102df99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,8 @@ node_js: - '8' script: - npm i -g npm@^5 -- npm i +- npm i --no-optional +- npm dedupe - make ci cache: directories: diff --git a/lib/tasks/build-sass.js b/lib/tasks/build-sass.js index 8466589b..103a3d81 100644 --- a/lib/tasks/build-sass.js +++ b/lib/tasks/build-sass.js @@ -36,7 +36,8 @@ module.exports = function buildSass(config) { browsers: config.autoprefixerBrowsers || ['> 1%', 'last 2 versions', 'ie > 6', 'ff ESR', 'bb >= 7', 'safari >= 8'], cascade: config.autoprefixerCascade || false, flexbox: 'no-2009', - remove: config.autoprefixerRemove === undefined ? true : config.autoprefixerRemove + remove: config.autoprefixerRemove === undefined ? true : config.autoprefixerRemove, + grid: true }; return readFile(code, 'utf-8') diff --git a/test/integration/build/build.test.js b/test/integration/build/build.test.js index 05007713..b31d0a91 100644 --- a/test/integration/build/build.test.js +++ b/test/integration/build/build.test.js @@ -498,11 +498,34 @@ describe('obt build', function () { }) .then(() => { proclaim.deepEqual(fs.readFileSync('build/main.css', 'utf-8'), `.o-test { - font-size: 18px; } + font-size: 18px; + display: -ms-grid; + display: grid; + -ms-grid-columns: 1fr 1fr; + grid-template-columns: 1fr 1fr; + -ms-grid-rows: 1fr; + grid-template-rows: 1fr; } .o-test--error { background-color: red; color: white; } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0ZGluIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNDO0VBQ0MsZ0JBQWUsRUFNZjtFQUpBO0lBQ0Msc0JBQXFCO0lBQ3JCLGFBQVksRUFDWiIsImZpbGUiOiJtYWluLmNzcyJ9 */`); + +.test__content { + -ms-grid-column-span: 2; + -ms-grid-column: 1; + grid-column: 1 / span 2; + -ms-grid-row: 1; + grid-row: 1; + -webkit-box-sizing: border-box; + box-sizing: border-box; + -webkit-align-self: center; + -ms-flex-item-align: center; + -ms-grid-row-align: center; + align-self: center; } + +.test__visual { + -ms-grid-row: 1; + grid-row: 1; } +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0ZGluIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNDO0VBQ0MsZ0JBQWU7RUFDZixrQkFBYTtFQUFiLGNBQWE7RUFDYiwwQkFBOEI7RUFBOUIsK0JBQThCO0VBQzlCLG1CQUF1QjtFQUF2Qix3QkFBdUIsRUFLdkI7RUFKQTtJQUNDLHNCQUFxQjtJQUNyQixhQUFZLEVBQ1o7O0FBRUY7RUFDQyx3QkFBdUI7RUFBdkIsbUJBQXVCO0VBQXZCLHdCQUF1QjtFQUN2QixnQkFBVztFQUFYLFlBQVc7RUFDWCwrQkFBc0I7RUFBdEIsdUJBQXNCO0VBQ3RCLDJCQUFrQjtFQUFsQiw0QkFBa0I7RUFBbEIsMkJBQWtCO0VBQWxCLG1CQUFrQixFQUNsQjs7QUFDRDtFQUNDLGdCQUFXO0VBQVgsWUFBVyxFQUNYIiwiZmlsZSI6Im1haW4uY3NzIn0= */`); }); }); }); diff --git a/test/integration/build/fixtures/sass/main.scss b/test/integration/build/fixtures/sass/main.scss index df006bf3..848faf07 100644 --- a/test/integration/build/fixtures/sass/main.scss +++ b/test/integration/build/fixtures/sass/main.scss @@ -1,12 +1,23 @@ @mixin oTestComponent() { .o-test { font-size: 18px; - + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: 1fr; &--error { background-color: red; color: white; } } + .test__content { + grid-column: 1 / span 2; + grid-row: 1; + box-sizing: border-box; + align-self: center; + } + .test__visual { + grid-row: 1; + } } @include oTestComponent;