Open tabatkins opened 3 years ago
Or rather, now that we're making pixelated
use the "NN to nearest integer multiple, then smooth", maybe we can use crisp-edges
to mean "strictly NN" rather than introducing a new nearest-neighbor
keyword.
Or rather, now that we're making
pixelated
use the "NN to nearest integer multiple, then smooth", maybe we can usecrisp-edges
to mean "strictly NN" rather than introducing a newnearest-neighbor
keyword.
I'd favor this option, because:
-moz-crisp-edges
legacy value already does, in Firefox (straightforward nearest-neighbor).(I'm also happy using nearest-neighbor
as the value that does this thing; but crisp-edges
seems more intuitively readable/understandable, and it also has the benefit of already existing in browsers & presumably on the web, & being already specced to do approximately the right thing.)
Cool, sounds good to me. My hope that we could get better pixel-scaling algos into browsers seems like it hasn't succeeded in any case. ^_^
For what it’s worth, I would prefer straightforward nearest-neighbor
(i used to say neighboUr though) if it means exactly that anyway. Nearest neighbour is a well-known algorithm while crisp-edges is an abstract thing invented specifically for CSS.
Reopening. This requires broader discussion and a CSSWG resolution. See also https://github.com/w3c/csswg-drafts/issues/5837
Note: This is blocking republication.
The CSS Working Group just discussed [css-images-3] Is "image-rendering: crisp-edges" still worthwhile to keep separate?
, and agreed to the following:
RESOLVED: Revert the definition of crisp edges to allow for more advanced algorithms
Currently,
image-rendering: crisp-edges
is defined somewhat abstractly to just be:It's allowed for this to just be identical to
pixelated
, but it can use more advanced upscaling algorithms if desired, like hq2x (I have no idea what the state of the art here is).Is there any actual interest in making this do something different from
pixelated
? Or should I just fold it in as a legacy alias, like the older SVG keywords?/cc @dholbert especially