New dependency for Inkscape 1.2: python3-cssselect
Dear all,
Over the past week, I've implemented CSS support in the extensions repository. This means that if an extension asks what color an object is, it will get the correct answer regardless of where the style is defined, if it is overwritten or !important or defined by a shorthand somewhere in the cascade. It also introduces default values for common attributes as well a new functionality to get a parsed value (e.g. the reference to a gradient object instead of a string with its id) or to set an attribute to a parsed value.
This feature has been merged this morning and will be released with *Inkscape 1.2*. Check out the branch here: https://gitlab.com/inkscape/extensions/-/merge_requests/294
In order to avoid writing a CSS3 parser, I had to introduce a new dependency for parsing, computation of a style's specificity and the conversion of a selector to xpath. This is handled by the python package https://github.com/scrapy/cssselect.
I've already opened MRs to add this dependency to deb, snap, appimage and windows packaging (https://gitlab.com/inkscape/inkscape/-/merge_requests/3239, https://gitlab.com/inkscape/inkscape/-/merge_requests/3238). If you are responsible for packaging Inkscape in some way, please have a look if I did this correctly or missed a packaging type (MacOS is still missing, for example).
Again, this is not relevant for the upcoming 1.1 release.
Best regards,
Jonathan
participants (1)
-
Jonathan Neuhauser