From acf40793b3c47b1023f8f13a5a80fd5d11f651f7 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Sun, 20 Jan 2013 17:09:32 -0800 Subject: [PATCH] Normalize form element `text-transform` By default, browsers set `text-transform:none` on most form controls in order to prevent `text-transform` being inherited from ancestor nodes. However, the `button` and `select` elements are exceptions. * Firefox and Opera do not apply `text-transform:none` to `select`. * Chrome, Safari, and IE 6+ do not apply `text-transform:none` to `button. It's not suitable to set `text-transform:inherit` because all other form elements intentionally avoid it. Safari and IE 6/7 will not honour that style for `select`, and Chrome will only do so when the `select` element is clicked. Further details: http://tjvantoll.com/2012/07/10/default-browser-handling-of-the-css-text-transform-property/ --- normalize.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/normalize.css b/normalize.css index bc5d818..cf65c6d 100644 --- a/normalize.css +++ b/normalize.css @@ -415,6 +415,18 @@ input { line-height: normal; } +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * and `video` controls.