Replying to 06776c6a...

You know that ubiquitous layout with a full-width background and content that’s centered with a max-width on large viewports and has some inline padding on small viewports? I feel like you generally see it implemented with a wrapper div to impose the maximum width.

I’m sure this is far from an original thought, but you can do it without the wrapper and a #css max() function:

```css

padding-inline: max(var(--padding-inline), (100% - var(--max-content-width)) / 2);

```

https://codepen.io/noleli/pen/eYaZzGJ

https://files.mastodon.social/media_attachments/files/112/474/853/021/780/846/original/18d52c4d89652558.mp4

Avatar
zebra 1y ago

interesting, nice idea!

Reply to this note

Please Login to reply.

Discussion

No replies yet.