From a93342558b779e3853ffed7ca34bd11afad81ba1 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:52:38 -0700 Subject: [PATCH 01/26] Start conversion to Fizzions scss normalize - Update copyrights - Update authors - Add _normalize.scss file based on normalize.css @NOTE Retaining old normalize.css to enable easy diffing for updates --- LICENSE.md | 2 +- _normailze.scss | 426 ++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 13 +- 3 files changed, 435 insertions(+), 6 deletions(-) create mode 100644 _normailze.scss diff --git a/LICENSE.md b/LICENSE.md index c6bcc9bf2..c5ede3b3d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) Nicolas Gallagher and Jonathan Neal +Copyright (c) Nicolas Gallagher, Jonathan Neal and Alex Lemanski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/_normailze.scss b/_normailze.scss new file mode 100644 index 000000000..c8be0f165 --- /dev/null +++ b/_normailze.scss @@ -0,0 +1,426 @@ +/*! @fizzion/normalize.scss v3.0.3 | MIT License | + github.com/fizzion/fizzion-normalize.scss */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS and IE text size adjust after device orientation change, + * without disabling user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability of focused elements when they are also in an + * active/hover state. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * 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 Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + box-sizing: content-box; /* 2 */ +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + diff --git a/package.json b/package.json index b6c26d298..e63d64cd1 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,21 @@ { - "name": "normalize.css", + "name": "@fizzion/normalize", "version": "3.0.3", "description": "Normalize.css as a node packaged module", - "style": "normalize.css", + "style": "_normalize.scss", "files": [ "LICENSE.md", - "normalize.css" + "_normalize.scss" ], "homepage": "http://necolas.github.io/normalize.css", "repository": { "type": "git", "url": "git://github.com/necolas/normalize.css.git" }, - "main": "normalize.css", - "author": "Nicolas Gallagher", + "main": "_normalize.scss", + "author": [ + "Nicolas Gallagher", + "Alex Lemanski" + ], "license": "MIT" } From b7b74fdb150fe203a8f02574b2d667e99df55eb9 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:54:32 -0700 Subject: [PATCH 02/26] Breakout root elements into their own partial --- _normailze.scss | 20 +------------------- normalize/_root.scss | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 normalize/_root.scss diff --git a/_normailze.scss b/_normailze.scss index c8be0f165..704afd37c 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -1,25 +1,7 @@ /*! @fizzion/normalize.scss v3.0.3 | MIT License | github.com/fizzion/fizzion-normalize.scss */ -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS and IE text size adjust after device orientation change, - * without disabling user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} +@import 'normailze/_root.scss'; /* HTML5 display definitions ========================================================================== */ diff --git a/normalize/_root.scss b/normalize/_root.scss new file mode 100644 index 000000000..3175bdb0e --- /dev/null +++ b/normalize/_root.scss @@ -0,0 +1,25 @@ +/* ========================================================================== + Root + + Normalization for root elements + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS and IE text size adjust after device orientation change, + * without disabling user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} From 79134404f50e2d20c0381eba60591684ca46dbb9 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:53:03 -0700 Subject: [PATCH 03/26] Breakout HTML5 display elements --- _normailze.scss | 60 +--------------------------------- normalize/_html5-display.scss | 61 +++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 59 deletions(-) create mode 100644 normalize/_html5-display.scss diff --git a/_normailze.scss b/_normailze.scss index 704afd37c..0016c3a46 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -2,65 +2,7 @@ github.com/fizzion/fizzion-normalize.scss */ @import 'normailze/_root.scss'; - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} +@import 'normailze/_html5-dispaly.scss'; /* Links ========================================================================== */ diff --git a/normalize/_html5-display.scss b/normalize/_html5-display.scss new file mode 100644 index 000000000..74afe7f75 --- /dev/null +++ b/normalize/_html5-display.scss @@ -0,0 +1,61 @@ +/* ========================================================================== + HTML5 display definitions + + Normalize the display of the new html5 elements. + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} From 636c44d9895f86127ce8fb6c8649e119674089d8 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:53:23 -0700 Subject: [PATCH 04/26] Breakout anchor normalization --- _normailze.scss | 22 +--------------------- normalize/_anchors.scss | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 normalize/_anchors.scss diff --git a/_normailze.scss b/_normailze.scss index 0016c3a46..e96bff2d2 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -3,27 +3,7 @@ @import 'normailze/_root.scss'; @import 'normailze/_html5-dispaly.scss'; - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability of focused elements when they are also in an - * active/hover state. - */ - -a:active, -a:hover { - outline: 0; -} +@import 'normailze/_anchors.scss'; /* Text-level semantics ========================================================================== */ diff --git a/normalize/_anchors.scss b/normalize/_anchors.scss new file mode 100644 index 000000000..2ea93a77f --- /dev/null +++ b/normalize/_anchors.scss @@ -0,0 +1,23 @@ +/* ========================================================================== + Anchors + + Normalize anchor sytling. + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability of focused elements when they are also in an + * active/hover state. + */ + +a:active, +a:hover { + outline: 0; +} From 3b657ad0fea5cab159d930cd626fe299f5dc18dd Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:53:29 -0700 Subject: [PATCH 05/26] Break out typography/text level semantic normalization --- _normailze.scss | 76 +------------------------------------ normalize/_typography.scss | 77 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 75 deletions(-) create mode 100644 normalize/_typography.scss diff --git a/_normailze.scss b/_normailze.scss index e96bff2d2..ea6ce4a64 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -4,81 +4,7 @@ @import 'normailze/_root.scss'; @import 'normailze/_html5-dispaly.scss'; @import 'normailze/_anchors.scss'; - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} +@import 'normailze/_typography.scss'; /* Embedded content ========================================================================== */ diff --git a/normalize/_typography.scss b/normalize/_typography.scss new file mode 100644 index 000000000..805ba2e4a --- /dev/null +++ b/normalize/_typography.scss @@ -0,0 +1,77 @@ +/* ========================================================================== + Typography + + Normalize typographic related styling. + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} From fad4c00c0d154dafa8cbee667be6d5dcb10b8566 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:53:37 -0700 Subject: [PATCH 06/26] Break out embedded content --- _normailze.scss | 20 +------------------- normalize/_embedded-content.scss | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 normalize/_embedded-content.scss diff --git a/_normailze.scss b/_normailze.scss index ea6ce4a64..e60bbf854 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -5,25 +5,7 @@ @import 'normailze/_html5-dispaly.scss'; @import 'normailze/_anchors.scss'; @import 'normailze/_typography.scss'; - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} +@import 'normailze/_embedded-content.scss'; /* Grouping content ========================================================================== */ diff --git a/normalize/_embedded-content.scss b/normalize/_embedded-content.scss new file mode 100644 index 000000000..cdc63a77e --- /dev/null +++ b/normalize/_embedded-content.scss @@ -0,0 +1,21 @@ +/* ========================================================================== + Embedded content + + Normalize the styling of embedded content. + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} From 344f1ad4f209878457ff766c8d7358221a5a074e Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 22:53:45 -0700 Subject: [PATCH 07/26] Break out grouping content --- _normailze.scss | 41 +------------------------------ normalize/_grouping-content.scss | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 40 deletions(-) create mode 100644 normalize/_grouping-content.scss diff --git a/_normailze.scss b/_normailze.scss index e60bbf854..83e82a779 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -6,46 +6,7 @@ @import 'normailze/_anchors.scss'; @import 'normailze/_typography.scss'; @import 'normailze/_embedded-content.scss'; - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} +@import 'normailze/_grouping-content.scss'; /* Forms ========================================================================== */ diff --git a/normalize/_grouping-content.scss b/normalize/_grouping-content.scss new file mode 100644 index 000000000..9c8932c87 --- /dev/null +++ b/normalize/_grouping-content.scss @@ -0,0 +1,42 @@ +/* ========================================================================== + Grouping content + + Normalize styling of grouping content. + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} From b8a88814adcb18e7a6c7f5ab9ee26fd46efbbbe5 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 23:36:01 -0700 Subject: [PATCH 08/26] Breakout forms --- _normailze.scss | 173 +---------------------------------------- normalize/_forms.scss | 174 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+), 172 deletions(-) create mode 100644 normalize/_forms.scss diff --git a/_normailze.scss b/_normailze.scss index 83e82a779..c5368d6e3 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -7,178 +7,7 @@ @import 'normailze/_typography.scss'; @import 'normailze/_embedded-content.scss'; @import 'normailze/_grouping-content.scss'; - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * 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 Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - box-sizing: content-box; /* 2 */ -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} +@import 'normailze/_forms.scss'; /* Tables ========================================================================== */ diff --git a/normalize/_forms.scss b/normalize/_forms.scss new file mode 100644 index 000000000..55772063a --- /dev/null +++ b/normalize/_forms.scss @@ -0,0 +1,174 @@ +/* ========================================================================== + Forms + + Form styling normalization. + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * 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 Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + box-sizing: content-box; /* 2 */ +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} From 12762efcdc7dfad25c0323ba31d42574cfecb1de Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 23:38:02 -0700 Subject: [PATCH 09/26] Breakout tables --- _normailze.scss | 19 +------------------ normalize/_tables.scss | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 normalize/_tables.scss diff --git a/_normailze.scss b/_normailze.scss index c5368d6e3..a8a365450 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -8,21 +8,4 @@ @import 'normailze/_embedded-content.scss'; @import 'normailze/_grouping-content.scss'; @import 'normailze/_forms.scss'; - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} - +@import 'normailze/_tables.scss'; diff --git a/normalize/_tables.scss b/normalize/_tables.scss new file mode 100644 index 000000000..d945363db --- /dev/null +++ b/normalize/_tables.scss @@ -0,0 +1,19 @@ +/* ========================================================================== + Tables + + Table styling normalization. + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} From b6ebca4b9f0c6e5a0e3a2e3f2ebfeb5e3653ffa9 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 23:46:02 -0700 Subject: [PATCH 10/26] Fix import paths --- _normailze.scss | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_normailze.scss b/_normailze.scss index a8a365450..8196ea4f6 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -1,11 +1,11 @@ /*! @fizzion/normalize.scss v3.0.3 | MIT License | github.com/fizzion/fizzion-normalize.scss */ -@import 'normailze/_root.scss'; -@import 'normailze/_html5-dispaly.scss'; -@import 'normailze/_anchors.scss'; -@import 'normailze/_typography.scss'; -@import 'normailze/_embedded-content.scss'; -@import 'normailze/_grouping-content.scss'; -@import 'normailze/_forms.scss'; -@import 'normailze/_tables.scss'; +@import 'normailze/root.scss'; +@import 'normailze/html5-dispaly.scss'; +@import 'normailze/anchors.scss'; +@import 'normailze/typography.scss'; +@import 'normailze/embedded-content.scss'; +@import 'normailze/grouping-content.scss'; +@import 'normailze/forms.scss'; +@import 'normailze/tables.scss'; From 6da2ce37f4adb6057464c31e1b0873d08dcc5343 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Thu, 2 Jul 2015 23:46:23 -0700 Subject: [PATCH 11/26] Add items to package flies array --- package.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e63d64cd1..ac56ed699 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,15 @@ "style": "_normalize.scss", "files": [ "LICENSE.md", - "_normalize.scss" + "_normalize.scss", + "normailze/_root.scss", + "normailze/_html5-dispaly.scss", + "normailze/_anchors.scss", + "normailze/_typography.scss", + "normailze/_embedded-content.scss", + "normailze/_grouping-content.scss", + "normailze/_forms.scss", + "normailze/_tables.scss" ], "homepage": "http://necolas.github.io/normalize.css", "repository": { From be5e1418282b5eb08e84aec0d8a377e90289eec9 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Mon, 6 Jul 2015 12:24:42 -0700 Subject: [PATCH 12/26] Delete bower and component configs Remove these configs for the time being. NPM is the future, but I may bring the others back in the future. --- bower.json | 13 ------------- component.json | 8 -------- 2 files changed, 21 deletions(-) delete mode 100644 bower.json delete mode 100644 component.json diff --git a/bower.json b/bower.json deleted file mode 100644 index 44f2ee2b5..000000000 --- a/bower.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "normalize-css", - "version": "3.0.3", - "main": "normalize.css", - "author": "Nicolas Gallagher", - "ignore": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "component.json", - "package.json", - "test.html" - ] -} diff --git a/component.json b/component.json deleted file mode 100644 index 82e70d50b..000000000 --- a/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "normalize.css", - "repo": "necolas/normalize.css", - "version": "3.0.3", - "styles": ["normalize.css"], - "author": "Nicolas Gallagher", - "license": "MIT" -} From 6db11181ff9872dd7b753e1be9c1824e16fc41f9 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 13:44:19 -0700 Subject: [PATCH 13/26] Update package-lock.json --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d53a41f5f..9eae04b02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "normalize.css", - "version": "7.0.0", + "name": "@fizzion/normalize", + "version": "8.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { From d49b0f782a261ceb76be52957d69a7ed93cf74cb Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 14:48:49 -0700 Subject: [PATCH 14/26] Update document partial - Rename `normalize/_root.scss` to `normalize/_document.scss` - Update document partial --- _normailze.scss | 2 +- normalize/_document.scss | 15 +++++++++++++++ normalize/_root.scss | 25 ------------------------- 3 files changed, 16 insertions(+), 26 deletions(-) create mode 100644 normalize/_document.scss delete mode 100644 normalize/_root.scss diff --git a/_normailze.scss b/_normailze.scss index 8196ea4f6..23af08f67 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -1,7 +1,7 @@ /*! @fizzion/normalize.scss v3.0.3 | MIT License | github.com/fizzion/fizzion-normalize.scss */ -@import 'normailze/root.scss'; +@import 'normailze/document.scss'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; diff --git a/normalize/_document.scss b/normalize/_document.scss new file mode 100644 index 000000000..00191be73 --- /dev/null +++ b/normalize/_document.scss @@ -0,0 +1,15 @@ +/* Document + ========================================================================== + + Normalization for Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} diff --git a/normalize/_root.scss b/normalize/_root.scss deleted file mode 100644 index 3175bdb0e..000000000 --- a/normalize/_root.scss +++ /dev/null @@ -1,25 +0,0 @@ -/* ========================================================================== - Root - - Normalization for root elements - ========================================================================== */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS and IE text size adjust after device orientation change, - * without disabling user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} From 03e23772dab5e793766fd7f0787d731fea3e211a Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 14:55:39 -0700 Subject: [PATCH 15/26] Add new sections partial --- _normailze.scss | 1 + normalize/_sections.scss | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 normalize/_sections.scss diff --git a/_normailze.scss b/_normailze.scss index 23af08f67..bc74bee3d 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -2,6 +2,7 @@ github.com/fizzion/fizzion-normalize.scss */ @import 'normailze/document.scss'; +@import 'normailze/sections.scss'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; diff --git a/normalize/_sections.scss b/normalize/_sections.scss new file mode 100644 index 000000000..24a8a9130 --- /dev/null +++ b/normalize/_sections.scss @@ -0,0 +1,23 @@ +/* Document + ========================================================================== + + Normalization for Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} From 83d46b0808b4e81894409a55ff7ebc950eb05a7d Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:01:13 -0700 Subject: [PATCH 16/26] Update grouping content --- _normailze.scss | 2 +- normalize/_grouping-content.scss | 34 +++++++++----------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/_normailze.scss b/_normailze.scss index bc74bee3d..83f820d3b 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -3,10 +3,10 @@ @import 'normailze/document.scss'; @import 'normailze/sections.scss'; +@import 'normailze/grouping-content.scss'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; @import 'normailze/embedded-content.scss'; -@import 'normailze/grouping-content.scss'; @import 'normailze/forms.scss'; @import 'normailze/tables.scss'; diff --git a/normalize/_grouping-content.scss b/normalize/_grouping-content.scss index 9c8932c87..a2cdd2ffc 100644 --- a/normalize/_grouping-content.scss +++ b/normalize/_grouping-content.scss @@ -5,38 +5,22 @@ ========================================================================== */ /** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. */ hr { - box-sizing: content-box; - height: 0; + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ } /** - * Contain overflow in all browsers. + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. */ pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ } From 49e1f7bc6de63f61b5a6cab7d0dfd5e268d10adf Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:08:34 -0700 Subject: [PATCH 17/26] Add new text-level-semantics partial --- _normailze.scss | 1 + normalize/_text-level-semantics.scss | 74 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 normalize/_text-level-semantics.scss diff --git a/_normailze.scss b/_normailze.scss index 83f820d3b..4201dc173 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -4,6 +4,7 @@ @import 'normailze/document.scss'; @import 'normailze/sections.scss'; @import 'normailze/grouping-content.scss'; +@import 'normailze/text-level-semantics.scss'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; diff --git a/normalize/_text-level-semantics.scss b/normalize/_text-level-semantics.scss new file mode 100644 index 000000000..2c3fdc8d2 --- /dev/null +++ b/normalize/_text-level-semantics.scss @@ -0,0 +1,74 @@ +/* ========================================================================== + Grouping content + + Normalize styling of grouping content. + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} From b1ec1459c6d7ddff821d33334bb13db8d3a6109c Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:11:59 -0700 Subject: [PATCH 18/26] Update embedded-content partial --- _normailze.scss | 2 +- normalize/_embedded-content.scss | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/_normailze.scss b/_normailze.scss index 4201dc173..80f0eb199 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -5,9 +5,9 @@ @import 'normailze/sections.scss'; @import 'normailze/grouping-content.scss'; @import 'normailze/text-level-semantics.scss'; +@import 'normailze/embedded-content.scss'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; -@import 'normailze/embedded-content.scss'; @import 'normailze/forms.scss'; @import 'normailze/tables.scss'; diff --git a/normalize/_embedded-content.scss b/normalize/_embedded-content.scss index cdc63a77e..d057c2497 100644 --- a/normalize/_embedded-content.scss +++ b/normalize/_embedded-content.scss @@ -5,17 +5,9 @@ ========================================================================== */ /** - * Remove border when inside `a` element in IE 8/9/10. + * Remove the border on images inside links in IE 10. */ img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; + border-style: none; } From 6228857afbba261644c3ad902e73b02d19f39498 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:15:11 -0700 Subject: [PATCH 19/26] Add older normalize code for legacy browsers Legacy browsers usually being older IE or webkit android browsers --- normalize/legacy/_embedded-content.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 normalize/legacy/_embedded-content.scss diff --git a/normalize/legacy/_embedded-content.scss b/normalize/legacy/_embedded-content.scss new file mode 100644 index 000000000..4795ec38d --- /dev/null +++ b/normalize/legacy/_embedded-content.scss @@ -0,0 +1,13 @@ +/* ========================================================================== + Legacy Embedded content + + Normalize the styling of embedded content for legacy browsers. + ========================================================================== */ + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} From e5da9f6fd0cf864f4917564920a53a6c648712fc Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:37:51 -0700 Subject: [PATCH 20/26] Update forms partial - Update forms partial - Move useful legacy pieces to legacy/_forms partial --- _normailze.scss | 3 +- normalize/_forms.scss | 157 +++++++++++++++++------------------ normalize/legacy/_forms.scss | 75 +++++++++++++++++ 3 files changed, 151 insertions(+), 84 deletions(-) create mode 100644 normalize/legacy/_forms.scss diff --git a/_normailze.scss b/_normailze.scss index 80f0eb199..374d2c777 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -6,8 +6,9 @@ @import 'normailze/grouping-content.scss'; @import 'normailze/text-level-semantics.scss'; @import 'normailze/embedded-content.scss'; +@import 'normailze/forms.scss'; + @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; -@import 'normailze/forms.scss'; @import 'normailze/tables.scss'; diff --git a/normalize/_forms.scss b/normalize/_forms.scss index 55772063a..47a024ddc 100644 --- a/normalize/_forms.scss +++ b/normalize/_forms.scss @@ -5,15 +5,8 @@ ========================================================================== */ /** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. */ button, @@ -21,154 +14,152 @@ input, optgroup, select, textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ } /** - * Address `overflow` set to `hidden` in IE 8/9/10/11. + * Show the overflow in IE. + * 1. Show the overflow in Edge. */ -button { +button, +input { + /* 1 */ overflow: visible; } /** - * 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 Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. */ button, select { + /* 1 */ text-transform: none; } /** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. + * Correct the inability to style clickable types in iOS and Safari. */ button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; } /** - * Re-set default cursor for disabled elements. + * Remove the inner border and padding in Firefox. */ -button[disabled], -html input[disabled] { - cursor: default; +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; } /** - * Remove inner padding and border in Firefox 4+. + * Restore the focus styles unset by the previous rule. */ -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; } /** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. + * Correct the padding in Firefox. */ -input { - line-height: normal; +fieldset { + padding: 0.35em 0.75em 0.625em; } /** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. */ -input[type="checkbox"], -input[type="radio"] { +legend { box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ } /** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. + * Add the correct vertical alignment in Chrome, Firefox, and Opera. */ -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; +progress { + vertical-align: baseline; } /** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. + * Remove the default vertical scrollbar in IE 10+. */ -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - box-sizing: content-box; /* 2 */ +textarea { + overflow: auto; } /** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. */ -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ } /** - * Define consistent border, margin, and padding. + * Correct the cursor style of increment and decrement buttons in Chrome. */ -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; } /** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. */ -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ } /** - * Remove default vertical scrollbar in IE 8/9/10/11. + * Remove the inner padding in Chrome and Safari on macOS. */ -textarea { - overflow: auto; +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; } /** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. */ -optgroup { - font-weight: bold; +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ } diff --git a/normalize/legacy/_forms.scss b/normalize/legacy/_forms.scss new file mode 100644 index 000000000..2f57e0289 --- /dev/null +++ b/normalize/legacy/_forms.scss @@ -0,0 +1,75 @@ +/* ========================================================================== + Legacy Forms + + Form styling normalization for legacy browsers. + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html [type='button'] /* 1 */, +[type='reset'], +[type='submit'] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +[type='search']::-webkit-search-cancel-button, +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} From 4a3f8868fb8acac700bf67ceed3b3dcf724601c7 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:41:37 -0700 Subject: [PATCH 21/26] Add interactive partial --- _normailze.scss | 1 + normalize/_interactive.scss | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 normalize/_interactive.scss diff --git a/_normailze.scss b/_normailze.scss index 374d2c777..215be09fa 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -7,6 +7,7 @@ @import 'normailze/text-level-semantics.scss'; @import 'normailze/embedded-content.scss'; @import 'normailze/forms.scss'; +@import 'normailze/interactive'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; diff --git a/normalize/_interactive.scss b/normalize/_interactive.scss new file mode 100644 index 000000000..d58b12a9f --- /dev/null +++ b/normalize/_interactive.scss @@ -0,0 +1,21 @@ +/* ========================================================================== + Interactive + + Interactive element styling normalization. + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} From 268f0e42acefb2919d2bf5e212382f69db7767fe Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:44:27 -0700 Subject: [PATCH 22/26] Add misc partial --- _normailze.scss | 1 + normalize/_misc.scss | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 normalize/_misc.scss diff --git a/_normailze.scss b/_normailze.scss index 215be09fa..31067bcb7 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -8,6 +8,7 @@ @import 'normailze/embedded-content.scss'; @import 'normailze/forms.scss'; @import 'normailze/interactive'; +@import 'normailze/misc'; @import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; diff --git a/normalize/_misc.scss b/normalize/_misc.scss new file mode 100644 index 000000000..967ebd7d9 --- /dev/null +++ b/normalize/_misc.scss @@ -0,0 +1,21 @@ +/* ========================================================================== + Misc + + Misc element styling normalization. + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} From dd7d98eb762e04beb8fc12d840c3f0e42983b78e Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:47:33 -0700 Subject: [PATCH 23/26] Move html5-display to legacy --- _normailze.scss | 1 - normalize/{ => legacy}/_html5-display.scss | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) rename normalize/{ => legacy}/_html5-display.scss (80%) diff --git a/_normailze.scss b/_normailze.scss index 31067bcb7..45d5d7846 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -10,7 +10,6 @@ @import 'normailze/interactive'; @import 'normailze/misc'; -@import 'normailze/html5-dispaly.scss'; @import 'normailze/anchors.scss'; @import 'normailze/typography.scss'; @import 'normailze/tables.scss'; diff --git a/normalize/_html5-display.scss b/normalize/legacy/_html5-display.scss similarity index 80% rename from normalize/_html5-display.scss rename to normalize/legacy/_html5-display.scss index 74afe7f75..d6e7aac6d 100644 --- a/normalize/_html5-display.scss +++ b/normalize/legacy/_html5-display.scss @@ -1,7 +1,7 @@ /* ========================================================================== HTML5 display definitions - Normalize the display of the new html5 elements. + Normalize the display of the new html5 elements for legacy browsers. ========================================================================== */ /** @@ -49,13 +49,3 @@ audio:not([controls]) { display: none; height: 0; } - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} From 62c94e93733e63251d6be29452b373cc86d3b289 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:51:52 -0700 Subject: [PATCH 24/26] Move relevant pieces of anchors partial to legacy --- normalize/{ => legacy}/_anchors.scss | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) rename normalize/{ => legacy}/_anchors.scss (68%) diff --git a/normalize/_anchors.scss b/normalize/legacy/_anchors.scss similarity index 68% rename from normalize/_anchors.scss rename to normalize/legacy/_anchors.scss index 2ea93a77f..a00b70450 100644 --- a/normalize/_anchors.scss +++ b/normalize/legacy/_anchors.scss @@ -1,17 +1,9 @@ /* ========================================================================== Anchors - Normalize anchor sytling. + Normalize anchor sytling for legacy browsers. ========================================================================== */ -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - /** * Improve readability of focused elements when they are also in an * active/hover state. From 5c4a0a6873498f981e1debd289724752977d8404 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 15:57:51 -0700 Subject: [PATCH 25/26] Updates to Text-level Semantics - Fix file headers for the modern version - Rename typography to legacy/text-level-semantics - Remove still relevant pieces from legacy --- _normailze.scss | 2 - normalize/_text-level-semantics.scss | 4 +- .../_text-level-semantics.scss} | 41 +------------------ 3 files changed, 4 insertions(+), 43 deletions(-) rename normalize/{_typography.scss => legacy/_text-level-semantics.scss} (56%) diff --git a/_normailze.scss b/_normailze.scss index 45d5d7846..ebbde1865 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -10,6 +10,4 @@ @import 'normailze/interactive'; @import 'normailze/misc'; -@import 'normailze/anchors.scss'; -@import 'normailze/typography.scss'; @import 'normailze/tables.scss'; diff --git a/normalize/_text-level-semantics.scss b/normalize/_text-level-semantics.scss index 2c3fdc8d2..3397accd4 100644 --- a/normalize/_text-level-semantics.scss +++ b/normalize/_text-level-semantics.scss @@ -1,7 +1,7 @@ /* ========================================================================== - Grouping content + Text-level Semantics - Normalize styling of grouping content. + Normalize styling of Text-level Semantics. ========================================================================== */ /** diff --git a/normalize/_typography.scss b/normalize/legacy/_text-level-semantics.scss similarity index 56% rename from normalize/_typography.scss rename to normalize/legacy/_text-level-semantics.scss index 805ba2e4a..ea4e9e332 100644 --- a/normalize/_typography.scss +++ b/normalize/legacy/_text-level-semantics.scss @@ -1,7 +1,7 @@ /* ========================================================================== - Typography + Text-level Semantics - Normalize typographic related styling. + Normalize styling of Text-level Semantics for legacy browsers. ========================================================================== */ /** @@ -12,15 +12,6 @@ abbr[title] { border-bottom: 1px dotted; } -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - /** * Address styling not present in Safari and Chrome. */ @@ -47,31 +38,3 @@ mark { background: #ff0; color: #000; } - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} From 935f0c59f44be7aad0cd34f072616173973f23c1 Mon Sep 17 00:00:00 2001 From: Alex Lemanski Date: Tue, 13 Mar 2018 16:04:16 -0700 Subject: [PATCH 26/26] Move tables partial to legacy --- _normailze.scss | 2 -- normalize/{ => legacy}/_tables.scss | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) rename normalize/{ => legacy}/_tables.scss (85%) diff --git a/_normailze.scss b/_normailze.scss index ebbde1865..f188a4483 100644 --- a/_normailze.scss +++ b/_normailze.scss @@ -9,5 +9,3 @@ @import 'normailze/forms.scss'; @import 'normailze/interactive'; @import 'normailze/misc'; - -@import 'normailze/tables.scss'; diff --git a/normalize/_tables.scss b/normalize/legacy/_tables.scss similarity index 85% rename from normalize/_tables.scss rename to normalize/legacy/_tables.scss index d945363db..35c192382 100644 --- a/normalize/_tables.scss +++ b/normalize/legacy/_tables.scss @@ -1,7 +1,7 @@ /* ========================================================================== Tables - Table styling normalization. + Table styling normalization for legacy browsers. ========================================================================== */ /**