mirror of
https://github.com/svg/svgo.git
synced 2025-07-31 07:44:22 +03:00
Keep markers with display: none
This commit is contained in:
@ -72,7 +72,9 @@ exports.fn = function (item, params) {
|
|||||||
params.displayNone &&
|
params.displayNone &&
|
||||||
computedStyle.display &&
|
computedStyle.display &&
|
||||||
computedStyle.display.type === 'static' &&
|
computedStyle.display.type === 'static' &&
|
||||||
computedStyle.display.value === 'none'
|
computedStyle.display.value === 'none' &&
|
||||||
|
// markers with display: none still rendered
|
||||||
|
item.isElem('marker') === false
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -97,23 +97,26 @@ const runTests = async ({ svgFiles }) => {
|
|||||||
name.startsWith('animate-') ||
|
name.startsWith('animate-') ||
|
||||||
// breaks because of optimisation despite of script
|
// breaks because of optimisation despite of script
|
||||||
name === 'interact-pointer-04-f' ||
|
name === 'interact-pointer-04-f' ||
|
||||||
// other cases which require complex changes
|
// messed gradients
|
||||||
name === 'painting-marker-07-f' ||
|
|
||||||
name === 'pservers-grad-18-b' ||
|
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-image-02-b' ||
|
||||||
name === 'struct-use-10-f' ||
|
name === 'struct-use-10-f' ||
|
||||||
name === 'struct-use-11-f' ||
|
name === 'struct-use-11-f' ||
|
||||||
name === 'styling-css-01-b' ||
|
name === 'styling-css-01-b' ||
|
||||||
name === 'styling-css-03-b' ||
|
name === 'styling-css-03-b' ||
|
||||||
name === 'styling-css-04-f' ||
|
name === 'styling-css-04-f' ||
|
||||||
name === 'styling-css-08-f' ||
|
|
||||||
// unstable test
|
|
||||||
name === 'filters-light-04-f' ||
|
|
||||||
// mismatched draft cases
|
// mismatched draft cases
|
||||||
name === 'struct-cond-overview-03-f' ||
|
name === 'struct-cond-overview-03-f' ||
|
||||||
name === 'struct-use-07-b' ||
|
name === 'struct-use-07-b'
|
||||||
name === 'styling-css-10-f' ||
|
|
||||||
name === 'styling-pres-04-f'
|
|
||||||
) {
|
) {
|
||||||
console.info(`${name} is skipped`);
|
console.info(`${name} is skipped`);
|
||||||
skipped += 1;
|
skipped += 1;
|
||||||
|
Reference in New Issue
Block a user