Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve computed #13

Merged
merged 3 commits into from Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions css.js
Expand Up @@ -153,6 +153,7 @@ class CSSTask extends TaskKitTask {
features: {
customProperties: {
variables: this.cssVars,
preserve: 'computed',
strict: false
},
customMedia: {
Expand Down
24 changes: 12 additions & 12 deletions package.json
Expand Up @@ -24,21 +24,21 @@
},
"dependencies": {
"async": "^2.6.0",
"css-mqpacker": "6.0.1",
"cssnano": "3.10.0",
"normalize.css": "7.0.0",
"css-mqpacker": "^6.0.1",
"cssnano": "^3.10.0",
"normalize.css": "^7.0.0",
"path-exists": "^3.0.0",
"postcss": "6.0.15",
"postcss-cssnext": "3.0.2",
"postcss": "^6.0.15",
"postcss-cssnext": "^3.0.2",
"postcss-easings": "^1.0.1",
"postcss-font-magician": "2.1.0",
"postcss-import": "11.0.0",
"postcss-inline-svg": "3.0.0",
"postcss-mixins": "6.2.0",
"postcss-font-magician": "^2.1.0",
"postcss-import": "^11.0.0",
"postcss-inline-svg": "^3.0.0",
"postcss-mixins": "^6.2.0",
"postcss-nested": "^3.0.0",
"postcss-svgo": "2.1.6",
"postcss-triangle": "2.0.0",
"require-all": "2.2.0",
"postcss-svgo": "^2.1.6",
"postcss-triangle": "^2.0.0",
"require-all": "^2.2.0",
"taskkit-task": "^1.0.2"
},
"eslintConfig": {
Expand Down
4 changes: 4 additions & 0 deletions test/expected/preserve-computed.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions test/fixtures/preserve-computed.css
@@ -0,0 +1,3 @@
:root {
--test-varibale: '#fc0';
}
16 changes: 16 additions & 0 deletions test/preserve-computed.test.js
@@ -0,0 +1,16 @@
const tap = require('tap');
const ClientKitCss = require('../');
const utils = require('./utils');

tap.test('preserve computed styles', (t) => {
const css = new ClientKitCss('imports', {
files: {
'test/out/preserve-computed.css': 'test/fixtures/preserve-computed.css'
}
});
css.execute((err, results) => {
t.equal(err, null);
utils.checkOutput(t, 'preserve-computed.css');
t.end();
});
});