Skip to content

Instantly share code, notes, and snippets.

@peterp6
Created March 14, 2012 14:50
Show Gist options
  • Save peterp6/2036994 to your computer and use it in GitHub Desktop.
Save peterp6/2036994 to your computer and use it in GitHub Desktop.
CSS: iPad "touch" media query
/* Include a version of modernizr.js that detects and adds a class (.touch) when it detects supports for touch events. */
/* Use this media query, and preface your classes or ids with ".touch": */
/* iPad [portrait + landscape] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.touch #container {width:96%;padding:0 1%;}
.touch input[type="number"] {font-size:140%;}
.touch .ui-widget input,
.touch .ui-widget select,
.touch .ui-widget button {
height: 36px;
}
.touch .ui-tabs {padding:0;}
.touch th,
.touch td {font-size:10px;}
.touch .btn-large {
padding: 9px 14px;
font-size: 15px;
line-height: normal;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment