Skip to content

Instantly share code, notes, and snippets.

@SelenIT
Forked from LeaVerou/dabblet.css
Last active August 29, 2015 14:19
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 SelenIT/26c0873384e9ae61e23c to your computer and use it in GitHub Desktop.
Save SelenIT/26c0873384e9ae61e23c to your computer and use it in GitHub Desktop.
Media query to detect full screen mode!
/**
* Media query to detect full screen mode!
* Y U NO WORK Chrome??
* Firefox, you’re lovely.
*/
body {
background: red;
font: bold 400% Helvetica Neue, sans-serif;
color: white;
font-size: 10vh;
}
html {
height: 100vh;
animation: fix-vh 1s;
}
@media screen and (min-device-width: 90vw) and (min-device-height: 90vh) and (max-device-width: 110vw) and (max-device-height: 110vh) {
body {
background: green;
}
body::before { content: "Full screen!!" }
}
@keyframes fix-vh {
from {
font-size: 1em;
}
50% {
font-size: 1.0001em;
}
to {
font-size: 1em;
}
}
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment