Flow Charts with CSS Anchor Positioning
The article explains using CSS Anchor Positioning to create flow charts and diagrams. It covers positioning elements, creating nodes with CSS tricks, expanding charts, and making nodes draggable with JavaScript. It aims to assist developers in creating interactive charts.
Read original articleThe article discusses the use of CSS Anchor Positioning to create flow charts and diagrams using CSS. It explains how to position elements relative to each other using anchor names and the anchor positioning properties. The post demonstrates basic positioning, multiple anchors, and creating flow chart nodes with CSS tricks like background gradients and pseudo elements for arrow heads. It also touches on expanding the flow chart with additional nodes and handling line directions based on node positions. The article concludes by mentioning the possibility of making the node elements draggable with JavaScript to create a draggable flow chart. Additionally, it provides related posts on topics like dynamic contrast layers, CSS container queries, and CSS interaction theming. The content aims to help developers understand and implement CSS Anchor Positioning for creating interactive and visually appealing flow charts and diagrams on the web.
Related
SVG: The Good, the Bad, and the Ugly (2021)
SVG, scalable vector graphics, is a versatile format for web design, supporting various graphic elements like paths, shapes, text, and animations. Despite its power, its complexity and extensive specifications can be challenging for users.
Exposition of Front End Build Systems
Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Show HN: I built a large JavaScript powered flipdisc display. Here's a guide
Flipdisc displays, or flip dots, use electromagnetic pulses to switch colors. A project details building a large interactive display for offices, covering construction, power, software, and design considerations. It aims to explore real-time visualizations and user interactions, hoping to make flipdisc technology more accessible.
A New Package for Making Charts in Emacs: Eplot
A new package named eplot simplifies chart creation in Emacs, addressing limitations of existing tools. It emphasizes clear axes markings and offers interactive data manipulation, introducing efficient plot control through "headers." Despite being a work in progress, eplot is accessible on Microsoft Github for potential use, with plans for code enhancements.
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.
Chrome and Edge currently support anchor positioning: https://caniuse.com/?search=css-anchor-positioning
https://casual-effects.com/markdeep/features.md.html#diagram...
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.
Related
SVG: The Good, the Bad, and the Ugly (2021)
SVG, scalable vector graphics, is a versatile format for web design, supporting various graphic elements like paths, shapes, text, and animations. Despite its power, its complexity and extensive specifications can be challenging for users.
Exposition of Front End Build Systems
Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Show HN: I built a large JavaScript powered flipdisc display. Here's a guide
Flipdisc displays, or flip dots, use electromagnetic pulses to switch colors. A project details building a large interactive display for offices, covering construction, power, software, and design considerations. It aims to explore real-time visualizations and user interactions, hoping to make flipdisc technology more accessible.
A New Package for Making Charts in Emacs: Eplot
A new package named eplot simplifies chart creation in Emacs, addressing limitations of existing tools. It emphasizes clear axes markings and offers interactive data manipulation, introducing efficient plot control through "headers." Despite being a work in progress, eplot is accessible on Microsoft Github for potential use, with plans for code enhancements.