Skip to content

Instantly share code, notes, and snippets.

@potch
Created February 18, 2011 01:22
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 potch/833087 to your computer and use it in GitHub Desktop.
Save potch/833087 to your computer and use it in GitHub Desktop.
puts a Nexus S frame around your Firefox 4 content for mobile development
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("localhost") {
html {
margin-top: 129px !important;
padding-bottom: 260px !important;
}
body {
width: 320px;
position: relative;
left: -moz-calc(50% - 160px);
}
body:before {
content: "";
background: url(http://people.mozilla.org/~mclaypotch/nexus_s_frame.png);
display: block;
width: 408px;
height: 785px;
border: 500px solid black;
position: fixed;
top: -500px;
left: -moz-calc(50% - 703px);
z-index: 9999;
pointer-events: none;
}
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;
}
}
@potch
Copy link
Author

potch commented Feb 18, 2011

drop this in Stylish or userContent.css and steup the @-moz-document domain() accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment