Sanded down some of the rough edges on my Layout Breakouts Builder
https://layout-breakouts-builder.vercel.app/

Would love for someone to try it out! All feedback welcomed!

Inspired by the work of @hexagoncircle and @kevinpowell combined with my heavy usage of it for the last ~6 months on production sites.

Layout Breakouts Builder

Generate CSS for the Layout Breakouts pattern

@hexagoncircle @kevinpowell The hardest part was getting the code to render like this:

@walpolea @hexagoncircle @kevinpowell

Oh no! That code pyramid... It's callback hell all over again.

Here's how I did it a month ago:

https://codepen.io/spartanatreyu/pen/YzMwNmr?editors=1100

Better layout experiment, css-grid, subgrid, grid-columns

...

@walpolea @hexagoncircle @kevinpowell wild! I loved that video. This is amazing.

@walpolea Visually speaking, it'd be great if you could use (sub)grid to align items in your `.track-definitions`, not critical, just nicer looking.

And the "Add" input below should react to the Enter key if possible.

In the code, I love the indentation to show the track hierarchy! A detail, though `:where(*)` is the same as `*` so you can shave a little cognitive overhead there, but I can understand wanting to keep that for customisation. And a copy to Clipboard would be a nice addition.

@walpolea Overall, great work, building grid systems can be a pain and tools like this are great to make it easier.

@chriskirknielsen Thank you, I appreciate the feedback. I've added the copy button and the `Enter` key support.

And you're right about the `:where(*)`, it was left from pairing back an existing customized solution I have on another project.

As for `subgrid`, I have a to do to see how this pattern changes with it, but have not yet looked into it. I haven't started using `subgrid` in production other than small progressive enhancement situations.

@walpolea Nice one! Subgrid can be tough to wrap your head around, here it was just for the presentation of your fields but yeah, this could be expanded for sure, might just get messy haha.