Open dbaron opened 6 years ago
it's unrounded. We will update the spec to reflect this.
cc @whatwg/canvas
So having looked at the PR I'm a little confused by this request as the document CSS pixels links to https://drafts.csswg.org/css-values/ does not use or define "unrounded". And unless otherwise stated everything in standards is usually precise up to implementation-defined limits.
Is there some kind of precedent here we should follow or some particular concern that prompted this question?
I agree with @annevk's point.
I guess I feel like there's a bit of a history of Gecko implementing things whose values are pixels unrounded and other implementations doing rounding in various ways, and then Gecko having to change to match the rounding done elsewhere. Though perhaps that's the distant past now? So I'm a little hesitant about the "unless otherwise stated everything in standards is usually precise" since I'm not so sure how widely-shared that understanding is. I think it's useful to state that things are unrounded explicitly; the explicit statement also encourages people to write tests for it.
That would make sense to me if that were the practice in CSS and CSS defined "unrounded" and what it would mean for CSS pixels. That is, I don't think this is something HTML could adopt on its own. It would have to be a universal practice to convey meaning and not end up being confusing.
Is there a note we could add to remember implementers that those values are CSS-values and therefore abide by the same rules of precision?
What I'm talking about is primarily about APIs and not about CSS layout -- though it might be reasonable for such definitions to live in cssom-view rather than HTML.
Sorry for responding very late, but how is CSS layout (or style sheets rather) not an API? In the end all of these things end up invoking a set of drawing primitives and ideally those would be consistent between CSS and <canvas>
, no?
This is filed based on a subset of the comments in https://github.com/w3ctag/design-reviews/issues/302#issuecomment-422999075 about the definitions of
TextMetrics
. In particular: