Created
June 9, 2014 15:34
-
-
Save jmwhittaker/5336cce5d81f75132447 to your computer and use it in GitHub Desktop.
Utility Methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
box-sizing:border-box; | |
} | |
.multimedia-container { | |
width:528px; | |
border-radius:5px; | |
overflow:hidden; | |
height:264px; | |
/* Just for testing */ | |
margin-bottom:50px; | |
} | |
.media { | |
display:flex; | |
display:-webkit-flex; | |
flex-flow: row; | |
align-items:flex-start; | |
-webkit-align-items:flex-start; | |
align-content:stretch; | |
background-color:white; | |
height:100%; | |
} | |
.media-col { | |
flex-flow: column; | |
-webkit-flex-flow:column; | |
align-items:stretch; | |
} | |
.media-cell { | |
display:block; | |
flex:1; | |
-webkit-box-flex:1; | |
-webkit-flex:1; | |
/*background-color:red;*/ | |
overflow:hidden; | |
position:relative; | |
height:100%; | |
} | |
.img { | |
position:absolute; | |
width:100%; | |
top:50%; | |
transform: translateY(-50%); | |
} | |
/* Utility Methods */ | |
.margin-rs { | |
margin-right:2px; | |
} | |
.margin-ls { | |
margin-left:2px; | |
} | |
.margin-ts { | |
margin-top:2px; | |
} | |
.margin-bs { | |
margin-bottom:2px; | |
} | |
.margin-lm { | |
margin-left:4px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- one up --> | |
<div class="multimedia-container"> | |
<div class="media"> | |
<div class="media-cell"> | |
<img src="https://pbs.twimg.com/media/BpX0iqnIMAA6BYT.jpg:large" class="img"> | |
</div> | |
</div> | |
</div> | |
<!-- two up --> | |
<div class="multimedia-container"> | |
<div class="media"> | |
<div class="media-cell"> | |
<img src="https://pbs.twimg.com/media/BpX0iqnIMAA6BYT.jpg:large" class="img"> | |
</div> | |
<div class="media-cell "> | |
<img src="https://pbs.twimg.com/media/BpX0i1vIgAA1DKU.jpg:large" class="img margin-lm"> | |
</div> | |
</div> | |
</div> | |
<!-- Three up --> | |
<div class="multimedia-container"> | |
<div class="media"> | |
<div class="media-cell margin-rs"> | |
<img src="https://pbs.twimg.com/media/BpX0iqnIMAA6BYT.jpg:large" class="img"> | |
</div> | |
<div class="media-cell margin-ls"> | |
<div class="media media-col"> | |
<div class="media-cell margin-bs"> | |
<img src="https://pbs.twimg.com/media/BpX0i1vIgAA1DKU.jpg:large" class="img"> | |
</div> | |
<div class="media-cell margin-ts"> | |
<img src="https://pbs.twimg.com/media/BpX0i0uIMAAjdKD.jpg:large" class="img"> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- four up --> | |
<div class="multimedia-container"> | |
<div class="media"> | |
<div class="media-cell margin-rs"> | |
<div class="media media-col"> | |
<div class="media-cell margin-bs"> | |
<img src="https://pbs.twimg.com/media/BpX0dTlIIAAlHNA.jpg:large" class="img"> | |
</div> | |
<div class="media-cell margin-ts"> | |
<img src="https://pbs.twimg.com/media/BpX0i0uIMAAjdKD.jpg:large" class="img"> | |
</div> | |
</div> | |
</div> | |
<div class="media-cell margin-ls"> | |
<div class="media media-col"> | |
<div class="media-cell margin-bs"> | |
<img src="https://pbs.twimg.com/media/BpX0i1vIgAA1DKU.jpg:large" class="img"> | |
</div> | |
<div class="media-cell margin-ts"> | |
<img src="https://pbs.twimg.com/media/BpX0qDuIUAEpvzd.jpg:large" class="img"> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment