by roosgit on 6/27/24, 7:07 AM with 66 comments
by dgb23 on 6/27/24, 5:45 PM
However I think I would still use SVG for these sorts of things, especially since they can easily be manipulated, animated and are more mathematically declarative than CSS anchor positioning.
I think the sweet spot for this CSS feature is not having to do complex workarounds with calc, positioning, transforms or JS in order to have more control over positioning elements relative to others. Container queries have a similar use case.
Both of these features (as well as CSS grid) are born out of the same underlying issues:
- HTML and CSS are not orthogonal in terms of layout, but very tightly coupled
- Trees are a fundamentally crippled data structure to express layouts. Almost every sufficiently complex layout wants to be represented as a graph or a matrix. Trees are fine until they aren't.
by bugfactory on 6/27/24, 9:14 AM
by ericyd on 6/27/24, 12:06 PM
by xnx on 6/27/24, 8:55 AM
by lenkite on 6/27/24, 10:04 AM
by simple10 on 6/27/24, 5:14 PM
Chrome and Edge currently support anchor positioning: https://caniuse.com/?search=css-anchor-positioning
by autoexec on 6/27/24, 10:02 AM
by sollniss on 6/27/24, 9:22 AM
by AstroJetson on 6/27/24, 10:42 PM
https://casual-effects.com/markdeep/features.md.html#diagram...
by mediumsmart on 6/28/24, 3:40 AM
by meindnoch on 6/27/24, 1:40 PM
by the_other on 6/27/24, 10:32 AM
Flow charts are much better represented by something like PlantUML or Mermaid, and then rendered direct to SVG or a canvas. The mark-up is much more human-readable and could be used as source to drive an even-more accessible alternative.
by gavinbao on 6/27/24, 4:41 PM