1
0
mirror of https://github.com/svg/svgo.git synced 2025-08-07 15:22:54 +03:00

Keep empty <mask> which can hide element by id

This commit is contained in:
Bogdan Chadkin
2021-02-24 21:13:30 +03:00
parent 36391564f2
commit d14315b68f
2 changed files with 16 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ exports.fn = function(item) {
(item.isElem('pattern') && item.hasAttrLocal('href')) ||
// The 'g' may not have content, but the filter may cause a rectangle
// to be created and filled with pattern.
(item.isElem('g') && item.hasAttr('filter'))
(item.isElem('g') && item.hasAttr('filter')) ||
// empty <mask> hides masked element
(item.isElem('mask') && item.hasAttr('id'))
);
};