Created
June 21, 2012 14:34
-
-
Save cjcheshire/2966063 to your computer and use it in GitHub Desktop.
SASS 3.2 HTML5 Fullscreen Support
This file contains 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
@mixin fullscreen() { | |
&:-webkit-full-screen { | |
@content; | |
} | |
&:-mozilla-full-screen { | |
@content; | |
} | |
&:full-screen { | |
@content; | |
} | |
} | |
@include fullscreen() { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wasn't able to list the pseudo selector using comma (same as https://stackoverflow.com/questions/47444344/prefixed-fullscreen-psuedo-selector-on-firefox) but using a mixin is definitely a great idea which solves the issue nicely, thx @cjcheshire!
Regarding your above solution I have modified the mixin like the following: