CSS Typed OM API allow manipulating CSS styles through a typed JS representation rather than a simple string.
Provide performance win. Browser understands the structured JS representation and no longer needs to parse CSS string from scratch.
constdiv=document.createElement('div');// browser needs to parse the string to understand and use itdiv.style.height='5px';// browser understands and use the value as 5pxdiv.style.height=CSS.px(5);
Built-in error handling. You can't provide invalid value to a type.
div.attributeStyleMap.set('color',CSS.px(10))// TypeError: Failed to set, invalid type for property
Rather than manipulating raw string, developer can create / transform CSS in a meaningful object
We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.
About 3 years since this post, this CSS Typed OM and other Houdini features like defining/declaring custom properties is still like an experimental. I mean, Firefox still does not support them, making me hesitate on using them.
For further actions, you may consider blocking this person and/or reporting abuse
Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.
Top comments (1)
About 3 years since this post, this CSS Typed OM and other Houdini features like defining/declaring custom properties is still like an experimental. I mean, Firefox still does not support them, making me hesitate on using them.