Skip to content

Instantly share code, notes, and snippets.

@pcraciunoiu
Created October 2, 2011 07:52
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 pcraciunoiu/1257211 to your computer and use it in GitHub Desktop.
Save pcraciunoiu/1257211 to your computer and use it in GitHub Desktop.
Stylish Mobile Frame
/* Use the Stylish Firefox addon to get this working. Replace domain with your domain. */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("localhost") {
body:before {
width: 320px;
height: 480px;
top: 0;
position: fixed;
left: -moz-calc(50% - 160px);
}
body {
width: 320px;
height: 480px;
position: relative;
left: -moz-calc(50% - 160px);
}
html:before, html:after {
content: "";
display: block;
position: fixed;
height: 100%;
width: -moz-calc(50% - 160px);
background: black;
top: 0;
left: 0;
}
html:after {
right: 0;
left: auto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment