From 664a7a760e85a66f49f38c28a28681962afc69a5 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Tue, 6 Mar 2012 10:21:57 +0000 Subject: [PATCH] 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. Fix #69 --- normalize.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/normalize.css b/normalize.css index eecef92..f056d58 100644 --- a/normalize.css +++ b/normalize.css @@ -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 @@ -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; } /* @@ -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 */