- From: Christoph Päper via GitHub <noreply@w3.org>
- Date: Wed, 24 Dec 2025 08:34:50 +0000
- To: public-css-archive@w3.org
Crissov has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-shapes] Basic shapes for regular polygons == https://drafts.csswg.org/css-shapes-1/#supported-basic-shapes Regular polygons are equiangular and equilateral; they can be distinguished into _convex_ n-gons and _star_ n-grams. The former are known as _trigon/equilateral triangle, tetragon/square, pentagon, hexagon_ and so (g)on, the latter are known as _pentagram, hexagaram_ etc. They are characterized by two positive integers: _n_ > 2 for the number of edges/vertices or points/spokes and _m_ < _n_/2 for the distance of neighboring points being connected, i.e. _m_ = 1 for convex polygons. If _m_ is a divisor of _n_ or, more generally, if they are not coprime, the polygon degenerates to a simpler one. For odd _n_, these polygons have _n_ mirror axes through their center, while even ones have twice as many. I propose this be made available as a basic shape based upon the design of `circle()`: ~~~~ ebnf <star()> = star( <integer[3,]> <integer[1,]>? <radial-size>? <angle>? [ at <position> ]? ) ~~~~ If the function is named `star()`, the second integer should default to 2, but if `gon()` was acceptable, it should be 1. The position defaults to `center` and the first point to `top center`. The optional angle issues a clockwise rotation of the shape around its position. This would not add new functionality as it is just a more convenient way to notate common shapes, i.e. “syntactic sugar”. Notably, `star(4 1)` yields a square as a special, equiangular rhombus/diamond, not as a special, equilateral rectangle, i.e. it is standing on a tip. Implementations could be allowed to treat this like a circle for sufficiently large _n_. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13267 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 24 December 2025 08:34:50 UTC