csstools / css-typed-om Goto Github PK
View Code? Open in Web Editor NEWUse CSS Typed Object Model in the browser
Home Page: https://csstools.github.io/css-typed-om/
License: Creative Commons Zero v1.0 Universal
Use CSS Typed Object Model in the browser
Home Page: https://csstools.github.io/css-typed-om/
License: Creative Commons Zero v1.0 Universal
Would we support CSSStyleValue.parse
, CSSStyleValue.parseAll
or some same API ?
Glad to see someone is doing this. Have you done any performance testing to see what the fastest path of style updates is in the browser? That kind of data is really hard to find.
The readme says that this is an in-progress polyfill. But there seems to be no activity since 2018 on this repo. So what is the state of the polyfill ? Is it usable or is it still incomplete ?
Hi, @csstools. I began work converting this to TypeScript. Would that be cool? I can also help maintain.
For example, in the official spec, dividing the dividend x
by the divisor y
where y
is Number
yields a CSSUnitValue
– when you pass an object as the divisor (such as CSS.px
), the official spec yields a CSSMathProduct
.
However in the case of this polyfill, if the divisor is a Number
then you simply yield null
which doesn't seem to conform to how the implementation should be.
CSS.px(10).div(2); // CSSUnitValue {value: 5, unit: "px"} (official)
CSS.px(10).div(2); // null (polyfill)
I would fix it myself with a PR, but I'm not entirely sure the best way to fix up the div
method. Whether you have a preference for one way over another 👍
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.