Ce

Centering a Div with Physics, Instead of CSS

Hacker News

Centering a Div with Physics, Instead of CSS

http://jared314.github.io/physics-based-page-layout/ (Javascript Required) After the last CSS centering article, I thought there had to be another way. So, I put together a basic Physics-based Page Layout system using an existing Javascript physics library, for springs, and an existing Javascript CSS parser library, for CSS Selectors and a custom CSS-like DSL. The end goal is to layout DOM elements with springs, and eventually collisions, instead of floats, margins, or padding.

Share card

Actual performance

9points
4comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: exist, existing, io · Missing: https docs, excited, just released
65%65% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: using · Missing: mac, agents, macos
54%54% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
37%37% 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
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
34%34% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: margin, margins · Missing: arr, mrr, revenue
21%21% 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
2%2% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A Mindmap of Physics40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Mindmap of Physics

Hacker News6
xm
xmorphic – physics-based realistic CSS generator60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

xmorphic – physics-based realistic CSS generator

Hacker News36
NoFlattery
NoFlattery31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An AI council that argues, instead of agreeing with you.

Indie Hackerscommitment-side-project
NoFlattery
NoFlattery39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An AI council that argues, instead of agreeing with you.

Product Hunt+2
CS
CSS Prettifier and Minifier71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CSS Prettifier and Minifier

Hacker News1
CS
CSS Penrose Triangle (Impossible Triangle)59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CSS Penrose Triangle (Impossible Triangle)

Hacker News1
CS
CSS with no px units60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CSS with no px units

Hacker News8
Fi
FizzBuzz in CSS66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

FizzBuzz in CSS

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

AtoZ CSS

Hacker News8
No
Normalize-OpenType.css66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Normalize-OpenType.css

Hacker News1