Skip to content

Instantly share code, notes, and snippets.

@alyssawilliams
Last active July 21, 2020 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alyssawilliams/38af714a8ac086cb1394684ff9ab1e11 to your computer and use it in GitHub Desktop.
Save alyssawilliams/38af714a8ac086cb1394684ff9ab1e11 to your computer and use it in GitHub Desktop.
// Fixes collapsed right margin of last flex child.
// The overflow property applies only to content. It doesn't apply to padding or margins.
// Pseudo-elements on a flex container are rendered as flex items.
.flex-container:after {
content: '';
flex: 0 0 16px;
}
.flex-child {
margin: 0 16px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment