You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec says that the <area> element, in circle state, needs coords with a non-negative radius.
This means a circle with radius (and area of) 0 is perfectly valid.
Rectangle state however demands that the coordinates for the bottom right be greater than the coordinates for the top left, making a 0 width or 0 height rectangle impossible.
I understand that neither of these are things you'd actually want to use but I'm currently making a utility to create image maps and accounting for the restriction on rectangle was a bit annoying.
So, since it's also inconsistent with what is allowed for circles (and polygons even), I'd propose restricting the rectangle's bottom right to be greater or equal to the top left instead of needing to be strictly greater.
The text was updated successfully, but these errors were encountered:
Psychpsyo
added a commit
to Psychpsyo/html
that referenced
this issue
May 1, 2024
This makes it so that an area's rectangle state can have
rectangles with a width or height of 0, by allowing the top left corner to be identical to the bottom right instead of having to
be strictly smaller.
This makes it consistent with the other two states, as circles
are allowed to have a radius of 0 and polygons can have all
their points along a line or even in a single spot, making
areas with a size of 0 possible.
Fixeswhatwg#10306.
What is the issue with the HTML Standard?
The spec says that the
<area>
element, in circle state, needscoords
with a non-negative radius.This means a circle with radius (and area of) 0 is perfectly valid.
Rectangle state however demands that the coordinates for the bottom right be greater than the coordinates for the top left, making a 0 width or 0 height rectangle impossible.
I understand that neither of these are things you'd actually want to use but I'm currently making a utility to create image maps and accounting for the restriction on rectangle was a bit annoying.
So, since it's also inconsistent with what is allowed for circles (and polygons even), I'd propose restricting the rectangle's bottom right to be greater or equal to the top left instead of needing to be strictly greater.
The text was updated successfully, but these errors were encountered: