Skip to content

Instantly share code, notes, and snippets.

@Mix-Liten
Created November 22, 2023 08:17
Show Gist options
  • Save Mix-Liten/9ae9460fae9ffb65e7a1a5a194e65357 to your computer and use it in GitHub Desktop.
Save Mix-Liten/9ae9460fae9ffb65e7a1a5a194e65357 to your computer and use it in GitHub Desktop.
A new approach to container and wrapper classes
.content {
--gap: clamp(1rem, 6vw, 3rem);
--full: minmax(var(--gap), 1fr);
--content: min(75ch, 100% - var(--gap) * 2);
--popout: minmax(0, 2rem);
--feature: minmax(0, 5rem);
display: grid;
grid-template-columns:
[full-start] var(--full)
[feature-start] var(--feature)
[popout-start] var(--popout)
[content-start] var(--content) [content-end]
var(--popout) [popout-end]
var(--feature) [feature-end]
var(--full) [full-end];
}
@Mix-Liten
Copy link
Author

Mix-Liten commented Nov 22, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment