- From: Jan Varga via GitHub <noreply@w3.org>
- Date: Wed, 15 Oct 2025 12:08:10 +0000
- To: public-houdini-archive@w3.org
In Gecko, we’re implementing Typed OM reification through a generic ToTyped trait that’s derived for most style value types. Right now this covers keyword values, which are reified automatically as CSSKeywordValue objects. Work is in progress to extend this to numeric types, which will reify as CSSNumericValue, etc. and eventually to other categories such as colors and transforms. The derive system is designed so that most types can be handled automatically, while still allowing explicit impl ToTyped definitions for special or complex cases. This approach already follows the “type-based reification” model you describe? The mapping is determined by value type rather than property name, so new properties generally require no additional reification code (only if there's no suitable value type). Here are some links: https://searchfox.org/firefox-main/rev/644f0db17749554fe23a45b43e77e61f42acdfd9/servo/components/style_traits/values.rs#597 https://searchfox.org/firefox-main/rev/644f0db17749554fe23a45b43e77e61f42acdfd9/servo/components/style_derive/to_typed.rs#12 https://searchfox.org/firefox-main/rev/644f0db17749554fe23a45b43e77e61f42acdfd9/servo/components/style/properties/mod.rs#142 https://bugzilla.mozilla.org/show_bug.cgi?id=1991631 -- GitHub Notification of comment by janvarga Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1159#issuecomment-3406082518 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 October 2025 12:08:11 UTC