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

feat: add clipPath & mask to "move-from-symbol-to-root" transform defaults #61

Merged
merged 3 commits into from Jul 23, 2019
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
Expand Up @@ -3,7 +3,7 @@ const clone = require('clone');

// Fixes Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=353575
const defaultConfig = {
tags: ['linearGradient', 'radialGradient', 'pattern']
tags: ['linearGradient', 'radialGradient', 'pattern', 'clipPath', 'mask']
};

function moveFromSymbolToRoot(config = null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/svg-baker/package.json
Expand Up @@ -29,6 +29,6 @@
},
"scripts": {
"lint": "eslint lib test",
"test": "nyc --reporter=lcov mocha -r ../../test/mocha-setup.js"
"test": "nyc --reporter=lcov mocha --recursive -r ../../test/mocha-setup.js"
}
}
Expand Up @@ -5,7 +5,7 @@ const t = utils.setupPluginTest(plugin);
describe('svg-baker/transformations/move-from-symbol-to-root', () => {
it('should work', () => t(
undefined,
'<svg><symbol><defs><linearGradient></linearGradient></defs></symbol></svg>',
'<svg><symbol><defs></defs></symbol><linearGradient></linearGradient></svg>'
'<svg><symbol><defs><linearGradient></linearGradient><mask></mask><clipPath></clipPath></defs></symbol></svg>',
'<svg><symbol><defs></defs></symbol><linearGradient></linearGradient><mask></mask><clipPath></clipPath></svg>'
));
});