Skip to content

[css-shapes-1] Degenerate polygons with positive shape-margin #2375

Closed
@bradwerth

Description

@bradwerth

https://www.w3.org/TR/css-shapes-1/#funcdef-polygon

At least three vertices are required to define a polygon with an area. This means that (for this specification) polygons with less than three vertices (or with three or more vertices arranged to enclose no area) result in an empty float area.

If a degenerate polygon has a positive shape-margin, it is practically useful for it to NOT have an empty float area. One example is an animated shape-outside: polygon with a shape-margin where the points in the polygon are momentarily made colinear. If the float area becomes empty in this case, the float area would collapse, only to abruptly reappear when the animation moved the points into an area-enclosing shape.

It would be useful for the spec to define the float area in the cases where the polygon is degenerate, but has a positive shape-margin. There are three cases:

  1. Only 1 point specified: the float area is a circle of radius shape-margin centered at the specified point.
  2. Only 2 points specified: the float area is a capsule of width shape-margin with endpoints of the two specified points.
  3. 3 or more co-linear points: the float area is a capsule of width shape-margin with endpoints of the ends of the line segment defined by the specified points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions