From a93342558b779e3853ffed7ca34bd11afad81ba1 Mon Sep 17 00:00:00 2001 From: Alex Lemanski <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:52:38 -0700 Subject: [PATCH 01/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:54:32 -0700 Subject: [PATCH 02/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:53:03 -0700 Subject: [PATCH 03/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:53:23 -0700 Subject: [PATCH 04/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:53:29 -0700 Subject: [PATCH 05/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:53:37 -0700 Subject: [PATCH 06/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 22:53:45 -0700 Subject: [PATCH 07/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 23:36:01 -0700 Subject: [PATCH 08/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 23:38:02 -0700 Subject: [PATCH 09/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 23:46:02 -0700 Subject: [PATCH 10/12] 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 <alex.lemanski@bitfyre.net> Date: Thu, 2 Jul 2015 23:46:23 -0700 Subject: [PATCH 11/12] 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 <alex.lemanski@bitfyre.net> Date: Mon, 6 Jul 2015 12:24:42 -0700 Subject: [PATCH 12/12] 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" -}