2026-04-29 05:50 UTC
@hejchristian@front-end.social Over half a decade ago, I wrote an article about how they simplify background patterns https://css-tricks.com/background-patterns-simplified-by-conic-gradients/
In this case, the conic gradient doesn't start from the default (12 o'clock), but 90deg further in the positive (clockwise) direction (3 o'clock).
It doesn't go around the default midpoint (at 50% 50%), but around a point that's a line thickness $l away from the top left corner of the background-size rectangle along both axes.
By default, a background-size rectangle...
Replies (1)
-
@anatudor@mastodon.social 2026-04-29 05:51
@hejchristian@front-end.social that's never set is 100% of the padding-box size along both axes. In this case, that's exactly equal to the cell size since the thick border (which we make transparent since it's there just to reserve space) is offset by a negative margin of the same size $s. By default, a background repeats in the border area as well, so the "extending lines" are repetitions of the conic-gradient() background. background-position (minus half line thickness) is for line alignment with the cell.