CSSGrid – 2.7k LOC CSS-Grid layout engine targetting embedded (Nim)
CSSGrid – 2.7k LOC CSS-Grid layout engine targetting embedded (Nim)
Hey I've been working on this project for a few years. It's a smallish (~ 2.7k loc w/ tests) implementation of CSS grid. My ultimate goal with this is to be able to make full featured UIs on embedded devices like the ESP32. I just did a fairly big update which adds a bunch of features that make it into a reasonably complete CSS Grid implementation: - basic html/css style layout for nodes not in a grid - basic html layout using constraints like percent parent (20'pp), auto (cx"auto"), content-min (cx"content-min") - support for constraint operators including min, max, - and + (limited to single level, e.g. no `min(min(x,y),z)`) - basic and grid layouts now support min-size and max-size constraints (e.g. like CSS min-width) It's a weekend project. It's been pretty fun figuring out how CSS Grid works and how browsers implement parts of their layout routines. Especially how auto and frac works in CSS Grid. The core implementation turns out simple but subtle. This project is similar to Taffy in Rust, however, the implementation is a bit simpler and much less thorough. It doesn't support CSS flexbox either. Feedback or suggestions would be awesome!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
60GS – CSS Grid Layout
Css grid generator & tailwindcss grid layout builder
Grid by Example – Usage Examples for the CSS Grid Layout Module
Avalanche CSS grid system
Infinity CSS Grid
CSS Grid Browserslist
A middleweight CSS grid-able unframework
Grid.css
Easy-grid – A React CSS grid layout package
Learn CSS Grid Today!