From 121c08273b1abf06e9890f6929147683a351a835 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Mon, 1 Apr 2013 06:53:47 -0700 Subject: [PATCH] Protect root against system color schemes System color schemes (in particular, custom themes in Windows and Linux distros) affect Firefox, IE, and Opera. Normalizing the web site/app's root background and text color prevents these unwanted settings from being used. Chrome doesn't apply system-level schemes to websites. Fix gh-170 --- CHANGELOG.md | 3 +++ normalize.css | 16 +++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef2d1b1..872c7f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ == HEAD +* Normalize root `color` and `background` to counter the affects of system + color schemes. + == 1.1.0 (January 21, 2013) * Normalize `text-transform` for `button` and `select`. diff --git a/normalize.css b/normalize.css index 4d4d01d..1728037 100644 --- a/normalize.css +++ b/normalize.css @@ -59,16 +59,22 @@ audio:not([controls]) { ========================================================================== */ /** - * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using + * 1. Prevent system color scheme's background color being used in Firefox, IE, + * and Opera. + * 2. Prevent system color scheme's text color being used in Firefox, IE, and + * Opera. + * 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using * `em` units. - * 2. Prevent iOS text size adjust after orientation change, without disabling + * 4. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ html { - font-size: 100%; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -ms-text-size-adjust: 100%; /* 2 */ + background: #fff; /* 1 */ + color: #000; /* 2 */ + font-size: 100%; /* 3 */ + -webkit-text-size-adjust: 100%; /* 4 */ + -ms-text-size-adjust: 100%; /* 4 */ } /**