css4j / echosvg

SVG implementation in the Java™ Language, fork of Apache Batik, supporting level 4 selectors and colors.
Apache License 2.0
39 stars 2 forks source link

Replace the old CSSValue API with Houdini's Typed OM #67

Closed carlosame closed 1 month ago

carlosame commented 1 year ago

EchoSVG still uses the old CSSValue API from the legacy Document Object Model CSS for CSS values. However, the CSSValue and related interfaces were deprecated long ago by the CSS Working Group.

One of the consequences is that document scripts that use CSSValue do not work in modern web browsers. For better compatibility with current browsers, which use Houdini's Typed OM for Object Model representations of CSS values, the old API should be replaced by the new one.

The relevant specification can be found at:

1) Latest Working Draft: https://www.w3.org/TR/css-typed-om-1/

2) Latest Editor's Draft: https://drafts.css-houdini.org/css-typed-om/

This requires a Typed OM Java binding to be written, for example as a new module in https://github.com/css4j/web-apis.

I have been working on this issue, and when writing the Java binding it is unavoidable to slightly depart from the Typed OM specification (for example regarding string values) but otherwise the task should be possible. As always, no promises that this is going to happen.

This issue is part of #39.

carlosame commented 1 year ago

Implementing Houdini's typed OM effectively means rewriting the CSS module and would require a significant amount of work. I'm closing this as not planned, although it could be reopened if there are more interested developers.