-
Notifications
You must be signed in to change notification settings - Fork 143
Remove references to CSSNumericValue.from() in the spec #480
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
Conversation
css-typed-om/Overview.bs
Outdated
length1.toString(); // "42.0px" | ||
|
||
var length2 = CSSNumericValue.from(42.0, "px"); | ||
var length2 = CSSNumericValue(CSS.px(42)); |
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.
No CSSNumericValue()
wrapper—CSS.px()
already returns a CSSNumericValue
.
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.
Done.
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.
tabatkins@ made the changes, PTAL? Thanks!
css-typed-om/Overview.bs
Outdated
length1.toString(); // "42.0px" | ||
|
||
var length2 = CSSNumericValue.from(42.0, "px"); | ||
var length2 = CSS.px(42); |
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.
The 42.0
here was significant - the point is to illustrate that we don't preserve the source formatting (and so, in this case, it outputs as an integer "42px", rather than "42.0px" like the previous example).
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.
Done.
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.
tabatkins@, PTAL? Thanks!
css-typed-om/Overview.bs
Outdated
length1.toString(); // "42.0px" | ||
|
||
var length2 = CSSNumericValue.from(42.0, "px"); | ||
var length2 = CSS.px(42); |
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.
Done.
git branching magic - couldn't seem to merge these two pull requests. (due to a change in the branch name)
Adding Tab's comments on the previous patch here:
"from wasn't turned into to; from was the more generic factory function. It was replaced by parse in the first instance, and the CSSUnitValue constructor in the second instance (or CSS.px())."
Closing the other PR