-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add CSS numeric factory #2000
Add CSS numeric factory #2000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I like this approach. It's probably the right way to do it, until there's a long enough history of support to justify decomposing the keys into CSS features.
It's also similar to how we cover groups of (actual) CSS functions (like the trig functions).
Some suggestions, but I'd be happy to see this move forward.
features/css-numeric-factory.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
→ numeric-factory-functions.yml
features/css-numeric-factory.yml
Outdated
@@ -0,0 +1,67 @@ | |||
name: CSS numeric factory functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: CSS numeric factory functions | |
name: Numeric factory functions |
features/css-numeric-factory.yml
Outdated
@@ -0,0 +1,67 @@ | |||
name: CSS numeric factory functions | |||
description: The CSS numeric factory functions create a CSSUnitValue, for instance with `CSS.px(12)` or `CSS.kHz(440)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be careful not to imply that these are CSS functions, but rather a browser API. Maybe like this?
description: The CSS numeric factory functions create a CSSUnitValue, for instance with `CSS.px(12)` or `CSS.kHz(440)`. | |
description: The numeric factory functions, such as `CSS.px()` or `CSS.kHz()`, return a `CSSUnitValue` representing a CSS number value (as in `12px` or `440kHz`). |
features/css-numeric-factory.yml
Outdated
@@ -0,0 +1,67 @@ | |||
name: CSS numeric factory functions | |||
description: The CSS numeric factory functions create a CSSUnitValue, for instance with `CSS.px(12)` or `CSS.kHz(440)`. | |||
spec: https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? Or cssom
?
spec: https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory | |
spec: https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory | |
group: css |
This is an alternate breakout of the CSS Typed OM spec as discussed in #1847. Rather than putting
api.CSS.ch_static
with thech unit
feature, this draws inspiration from MDN. https://developer.mozilla.org/en-US/docs/Web/API/CSS/factory_functions_staticDoes this work as a feature?