Skip to content

Commit

Permalink
Ported iOS hacks from global assets
Browse files Browse the repository at this point in the history
  • Loading branch information
martent committed Jun 18, 2014
1 parent 17462e1 commit d2285a2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/utils.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jQuery ($) ->
if "ontouchstart" of window
$("body").addClass "touch"
24 changes: 24 additions & 0 deletions app/assets/stylesheets/hacks.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Prevent iPhone auto zoom on field focus
@media (max-width: 46em) {
body.touch {
select,
option,
textarea,
input[type='text'],
input[type='password'],
input[type='datetime'],
input[type='datetime-local'],
input[type='date'],
input[type='month'],
input[type='time'],
input[type='week'],
input[type='number'],
input[type='email'],
input[type='url'],
input[type='search'],
input[type='tel'],
input[type='color'] {
font-size: 16px !important;
}
}
}

0 comments on commit d2285a2

Please sign in to comment.