New Dec 2, 2025

The Google Antigravity website, rebuilt with Modern CSS

More Front-end Bloggers All from Bram.us View The Google Antigravity website, rebuilt with Modern CSS on bram.us

Screenshot of the Google Antigravity Website Recreation

As an experiment to see if Modern CSS is up to the task, I recreated the Google Antigravity website with Modern CSS.

~

Recently, Google Antigravity was released along with its website. I haven’t used the application myself yet, but I did check out its website. Besides being visually appealing, one of the first things that caught my eye is that the scrolling felt “off”. Opening DevTools confirmed that my hunch was right: the site is using scroll-jacking, which makes the scrolling feel uncanny. Hmmm.

Recording of the Google Antigravity Website, recorded in Google Chrome Canary

Digging further in, I also noticed that the site does not use any of the latest Modern CSS features, even though the site is packed with patterns that can be done with CSS nowadays. Now, I do get why that team might have chosen not to lean on those recent CSS capabilities: the website is a marketing tool, so they want need it to look and behave – including all the visual flair – exactly the same in every browser. I get it. But it does feel like a missed opportunity from my “Chrome DevRel for CSS/UI” point-of-view.

~

So as one does, I nerd sniped myself into recreating the website using Modern CSS Features. The goal of my experiment wasn’t to make an exact copy of the Antigravity website, but more to see if Modern CSS would hold up throughout building it.

A few nights of burning the midnight oil, and this is what I landed on:

Recording of my rebuild of Google Antigravity Website, recorded in Google Chrome Canary

To get to that result, I leaned on these Modern CSS features:

(Not included in this list are things I consider basic nowadays: Responsive Design, Cascade Layers, CSS Nesting, Custom Properties, …)

The only bit of JavaScript used is the registration of the PaintWorklet, and a tad of JS to sync the cursor’s position to two custom properties for the CSS to use.

~

The recreation I built is embedded below, but you should check it out on CodePen as the website is responsive. You must use Chrome Canary to see the latest niceties in action.

If you are not using Google Chrome Canary (or not using Chrome at all) don’t worry: the site was built with Progressive Enhancement in mind and everything – except @scope 😔 – is feature-detected with @supports. So even if your browser understands only a fragment of the Modern CSS that is used, everything can be viewed perfectly fine 🙂

The rest of the CSS is admittedly a bit messy, as I quickly threw this together during some late night coding sessions. Like, the grid approach could be done much better. I also didn’t get to code up all parts of the site (such as the mega menu or the footer) as this is merely an after-hours POC.

TIP: Go disable the @layer named moderncss in the Style Sheet to force the site into its “basic” view. The easiest way to do so, is to change @layer moderncss to @slayer moderncss and you’re done.

~

All in all, I would say Modern CSS held up very nicely here. There are still a few rough edges I encountered:

All the rest went pretty smooth 🙂

If you haven’t done so already, go check out “Google Antigravity with Modern CSS” on CodePen.

~

🔥 Like what you see? Want to stay in the loop? Here's how:

I can also be found on 𝕏 Twitter and 🐘 Mastodon but only post there sporadically.

Scroll to top