Skip to content

Typed OM (houdini) #163

Closed
Closed

Description

@jsnkuhn

Description

from spec:

Converting CSSOM value strings into meaningfully typed JavaScript representations and back can incur a significant performance overhead. This specification exposes CSS values as typed JavaScript objects, to make manipulating them both easier and more performant.

an explainer article from chrome: https://developer.chrome.com/blog/cssom/

Rationale

Most painAPI demos (like those at houdini.how) accept only unitless values for custom properties. This is because unitless pixel values are what is needed for the JS worklet code. Not accepting normal CSS units like em/rem/% gets around having to parsing strings and convert values into unitless pixel values. This is currenly a pain to do.

TypedOM gives us JS objects instead of stings for CSS values that are much eaiser to work with. Makes it easier to seperate a value from its unit and covert from for example em to px.

I believe this requires registered custom properties so it works together with the Properties and Values API (i.e. @Property)

Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1278697

Specification

https://drafts.css-houdini.org/css-typed-om/

Tests

https://wpt.fyi/results/css/css-typed-om?label=experimental&label=master&aligned&view=subtest

Activity

  1. added this to the milestone on Sep 29, 2022
  2. moved this to Proposed in Interop 2023on Oct 7, 2022
  3. removed this from the milestone on Oct 7, 2022
  4. andruud commented on Oct 31, 2022

    @andruud

    We should exclude the parts related to list-valued properties. That concept needs work, since reality is more complicated than "property is either list-valued or not".

  5. foolip commented on Nov 11, 2022

    @foolip
    Member

    In the MDN short survey on CSS & HTML, "CSS Typed Object Model (computedStyleMap() API)" was selected by ~9% of survey takers, putting it in the bottom third of the 20 options. (There is some uncertainty as with any survey data.)

  6. nairnandu commented on Feb 1, 2023

    @nairnandu
    Contributor

    Thank you for proposing Typed OM for inclusion in Interop 2023.

    We wanted to let you know that this proposal was not selected to be part of Interop this year. We had many strong proposals, and could not accept them all. This should not be taken as a comment on the technology as a whole, and resubmitting a proposal for this feature as part of a future round of Interop would be welcome.

    For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!

    Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions