Skip to content

Commit

Permalink
Remove height from audio:not([controls]) in iOS5
Browse files Browse the repository at this point in the history
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.

Fix necolas#69
  • Loading branch information
necolas committed Mar 6, 2012
1 parent 5e5496c commit 664a7a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions normalize.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! normalize.css 2012-02-07T12:37 UTC - http://github.com/necolas/normalize.css */
/*! normalize.css 2012-03-06T10:21 UTC - http://github.com/necolas/normalize.css */

/* =============================================================================
HTML5 display definitions
Expand Down Expand Up @@ -36,10 +36,12 @@ video {

/*
* Prevents modern browsers from displaying 'audio' without controls
* Remove excess height in iOS5 devices
*/

audio:not([controls]) {
display: none;
height: 0;
}

/*
Expand Down Expand Up @@ -369,7 +371,7 @@ fieldset {

/*
* 1. Corrects color not being inherited in IE6/7/8/9
* 2. Corrects text not wrapping in FF3
* 2. Corrects text not wrapping in FF3
* 3. Corrects alignment displayed oddly in IE6/7
*/

Expand Down

0 comments on commit 664a7a7

Please sign in to comment.