Comments (2)
Shouldn't this be generalized to all inheritable attributes, or is this a special case caused by it not being marked as inheritable or something?
from svgo.
Shouldn't this be generalized to all inheritable attributes
I haven't looked into it enough to say, but valid take.
It probably applies to all inheritable attributes, and probably should be handled in a utility that flattens the given node into its parent, which we can use everywhere we do this. We'd have to exclude children that set the same attribute as the removed parent did.
But then the annoying part, which is why I reported the issue instead. When testing xml:space
before, it looks to me that while xml:space="preserve"
applies to children, most browsers then ignore xml:space="default"
from children so it continues to preserve whitespace despite being overridden, and I wanted to investigate this further.
from svgo.
Related Issues (20)
- [cleanupIDs] symbol is incorrectly removed when its ID is *NOT* used by URL-encoded reference
- Missing a ';' after converting svg with png;base64 HOT 1
- SVGO 3.3.0 stopped working in the AWS environment with Node.js 20 HOT 2
- Version 3.3.0 break commonjs exports
- Package.exports types file specification missing HOT 2
- `package.json`/ `dist/svgo.browser.js` are no longer exported HOT 8
- Unable to install [email protected] HOT 3
- Option to resize SVGs to custom dimesnions HOT 4
- Remove consecutive points in linear path string if they have zero length or direction does not change HOT 1
- 'Cannot read properties of undefined' error in reflectPoint
- An idea to round/rewrite elements with gradient
- v4.0 rc - import plugin utils, e.g xast.js HOT 4
- Mask colors are changed when using convertColors and currentColor: true
- RFC: Defining a General Preset for SVG Sprites
- Paths won't merge HOT 1
- Feature Request: Add Option to Remove Invisible Items HOT 1
- Multiple issues with styles / css HOT 1
- --datauri 'unenc' add 'data:image/svg+xml,data:image/svg+xml,'
- Error: Unmatched selector: % HOT 3
- [FEATURE REQUEST]: Option to hide SVGs that were optimised by 0%
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgo.