Skip to content

Commit

Permalink
Keep markers with display: none
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Mar 6, 2021
1 parent 0e6b0c4 commit d3e3726
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 3 additions & 1 deletion plugins/removeHiddenElems.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ exports.fn = function (item, params) {
params.displayNone &&
computedStyle.display &&
computedStyle.display.type === 'static' &&
computedStyle.display.value === 'none'
computedStyle.display.value === 'none' &&
// markers with display: none still rendered
item.isElem('marker') === false
) {
return false;
}
Expand Down
19 changes: 11 additions & 8 deletions test/regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,26 @@ const runTests = async ({ svgFiles }) => {
name.startsWith('animate-') ||
// breaks because of optimisation despite of script
name === 'interact-pointer-04-f' ||
// other cases which require complex changes
name === 'painting-marker-07-f' ||
// messed gradients
name === 'pservers-grad-18-b' ||
// animated filter
name === 'filters-light-04-f' ||
// removing wrapping <g> breaks :first-child pseudo-class
name === 'styling-pres-04-f' ||
// messed case insensitivity while inlining styles
name === 'styling-css-10-f' ||
// rect is converted to path which matches wrong styles
name === 'styling-css-08-f' ||
// other cases which require complex changes
name === 'struct-image-02-b' ||
name === 'struct-use-10-f' ||
name === 'struct-use-11-f' ||
name === 'styling-css-01-b' ||
name === 'styling-css-03-b' ||
name === 'styling-css-04-f' ||
name === 'styling-css-08-f' ||
// unstable test
name === 'filters-light-04-f' ||
// mismatched draft cases
name === 'struct-cond-overview-03-f' ||
name === 'struct-use-07-b' ||
name === 'styling-css-10-f' ||
name === 'styling-pres-04-f'
name === 'struct-use-07-b'
) {
console.info(`${name} is skipped`);
skipped += 1;
Expand Down

0 comments on commit d3e3726

Please sign in to comment.