Ever want a pure CSS regular #polygon?

Back in 2016, I first wrote this #Sass #mixin to generate one. I've had others before, but this is the one I've kept updating it ever since and it's heavily commented.

You just need to pass it a number of vertices and an initial rotation.

@codepen demo: https://codepen.io/thebabydino/pen/mEgzxd

#CSS #clipPath #geometry #2D #code #coding #frontend #web #dev #wbDev #webDevelopment

Polygon mixin (Sass) with `clip-path` (heavily commented)

Demo created soon after Firefox ([47+ with a flag](https://twitter.com/anatudor/status/698177005431357440), 54 by default, [no flag needed](https://twi...

For red flowers, where the R channel component is by far the most important one, a B↔R swap makes them blue.

For pink flowers, the dominant channels are R and B. A G↔B swap makes the G channel contribution outweigh that of the B one, so we get golden flowers instead.

#SVG #filter #svgFilter #CSS #code #coding #frontend #web #wbDev #webDevelopment