Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from the legacy CSSValue API to Typed OM #112

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Conversation

carlosame
Copy link
Member

EchoSVG uses the deprecated CSSValue API for CSS values. With those values and units being hardwired to CSS 2.1, this old API not only is not supported by web browsers, but also effectively freezes the support for new CSS values and units.

Goals of this PR:

  • A first implementation of Typed OM.

  • Rewrite the machinery for the notification of value changes, which was unusable outside of the monolithic CSSValue API.

  • Native support for the color() function in the specified gamuts, instead of converting it to rgb() values in the sRGB space as until now.

  • Support the vw, vh, vmin, vmax, rem and rex units.

  • Partial backwards compatibility with the deprecated SVG 1.1 color and paint values.

Non-goals:

  • To have full backwards compatibility with deprecated SVG 1.1 and 1.2 features. Provide the modern alternatives instead.

Further changes are needed before full compatibility with Typed OM can be claimed:

  • The computed values cannot be directly cast to sub-interfaces like CSSRGB or CSSColor, instead one has to use value.colorValue or value.rectValue.
  • The Javascript array behavior may be reached by writing the appropriate Rhino Context stuff, although I doubt that this will ever be done.

Closes #67.

@carlosame carlosame merged commit 0cd9922 into master Aug 15, 2024
5 checks passed
@carlosame carlosame deleted the fe-typed-om branch August 15, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request spec compliance Some behavior may not be spec-compliant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace the old CSSValue API with Houdini's Typed OM
1 participant