Skip to content

Instantly share code, notes, and snippets.

@fabiorochafg
Last active September 29, 2022 19:43
Show Gist options
  • Save fabiorochafg/b8f265ed8280ca79f20a to your computer and use it in GitHub Desktop.
Save fabiorochafg/b8f265ed8280ca79f20a to your computer and use it in GitHub Desktop.
Flexbox container
.flex-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.flex-container > .flex-item {
flex-basis: 100px;
flex-grow: 1;
flex-shrink: 0;
}
@media print {
.flex-container {
display: block;
}
}
@media only screen and (min-device-width: 320px) and (max-device-width: 736px), only screen and (min-device-width: 768px) and (max-device-width: 1024px), only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.flex-container {
flex-flow: column nowrap;
}
.flex-container > .flex-item {
flex-basis: 50px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment