Skip to content

Instantly share code, notes, and snippets.

@max-m
Created April 14, 2014 19:16
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 max-m/92f2a4325a3cc3fb1258 to your computer and use it in GitHub Desktop.
Save max-m/92f2a4325a3cc3fb1258 to your computer and use it in GitHub Desktop.
body {
background-color: #333;
margin: 0;
padding: 0;
overflow: hidden;
}
canvas, img {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
-ms-interpolation-mode: nearest-neighbor;
}
#game canvas {
margin: 0 auto;
}
.__fullscreenCanvas() {
background-color: #333;
canvas {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto !important;
width: auto !important;
height: 100% !important;
}
}
:fullscreen {
.__fullscreenCanvas
}
:-webkit-full-screen {
.__fullscreenCanvas
}
:-ms-fullscreen {
.__fullscreenCanvas
}
:-moz-full-screen {
.__fullscreenCanvas
}
body {
background-color: #333;
margin: 0;
padding: 0;
overflow: hidden;
}
canvas,
img {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
-ms-interpolation-mode: nearest-neighbor;
}
#game canvas {
margin: 0 auto;
}
:fullscreen {
background-color: #333;
}
:fullscreen canvas {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto !important;
width: auto !important;
height: 100% !important;
}
:-webkit-full-screen {
background-color: #333;
}
:-webkit-full-screen canvas {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto !important;
width: auto !important;
height: 100% !important;
}
:-ms-fullscreen {
background-color: #333;
}
:-ms-fullscreen canvas {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto !important;
width: auto !important;
height: 100% !important;
}
:-moz-full-screen {
background-color: #333;
}
:-moz-full-screen canvas {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto !important;
width: auto !important;
height: 100% !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment