Skip to content

Instantly share code, notes, and snippets.

@allanwhite
Created February 18, 2016 01:35
Show Gist options
  • Save allanwhite/62e64d1225fa4c50e3fb to your computer and use it in GitHub Desktop.
Save allanwhite/62e64d1225fa4c50e3fb to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="flex flex-center">
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
</div>
// ----
// libsass (v3.2.5)
// ----
// apply these to children
@mixin flex-it ($set...){
-webkit-box-flex: 0;
-webkit-flex: $set;
-ms-flex: $set;
flex: $set;
}
.flex {
//first, the basic flex directives (sans prefixes here)
display: flex;
flex-direction: row;
flex-wrap: wrap;
// then we add variations for center and start child alignment
&-center {
justify-content: center;
align-content: center;
}
&-start {
justify-content: flex-start;
align-content: flex-start;
align-items: flex-start;
}
}
.client { // for logo clusters
padding: 20px 25px;
height: 32px;
@include flex-it(0 0 auto);
}
.flex {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.flex-center {
justify-content: center;
align-content: center;
}
.flex-start {
justify-content: flex-start;
align-content: flex-start;
align-items: flex-start;
}
.client {
padding: 20px 25px;
height: 32px;
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
}
<div class="flex flex-center">
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment