Permalink
Browse files

Remove height from `audio:not([controls])` in iOS5

A bug in iOS5 means that `audio` elements without controls are not
entirely hidden. They retain some height, as demonstrated in this test
case: http://jsbin.com/ios-audio-bug/3

The fix is to add `height: 0` to the rule.
  • Loading branch information...
1 parent 6954cf2 commit b9e8f33eddfa50ae59fae91acda711a718f4c960 Krister Kari committed Mar 9, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 normalize.scss
View
@@ -40,10 +40,12 @@ video {
}
}
-// Prevents modern browsers from displaying 'audio' without controls
+// 1. Prevents modern browsers from displaying 'audio' without controls
+// 2. Remove excess height in iOS5 devices
audio:not([controls]) {
- display: none;
+ display: none; // 1
+ height: 0; // 2
}
// Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4

0 comments on commit b9e8f33

Please sign in to comment.