Skip to content

Instantly share code, notes, and snippets.

@gdnwebmedia
Created March 25, 2024 14:08
Show Gist options
  • Save gdnwebmedia/57703a52f9c13ff16709314185f06164 to your computer and use it in GitHub Desktop.
Save gdnwebmedia/57703a52f9c13ff16709314185f06164 to your computer and use it in GitHub Desktop.
Limit max-width for hero background images on wide monitors
/*
This is to be used using Bricks & Automatic CSS already installed. Otherwise, replace %root% with the element/class/ID and add values to existing root variables like var(--radius-m).
*/
%root% {
width: 100%;
max-width: 90em;
}
@media screen and (min-width: 1600px) {
%root% {
border-radius: var(--radius-m);
overflow: hidden;
margin-top: 2rem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment