diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..496ee2ca6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 86d0d1df5..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -=== HEAD - -=== 2.1.3 (August 26, 2013) - -* Fix component.json. -* Remove the gray background color from active links in IE 10. - -=== 2.1.2 (May 11, 2013) - -* Revert root `color` and `background` normalizations. - -=== 2.1.1 (April 8, 2013) - -* Normalize root `color` and `background` to counter the effects of system - color schemes. - -=== 2.1.0 (January 21, 2013) - -* Normalize `text-transform` for `button` and `select`. -* Normalize `h1` margin when within HTML5 sectioning elements. -* Normalize `hr` element. -* Remove unnecessary `pre` styles. -* Add `main` element to HTML5 display definitions. -* Fix cursor style for disabled button `input`. - -=== 2.0.1 (August 20, 2012) - -* Remove stray IE 6/7 `inline-block` hack from HTML5 display settings. - -=== 2.0.0 (August 19, 2012) - -* Remove legacy browser form normalizations. -* Remove all list normalizations. -* Add `quotes` normalizations. -* Remove all heading normalizations except `h1` font size. -* Form elements automatically inherit `font-family` from ancestor. -* Drop support for IE 6/7, Firefox < 4, and Safari < 5. - -=== 1.0.1 (August 19, 2012) - -* Adjust `small` font size normalization. - -=== 1.0.0 (August 14, 2012) - -(Only the notable changes since public release) - -* Add MIT License. -* Hide `audio` elements without controls in iOS 5 (#69). -* Normalize heading margins and font size. -* Move font-family normalization from `body` to `html` (#62). -* Remove scrollbar normalization (#64 #65). -* Remove excess padding from checkbox and radio inputs in IE 7 (#42). -* Add IE9 correction for SVG overflow (#16). -* Add fix for legend not inheriting color in IE 6/7/8/9. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 4c526bb08..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,177 +0,0 @@ -# Contributing to normalize.css - -Please take a moment to review this document in order to make the contribution -process easy and effective for everyone involved. - -Following these guidelines helps to communicate that you respect the time of -the developers managing and developing this open source project. In return, -they should reciprocate that respect in addressing your issue or assessing -patches and features. - - -## Using the issue tracker - -The issue tracker is the preferred channel for [bug reports](#bugs), -[features requests](#features) and [submitting pull -requests](#pull-requests), but please respect the following restrictions: - -* Please **do not** use the issue tracker for personal support requests. - -* Please **do not** derail or troll issues. Keep the discussion on topic and - respect the opinions of others. - - - -## Bug reports - -A bug is a _demonstrable problem_ that is caused by the code in the repository. -Good bug reports are extremely helpful - thank you! - -Guidelines for bug reports: - -1. **Use the GitHub issue search** – check if the issue has already been - reported. - -2. **Check if the issue has been fixed** – try to reproduce it using the - latest `master` branch in the repository. - -3. **Isolate the problem** – create a live example (e.g., on - [Codepen](http://codepen.io)) of a [reduced test - case](http://css-tricks.com/6263-reduced-test-cases/). - -A good bug report shouldn't leave others needing to chase you up for more -information. Please try to be as detailed as possible in your report. What is -your environment? What steps will reproduce the issue? What browser(s) and OS -experience the problem? What would you expect to be the outcome? All these -details will help people to fix any potential bugs. - -Example: - -> Short and descriptive example bug report title -> -> A summary of the issue and the browser/OS environment in which it occurs. If -> suitable, include the steps required to reproduce the bug. -> -> 1. This is the first step -> 2. This is the second step -> 3. Further steps, etc. -> -> `` - a link to the reduced test case -> -> Any other information you want to share that is relevant to the issue being -> reported. This might include the lines of code that you have identified as -> causing the bug, and potential solutions (and your opinions on their -> merits). - - - -## Feature requests - -Feature requests are welcome. But take a moment to find out whether your idea -fits with the scope and aims of the project. It's up to *you* to make a strong -case to convince the project's developers of the merits of this feature. Please -provide as much detail and context as possible. - - - -## Pull requests - -Good pull requests - patches, improvements, new features - are a fantastic -help. They should remain focused in scope and avoid containing unrelated -commits. - -**Please ask first** before embarking on any significant work, otherwise you -risk spending a lot of time working on something that the project's developers -might not want to merge into the project. - -Please adhere to the coding conventions used throughout a project (whitespace, -accurate comments, etc.) and any other requirements (such as test coverage). - -Follow this process if you'd like your work considered for inclusion in the -project: - -1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, - and configure the remotes: - - ```bash - # Clone your fork of the repo into the current directory - git clone https://github.com//normalize.css - # Navigate to the newly cloned directory - cd normalize.css - # Assign the original repo to a remote called "upstream" - git remote add upstream https://github.com/necolas/normalize.css - ``` - -2. If you cloned a while ago, get the latest changes from upstream: - - ```bash - git checkout master - git pull upstream master - ``` - -3. Never work directly on `master`. Create a new topic branch (off the latest - version of `master`) to contain your feature, change, or fix: - - ```bash - git checkout -b - ``` - -4. Commit your changes in logical chunks. Please adhere to these [git commit - message conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) - or your code is unlikely be merged into the main project. Use Git's - [interactive rebase](https://help.github.com/articles/interactive-rebase) - feature to tidy up your commits before making them public. - - Make sure to add a test to the `test.html` file if appropriate, and test - your change in all supported browsers. - -5. Locally rebase the upstream development branch into your topic branch: - - ```bash - git pull --rebase upstream master - ``` - -6. Push your topic branch up to your fork: - - ```bash - git push origin - ``` - -10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) - with a clear title and description. - - Please submit a separate pull request for any appropriate changes required - in the `v1` branch for legacy browsers. - -**IMPORTANT**: By submitting a patch, you agree to allow the project owner to -license your work under the same license as that used by the project. - - - -## Maintainers - -If you have commit access, please follow this process for merging patches and -cutting new releases. - -### Accepting patches - -1. Check that a patch is within the scope and philosophy of the project. -2. Check that a patch has any necessary tests and a proper, descriptive commit - message. -3. Test the patch locally. -4. Do not use GitHub's merge button. Apply the patch to `master` locally - (either via `git am` or by checking the whole branch out). Amend minor - problems with the author's original commit if necessary. Then push to GitHub. -5. If a patch should be included in `v1`, cherry-pick the commits or manually - apply if all else fails. - -### Releasing a new version - -1. Include all new functional changes in the CHANGELOG. -2. Use a dedicated commit to increment the version. The version needs to be - added to the CHANGELOG (inc. date), and the `bower.json`, `component.json`, - and `normalize.css` files. -3. The commit message must be of `v0.0.0` format. -4. Create an annotated tag for the version: `git tag -m "v0.0.0" v0.0.0`. -5. Push the changes and tags to GitHub: `git push --tags origin master` -6. Checkout the `gh-pages` branch and follow the instructions in the README. diff --git a/README.md b/README.md index 273482726..2455022e9 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,18 @@ -# normalize.css v2 +# Normalize Touch -Normalize.css is a customisable CSS file that makes browsers render all -elements more consistently and in line with modern standards. +A version of normalize with some tweaks made for touch-webkit web apps on iOS and Android devices. Specially customized for development of mixed native/web apps using frameworks such as Cordova/Phonegap. -The project relies on researching the differences between default browser -styles in order to precisely target only the styles that need or benefit from -normalizing. +All the ie stuff has been wiped out. -[Check out the demo](http://necolas.github.io/normalize.css/latest/test.html) +It includes a css, scss and less version of the file. -## Install +###Original project and documentation: +[https://github.com/necolas/normalize.css](https://github.com/necolas/normalize.css). -Download from the [project page](http://necolas.github.io/normalize.css/). +Original Normalize.css is a project by [Nicolas Gallagher](https://github.com/necolas). -Install with [Bower](http://bower.io/): `bower install --save normalize-css` +Webkit-touch tweaks by me, jota-v. -Install with [Component(1)](http://component.io/): `component install necolas/normalize.css` -## What does it do? -* Preserves useful defaults, unlike many CSS resets. -* Normalizes styles for a wide range of elements. -* Corrects bugs and common browser inconsistencies. -* Improves usability with subtle improvements. -* Explains what code does using detailed comments. -## How to use it - -No other styles should come before Normalize.css. - -It is recommended that you include the `normalize.css` file as untouched -library code. - -## Browser support - -* Google Chrome -* Mozilla Firefox 4+ -* Apple Safari 5+ -* Opera 12+ -* Internet Explorer 8+ - -[Normalize.css v1 provides legacy browser -support](https://github.com/necolas/normalize.css/tree/v1) (IE 6+, Safari 4+), -but is no longer actively developed. - -## Contributing - -Please read the CONTRIBUTING.md - -## Acknowledgements - -Normalize.css is a project by [Nicolas Gallagher](https://github.com/necolas), -co-created with [Jonathan Neal](https://github.com/jonathantneal). diff --git a/bower.json b/bower.json index 6e5e4b758..a2eda789b 100644 --- a/bower.json +++ b/bower.json @@ -1,12 +1,23 @@ { - "name": "normalize-css", - "version": "2.1.3", - "main": "normalize.css", - "author": "Nicolas Gallagher", - "ignore": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "component.json", - "test.html" - ] + "name": "normalize-touch", + "version": "2.1.3touch", + "homepage": "https://github.com/jota-v/touch-normalize.css", + "authors": [ + "jotav " + ], + "description": "Normalize.css cleaned and tweaked for webkit-touch web apps.", + "main": [ + "touch-normalize.css", + "touch-normalize.scss", + "touch-normalize.less" + ], + "keywords": [ + "normailize", + "webkit", + "touch", + "css", + "scss", + "less" + ], + "license": "MIT" } diff --git a/component.json b/component.json deleted file mode 100644 index 1310efffd..000000000 --- a/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "normalize-css", - "repo": "necolas/normalize.css", - "version": "2.1.3", - "styles": ["normalize.css"], - "author": "Nicolas Gallagher", - "license": "MIT" -} diff --git a/normalize.css b/normalize-touch.css similarity index 71% rename from normalize.css rename to normalize-touch.css index c2de8df94..88537bb5e 100644 --- a/normalize.css +++ b/normalize-touch.css @@ -4,54 +4,6 @@ HTML5 display definitions ========================================================================== */ -/** - * Correct `block` display not defined in IE 8/9. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -/** - * Correct `inline-block` display not defined in IE 8/9. - */ - -audio, -canvas, -video { - display: inline-block; -} - -/** - * 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. - * Hide the `template` element in IE, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} /* ========================================================================== Base @@ -63,6 +15,14 @@ template { * user zoom. */ +/** + * Avoid user selection and native browser menu options on long press in all links. + */ +* { + -webkit-touch-callout: none; + -webkit-user-select: none; +} + html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ @@ -81,14 +41,6 @@ body { Links ========================================================================== */ -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background: transparent; -} - /** * Address `outline` inconsistency between Chrome and other browsers. */ @@ -145,25 +97,6 @@ dfn { font-style: italic; } -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - /** * Correct font family set oddly in Safari 5 and Chrome. */ @@ -220,25 +153,6 @@ sub { bottom: -0.25em; } -/* ========================================================================== - Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9. - */ - -img { - border: 0; -} - -/** - * Correct overflow displayed oddly in IE 9. - */ - -svg:not(:root) { - overflow: hidden; -} /* ========================================================================== Figures @@ -257,23 +171,37 @@ figure { ========================================================================== */ /** - * Define consistent border, margin, and padding. + * 1.Return the posibility to users of selecting text in forms + * 2. Avoid a rare color highlight on input tap. */ -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; +select, +input[type="text"] +input[type="password"] +input[type="datetime"] +input[type="datetime-local"] +input[type="date"] +input[type="month"] +input[type="time"] +input[type="week"] +input[type="number"] +input[type="email"] +input[type="url"] +input[type="search"] +input[type="tel"] +input[type="color"] { + -webkit-user-select: auto; + -webkit-tap-highlight-color: rgba(0,0,0,0); } /** - * 1. Correct `color` not being inherited in IE 8/9. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. + * Define consistent border, margin, and padding. */ -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } /** @@ -291,15 +219,6 @@ textarea { margin: 0; /* 3 */ } -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -button, -input { - line-height: normal; -} /** * Address inconsistent `text-transform` inheritance for `button` and `select`. @@ -338,17 +257,6 @@ html input[disabled] { cursor: default; } -/** - * 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 */ -} - /** * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome @@ -373,18 +281,7 @@ input[type="search"]::-webkit-search-decoration { } /** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * 1. Remove default vertical scrollbar in IE 8/9. - * 2. Improve readability and alignment in all browsers. + * Improve readability and alignment in all browsers. */ textarea { diff --git a/normalize-touch.less b/normalize-touch.less new file mode 100644 index 000000000..88537bb5e --- /dev/null +++ b/normalize-touch.less @@ -0,0 +1,303 @@ +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +/** + * Avoid user selection and native browser menu options on long press in all links. + */ +* { + -webkit-touch-callout: none; + -webkit-user-select: none; +} + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * 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; +} + + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * 1.Return the posibility to users of selecting text in forms + * 2. Avoid a rare color highlight on input tap. + */ + +select, +input[type="text"] +input[type="password"] +input[type="datetime"] +input[type="datetime-local"] +input[type="date"] +input[type="month"] +input[type="time"] +input[type="week"] +input[type="number"] +input[type="email"] +input[type="url"] +input[type="search"] +input[type="tel"] +input[type="color"] { + -webkit-user-select: auto; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 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; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/normalize-touch.scss b/normalize-touch.scss new file mode 100644 index 000000000..88537bb5e --- /dev/null +++ b/normalize-touch.scss @@ -0,0 +1,303 @@ +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +/** + * Avoid user selection and native browser menu options on long press in all links. + */ +* { + -webkit-touch-callout: none; + -webkit-user-select: none; +} + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * 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; +} + + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * 1.Return the posibility to users of selecting text in forms + * 2. Avoid a rare color highlight on input tap. + */ + +select, +input[type="text"] +input[type="password"] +input[type="datetime"] +input[type="datetime-local"] +input[type="date"] +input[type="month"] +input[type="time"] +input[type="week"] +input[type="number"] +input[type="email"] +input[type="url"] +input[type="search"] +input[type="tel"] +input[type="color"] { + -webkit-user-select: auto; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 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; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/test.html b/test.html deleted file mode 100644 index c90099163..000000000 --- a/test.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - Normalize CSS - - - - - -

Heading 1

-

Heading 2

-

Heading 3

-

Heading 4

-
Heading 5
-
Heading 6
- -
-

Heading 1 (in section)

-

Heading 2 (in section)

-

Heading 3 (in section)

-

Heading 4 (in section)

-
Heading 5 (in section)
-
Heading 6 (in section)
-
- -
-

Heading 1 (in article)

-

Heading 2 (in article)

-

Heading 3 (in article)

-

Heading 4 (in article)

-
Heading 5 (in article)
-
Heading 6 (in article)
-
- -
-
-

Heading 1 (in hgroup)

-

Heading 2 (in hgroup)

-
- -
- -

Text-level semantics

- - - -

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

-

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

- -
Address: somewhere, world
- -
- -
- -

- The a element example
- The abbr element and abbr element with title examples
- The b element example
- The cite element example
- The code element example
- The del element example
- The dfn element and dfn element with title examples
- The em element example
- The i element example
- The img element example
- The ins element example
- The kbd element example
- The mark element example
- The q element inside a q element example
- The s element example
- The samp element example
- The small element example
- The span element example
- The strong element example
- The sub element example
- The sup element example
- The u element example
- The var element example -

- -

Template content

- - -

Embedded content

- -

audio

- - - - -

img

- - - - -

svg

- - - - - -

video

- - - - -

Interactive content

- -

details / summary

-
- More info -

Additional information

-
    -
  • Point 1
  • -
  • Point 2
  • -
-
- -

Grouping content

- -

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

- -

pre

- -
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.
- -
<html>
-    <head>
-    </head>
-    <body>
-        <div class="main"> <div>
-    </body>
-</html>
- -

blockquote

- -
-

Some sort of famous witty quote marked up with a <blockquote> and a child <p> element.

-
- -
Even better philosophical quote marked up with just a <blockquote> element.
- -

ordered list

- -
    -
  1. list item 1
  2. -
  3. list item 1 -
      -
    1. list item 2
    2. -
    3. list item 2 -
        -
      1. list item 3
      2. -
      3. list item 3
      4. -
      -
    4. -
    5. list item 2
    6. -
    7. list item 2
    8. -
    -
  4. -
  5. list item 1
  6. -
  7. list item 1
  8. -
- -

unordered list

- -
    -
  • list item 1
  • -
  • list item 1 -
      -
    • list item 2
    • -
    • list item 2 -
        -
      • list item 3
      • -
      • list item 3
      • -
      -
    • -
    • list item 2
    • -
    • list item 2
    • -
    -
  • -
  • list item 1
  • -
  • list item 1
  • -
- -

description list

- -
-
Description name
-
Description value
-
Description name
-
Description value
-
Description value
-
Description name
-
Description name
-
Description value
-
- -

figure

- -
- -
Figcaption content
-
- -

Tabular data

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Jimi Hendrix - albums
AlbumYearPrice
AlbumYearPrice
Are You Experienced1967$10.00
Axis: Bold as Love1967$12.00
Electric Ladyland1968$10.00
Band of Gypsys1970$12.00
- -

Forms

- -
-
- Inputs as descendents of labels (form legend). This doubles up as a long legend that can test word wrapping. -

-

-

-

-

-

-

- -

-

-

-

- -

-

-
- -
- Inputs as siblings of labels -

-

-

-

-

-

-

-

- -

-

-

-

- -

-

-
- -
- Clickable inputs and buttons -

-

-

-

-

- - -

-

-

-

-
- -
- box-sizing tests -
-
-
-
-
- -
-
-
-
-
-
-
-
- -
-
- -
-
- -
-
-
-
- -
-
-
-
-
- - -