CS

CSSGrid – 2.7k LOC CSS-Grid layout engine targetting embedded (Nim)

Hacker News

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 card

Actual performance

4points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: including · Missing: supports, reddit linkedin, podcasting
69%69% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: single, using · Missing: mac, agents, macos
66%66% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: io, including · Missing: https docs, excited, just released
61%61% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
49%49% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
39%39% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
20%20% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

60
60GS – CSS Grid Layout57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

60GS – CSS Grid Layout

Hacker News3
css grid generator
css grid generator21%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Css grid generator & tailwindcss grid layout builder

Product Hunt+7
Gr
Grid by Example – Usage Examples for the CSS Grid Layout Module47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Grid by Example – Usage Examples for the CSS Grid Layout Module

Hacker News5
Av
Avalanche CSS grid system64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Avalanche CSS grid system

Hacker News2
In
Infinity CSS Grid64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Infinity CSS Grid

Hacker News3
CS
CSS Grid Browserslist64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CSS Grid Browserslist

Hacker News3
A
A middleweight CSS grid-able unframework67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A middleweight CSS grid-able unframework

Hacker News1
Gr
Grid.css64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Grid.css

Hacker News2
Ea
Easy-grid – A React CSS grid layout package53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easy-grid – A React CSS grid layout package

Hacker News1
The Grid Gospel - An Intro To CSS Grid
The Grid Gospel - An Intro To CSS Grid56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Learn CSS Grid Today!

Indie Hackers1$10/mobooks