Skip to content

Instantly share code, notes, and snippets.

@alexvas123
Last active May 29, 2016 09:26
Show Gist options
  • Save alexvas123/1c067f29ea5c4366cbf708726bf3f235 to your computer and use it in GitHub Desktop.
Save alexvas123/1c067f29ea5c4366cbf708726bf3f235 to your computer and use it in GitHub Desktop.
Mixins
@mixin video
.videoWrapper
position: relative
padding-bottom: 56.25% /* 16:9 */
padding-top: 25px
height: 0
iframe
position: absolute
top: 0
left: 0
width: 100%
height: 100%
@mixin center-block
display: block
margin-left: auto
margin-right: auto
@mixin absolute-center
position: absolute
top: 50%
left: 50%
transform: translate(-50%, -50%)
@mixin vertical-center
position: absolute
top: 50%
transform: translateY(-50%)
@mixin horizontal-center
position: absolute
left: 50%
transform: translateX(-50%)
@mixin visually-hidden
position: absolute !important
width: 1px !important
height: 1px !important
margin: -1px !important
padding: 0 !important
overflow: hidden !important
border: 0 !important
clip: rect( 0, 0, 0, 0 ) !important
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment