From b9180f7e2f3b0000c07b616610c7f8258c310e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sat, 20 Aug 2016 14:06:44 +0200 Subject: [PATCH] Rebrand the project completely --- .csscomb.json | 1 + .travis.yml | 4 +- Gruntfile.js | 50 ++++++-------- LICENSE.md | 2 +- README.md | 34 +++++---- bower.json | 10 +-- dist/{sanitize.css => codify.css} | 110 ++++++++++-------------------- dist/codify.min.css | 1 + dist/sanitize.min.css | 6 -- package.json | 27 ++++---- src/base.less | 2 + src/display.less | 32 ++------- src/embed.less | 19 +----- src/forms.less | 68 +++++++++--------- src/tables.less | 15 ---- src/text.less | 33 ++++----- 16 files changed, 159 insertions(+), 255 deletions(-) rename dist/{sanitize.css => codify.css} (59%) create mode 100644 dist/codify.min.css delete mode 100644 dist/sanitize.min.css delete mode 100644 src/tables.less diff --git a/.csscomb.json b/.csscomb.json index cf9ff89..9a64040 100644 --- a/.csscomb.json +++ b/.csscomb.json @@ -86,6 +86,7 @@ "text-emphasis-style", "text-emphasis-position", "text-decoration", + "-webkit-text-decoration-skip", "text-indent", "text-justify", "text-outline", diff --git a/.travis.yml b/.travis.yml index 4d7aab0..c5c0d2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ +sudo: required language: node_js node_js: - - "0.10" + - "4" + - "6" before_install: - npm install -g grunt-cli diff --git a/Gruntfile.js b/Gruntfile.js index 237122c..1f1aa79 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,5 @@ /*! - * Sanitize.css gruntfile (http://git.io/sanitize) + * Codify.css gruntfile (http://git.io/sanitize) * Licensed under the MIT License. */ @@ -15,7 +15,7 @@ module.exports = function (grunt) { pkg: grunt.file.readJSON('package.json'), // Paths - sanitize: { + codify: { less: (function () { var modules = (grunt.option('modules') || 'base display text embed forms tables').split(' '); var files = []; @@ -24,16 +24,10 @@ module.exports = function (grunt) { } return files; })(), - css: 'dist/sanitize.css', - cssMin: 'dist/sanitize.min.css' + css: 'dist/codify.css', + cssMin: 'dist/codify.min.css' }, - // Banner - banner: '/*!\n' + - ' * Sanitize.css <%= pkg.version %> (http://git.io/sanitize)\n' + - ' * Licensed under the <%= pkg.license %> License.\n' + - ' */\n', - // Tasks clean: { dist: 'dist' @@ -41,15 +35,22 @@ module.exports = function (grunt) { less: { dist: { - src: '<%= sanitize.less %>', - dest: '<%= sanitize.css %>' + options: { + banner: '/*!\n' + + ' * Codify.css <%= pkg.version %> (https://github.com/zdroid/codify.css)\n' + + ' * Licensed under the <%= pkg.license %> License.\n' + + ' */\n' + }, + src: '<%= codify.less %>', + dest: '<%= codify.css %>' }, distMin: { options: { - compress: true + compress: true, + banner: '/*! Codify.css <%= pkg.version %> | <%= pkg.license %> License | https://github.com/zdroid/codify.css */' }, - src: '<%= sanitize.css %>', - dest: '<%= sanitize.cssMin %>' + src: '<%= codify.less %>', + dest: '<%= codify.cssMin %>' } }, @@ -58,24 +59,15 @@ module.exports = function (grunt) { options: { config: '.csscomb.json' }, - src: '<%= sanitize.css %>', - dest: '<%= sanitize.css %>' - } - }, - - usebanner: { - css: { - options: { - banner: '<%= banner %>' - }, - src: 'dist/*.css' + src: '<%= codify.css %>', + dest: '<%= codify.css %>' } }, watch: { src: { - files: '<%= sanitize.less %>', - tasks: ['less', 'csscomb', 'usebanner'] + files: '<%= codify.less %>', + tasks: ['less', 'csscomb'] } } }); @@ -85,5 +77,5 @@ module.exports = function (grunt) { require('time-grunt')(grunt); // Default task - grunt.registerTask('default', ['clean', 'less', 'csscomb', 'usebanner']); + grunt.registerTask('default', ['clean', 'less', 'csscomb']); }; diff --git a/LICENSE.md b/LICENSE.md index 5ed8e98..5074ba8 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Zlatan Vasović +Copyright (c) 2013-2016 Zlatan Vasović 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/README.md b/README.md index 8434563..750038c 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,31 @@ -# Sanitize.css +# Codify.css -[![Build Status](https://travis-ci.org/ZDroid/sanitize.css.svg?branch=master)](https://travis-ci.org/ZDroid/sanitize.css) -[![devDependency Status](https://david-dm.org/ZDroid/sanitize.css/dev-status.svg)](https://david-dm.org/ZDroid/sanitize.css#info=devDependencies) +[![Build Status](https://travis-ci.org/zdroid/codify.css.svg?branch=master)](https://travis-ci.org/zdroid/codify.css) +[![devDependency Status](https://david-dm.org/zdroid/codify.css/dev-status.svg)](https://david-dm.org/zdroid/codify.css#info=devDependencies) -> A minimal CSS normalization library +> A minimal and customizable CSS normalization library +Codify.css is focused on providing needed corrections for modern browsers, +instead of supporting old, unmaintained and almost unused browsers. Based on [Normalize.css](https://github.com/necolas/normalize.css). ## Download -- [**ZIP package**](https://github.com/ZDroid/sanitize.css/archive/master.zip) -- **Bower:** `bower install sanitize.css` +- [**ZIP package**](https://github.com/zdroid/codify.css/archive/master.zip) +- **Bower:** `bower install codify.css` ### CDN -- [cdnjs](http://cdnjs.com/libraries/sanitize.css/) -- [jsDelivr](http://www.jsdelivr.com/#!sanitize.css) (latest at -`//cdn.jsdelivr.net/sanitize.css/latest/sanitize.min.css`) +- [cdnjs](http://cdnjs.com/libraries/codify.css/) +- [jsDelivr](http://www.jsdelivr.com/#!codify.css) (latest at +`//cdn.jsdelivr.net/codify.css/latest/codify.min.css`) ## Core changes (compared to Normalize.css) - Modules +- Support for older browsers removed - CSSComb support - Improved display definitions - Consistent element styles @@ -33,13 +36,14 @@ Based on [Normalize.css](https://github.com/necolas/normalize.css). - **Chrome** (latest) - **Firefox** (latest) -- **Opera 12+** -- **Safari 6+** -- **Internet Explorer 9+** +- **Opera** (latest) +- **Edge** (latest) +- **Safari 7+** +- **Internet Explorer 10+** ## Compile -Sanitize.css uses [Grunt](http://gruntjs.com) to compile Less code. +Codify.css uses [Grunt](http://gruntjs.com) to compile Less code. ### Dependencies @@ -48,7 +52,7 @@ You need [node.js](http://nodejs.org/download/) to use Grunt. From the command line: 1. Install `grunt-cli` globally with `[sudo] npm install -g grunt-cli`. -2. Run `npm install` from the root Sanitize.css directory to install +2. Run `npm install` from the root Codify.css directory to install dependencies. When completed, you'll be able to run the various Grunt commands provided from @@ -80,4 +84,4 @@ Watches Less files and recompiles them when they're changed. ## License -MIT © [Zlatan Vasović](https://github.com/ZDroid) +MIT © [Zlatan Vasović](https://github.com/zdroid) diff --git a/bower.json b/bower.json index ba15282..36f743a 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { - "name": "sanitize.css", + "name": "codify.css", "author": "Zlatan Vasović", - "description": "A minimal CSS normalization library", + "description": "A minimal and customizable CSS normalization library", "keywords": [ "sanitize", "normalize", @@ -9,10 +9,10 @@ "css", "less" ], - "version": "2.0.0", + "version": "1.0.0", "license": "MIT", - "homepage": "https://github.com/ZDroid/sanitize.css", - "main": "dist/sanitize.css", + "homepage": "https://github.com/zdroid/codify.css", + "main": "dist/codify.css", "ignore": [ "**/.*", "Gruntfile.js", diff --git a/dist/sanitize.css b/dist/codify.css similarity index 59% rename from dist/sanitize.css rename to dist/codify.css index d55b3b7..5707d93 100644 --- a/dist/sanitize.css +++ b/dist/codify.css @@ -1,36 +1,20 @@ /*! - * Sanitize.css 2.0.0 (http://git.io/sanitize) + * Codify.css 1.0.0 (https://github.com/zdroid/codify.css) * Licensed under the MIT License. */ - html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; + line-height: 1.2; } body { margin: 0; } -article, -aside, -figcaption, -figure, -footer, -header, -legend, -main, -menu, -nav, -section { +main { display: block; } -audio, -canvas, -label, -video { - display: inline-block; -} audio:not([controls]) { display: none; height: 0; @@ -41,14 +25,16 @@ template { } a { + -webkit-text-decoration-skip: objects; background: transparent; } hr { height: 0; box-sizing: content-box; + overflow: visible; } h1 { - margin: .7em 0; + margin: .67em 0; font-size: 2em; } b, @@ -56,7 +42,7 @@ strong { font-weight: bold; } small { - font-size: 85%; + font-size: 80%; } sub, sup { @@ -69,17 +55,11 @@ sup { top: -.25em; } sub { - bottom: -.25em; -} -dfn { - font-style: italic; + bottom: -.5em; } abbr[title] { - border-bottom: 1px dotted; -} -mark { - color: #000; - background: #ff0; + text-decoration: underline; + text-decoration: underline dotted; } blockquote:before, blockquote:after { @@ -89,7 +69,8 @@ code, kbd, pre, samp { - font-family: monospace; + font-family: monospace, monospace; + font-size: 1em; } pre { overflow: auto; @@ -98,16 +79,6 @@ pre { white-space: pre-wrap; } -audio, -canvas, -embed, -iframe, -img, -object, -svg, -video { - vertical-align: middle; -} img { max-width: 100%; height: auto; @@ -116,9 +87,6 @@ img { svg:not(:root) { overflow: hidden; } -figure { - margin: 1em 40px; -} progress { vertical-align: baseline; } @@ -142,62 +110,58 @@ fieldset { border: 0; } legend { + display: table; + max-width: 100%; + box-sizing: border-box; padding: 0; + white-space: normal; border: 0; } -input { - line-height: normal; -} -input[type="search"] { +[type="search"] { box-sizing: border-box; -webkit-appearance: textfield; } -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { height: auto; } -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { +[type="reset"], +[type="submit"] { -webkit-appearance: button; - cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } -input::-moz-placeholder { - opacity: 1; -} button::-moz-focus-inner, -input::-moz-focus-inner { +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { padding: 0; - border: 0; + border-style: none; } -input[type="checkbox"], -input[type="radio"] { +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} +[type="checkbox"], +[type="radio"] { box-sizing: border-box; padding: 0; margin: 4px 0 0; line-height: normal; } textarea { - padding: 0; vertical-align: top; } -button { +button, +input { overflow: visible; } - -table { - max-width: 100%; - border-collapse: collapse; -} -th { - text-align: left; -} diff --git a/dist/codify.min.css b/dist/codify.min.css new file mode 100644 index 0000000..93a57a0 --- /dev/null +++ b/dist/codify.min.css @@ -0,0 +1 @@ +/*! Codify.css 1.0.0 | MIT License | https://github.com/zdroid/codify.css */html{font-family:sans-serif;line-height:1.2;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}main{display:block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent;-webkit-text-decoration-skip:objects}hr{height:0;box-sizing:content-box;overflow:visible}h1{margin:.67em 0;font-size:2em}b,strong{font-weight:bold}small{font-size:80%}sub,sup{position:relative;font-size:80%;line-height:0;vertical-align:baseline}sup{top:-0.25em}sub{bottom:-0.5em}abbr[title]{text-decoration:underline;text-decoration:underline dotted}blockquote:before,blockquote:after{content:""}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{overflow:auto;word-break:break-all;word-wrap:break-word;white-space:pre-wrap}img{height:auto;max-width:100%;border:0}svg:not(:root){overflow:hidden}progress{vertical-align:baseline}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button,select{text-transform:none}fieldset{padding:0;margin:0;border:0}legend{display:table;max-width:100%;padding:0;border:0;box-sizing:border-box;white-space:normal}[type="search"]{box-sizing:border-box;-webkit-appearance:textfield}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button,[type="reset"],[type="submit"]{-webkit-appearance:button}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}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}[type="checkbox"],[type="radio"]{padding:0;margin:4px 0 0;box-sizing:border-box;line-height:normal}textarea{vertical-align:top}button,input{overflow:visible} \ No newline at end of file diff --git a/dist/sanitize.min.css b/dist/sanitize.min.css deleted file mode 100644 index 986d079..0000000 --- a/dist/sanitize.min.css +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Sanitize.css 2.0.0 (http://git.io/sanitize) - * Licensed under the MIT License. - */ - -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,figcaption,figure,footer,header,legend,main,menu,nav,section{display:block}audio,canvas,label,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}hr{height:0;box-sizing:content-box}h1{margin:.7em 0;font-size:2em}b,strong{font-weight:bold}small{font-size:85%}sub,sup{position:relative;font-size:80%;line-height:0;vertical-align:baseline}sup{top:-0.25em}sub{bottom:-0.25em}dfn{font-style:italic}abbr[title]{border-bottom:1px dotted}mark{color:#000;background:#ff0}blockquote:before,blockquote:after{content:""}code,kbd,pre,samp{font-family:monospace}pre{overflow:auto;word-break:break-all;word-wrap:break-word;white-space:pre-wrap}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle}img{height:auto;max-width:100%;border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}progress{vertical-align:baseline}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button,select{text-transform:none}fieldset{padding:0;margin:0;border:0}legend{padding:0;border:0}input{line-height:normal}input[type="search"]{box-sizing:border-box;-webkit-appearance:textfield}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input::-moz-placeholder{opacity:1}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type="checkbox"],input[type="radio"]{padding:0;margin:4px 0 0;line-height:normal;box-sizing:border-box}textarea{padding:0;vertical-align:top}button{overflow:visible}table{max-width:100%;border-collapse:collapse}th{text-align:left} \ No newline at end of file diff --git a/package.json b/package.json index 04548e1..7bd2b97 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,22 @@ { - "name": "sanitize.css", - "version": "2.0.0", - "repository": "ZDroid/sanitize.css", + "name": "codify.css", + "version": "1.0.0", "license": "MIT", + "repository": "zdroid/codify.css", "scripts": { "test": "grunt" }, + "engines": { + "node": ">=4" + }, "devDependencies": { - "grunt": "0.4.x", - "grunt-banner": "0.4.x", - "grunt-contrib-clean": "0.6.x", - "grunt-contrib-less": "1.0.x", - "grunt-contrib-watch": "0.6.x", - "grunt-csscomb": "3.0.x", - "load-grunt-tasks": "3.2.x", - "time-grunt": "1.2.x" - } + "grunt": "1.0.x", + "grunt-contrib-clean": "1.0.x", + "grunt-contrib-less": "1.4.x", + "grunt-contrib-watch": "1.0.x", + "grunt-csscomb": "3.1.x", + "load-grunt-tasks": "3.5.x", + "time-grunt": "1.4.x" + }, + "private": true } diff --git a/src/base.less b/src/base.less index 4808a6f..fc76a05 100644 --- a/src/base.less +++ b/src/base.less @@ -3,10 +3,12 @@ // // Set default font family to `sans-serif`. +// Define default line height. // Prevent text size adjust after orientation change, without disabling // the user zoom. html { font-family: sans-serif; + line-height: 1.2; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } diff --git a/src/display.less b/src/display.less index a441217..deb46c9 100644 --- a/src/display.less +++ b/src/display.less @@ -2,41 +2,19 @@ // Display definitions // -// Correct `block` display not defined for any HTML5 element in IE 9. -// Correct `block` display not defined for `details` or `summary` in Firefox -// and IE 10+. -// Correct `block` display not defined for `main` in IE 11. -article, -aside, -figcaption, -figure, -footer, -header, -legend, -main, -menu, -nav, -section { +// Correct `block` display not defined for `main` in IE 10+. +main { display: block; } -// Correct `inline-block` display not defined in IE 9. -audio, -canvas, -label, -video { - display: inline-block; -} - -// Prevent browsers from displaying `audio` without controls. -// Remove excess height in iOS 5 devices. +// Add the correct display for iOS 7-. audio:not([controls]) { display: none; height: 0; } -// Address `[hidden]` styling not present in IE 9/10. -// Hide the `template` element in Safari and IE. +// Address `[hidden]` styling not present in IE 10. +// Hide the `template` element in IE. [hidden], template { display: none; diff --git a/src/embed.less b/src/embed.less index b733219..954ed30 100644 --- a/src/embed.less +++ b/src/embed.less @@ -2,21 +2,9 @@ // Embedded content // -// Remove the gap between embedded content and the bottom of its container. -audio, -canvas, -embed, -iframe, -img, -object, -svg, -video { - vertical-align: middle; -} - // Scale the height according to the width. // Set a maximum width relative to the parent. -// Remove border when inside `a` element in IE 9/10. +// Remove border when inside `a` element in IE 10. img { height: auto; max-width: 100%; @@ -28,11 +16,6 @@ svg:not(:root) { overflow: hidden; } -// Address margin not present in Safari and IE 9. -figure { - margin: 1em 40px; -} - // Normalize `vertical-align` of `progress` in Chrome, Firefox and Opera. progress { vertical-align: baseline; diff --git a/src/forms.less b/src/forms.less index 2af5cb8..4a8c9c4 100644 --- a/src/forms.less +++ b/src/forms.less @@ -28,20 +28,21 @@ fieldset { border: 0; } +// Correct the text wrapping in Edge and IE. +// Correct the color inheritance from `fieldset` elements in IE. // Remove inconsistent padding and border. legend { + display: table; + max-width: 100%; padding: 0; border: 0; -} - -// Normalize incosistent `line-height` in Firefox. -input { - line-height: normal; + box-sizing: border-box; + white-space: normal; } // Address `box-sizing` set to `border-box` in Chrome and Safari. // Address `appearance` set to `searchfield` in Chrome and Safari. -input[type="search"] { +[type="search"] { box-sizing: border-box; -webkit-appearance: textfield; } @@ -49,28 +50,23 @@ input[type="search"] { // Fix the cursor style for Chrome's increment and decrement buttons. It causes // the cursor style of the decrement button to change from `default` to `text` // for some font sizes. -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { height: auto; } // Remove inner padding and search cancel button in Chrome and Safari for OS X. -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } -// 1. Avoid the WebKit bug in Android 4.0.* where 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. +// 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"] { - cursor: pointer; // 2 - -webkit-appearance: button; // 3 +[type="reset"], +[type="submit"] { + -webkit-appearance: button; } // Set default cursor for disabled elements. @@ -79,37 +75,41 @@ html input[disabled] { cursor: default; } -// Address inconsistent opacity in Firefox. -input::-moz-placeholder{ - opacity: 1; -} - // Remove inner padding and border in Firefox. button::-moz-focus-inner, -input::-moz-focus-inner { +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; padding: 0; - border: 0; +} + +// Restore the focus ring removed by previous rule. +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; } // Remove excess padding in IE. // Improve positioning. // Address `box-sizing` set to `content-box` in IE. -input[type="checkbox"], -input[type="radio"] { +[type="checkbox"], +[type="radio"] { padding: 0; margin: 4px 0 0; - line-height: normal; box-sizing: border-box; + line-height: normal; } -// Remove default padding in Chrome. // Remove vertical scrollbar in IE. textarea { - padding: 0; vertical-align: top; } -// Address `overflow` set to `hidden` in IE 9. -button { +// Address `overflow` set to `hidden` in IE and Edge. +button, +input { overflow: visible; } diff --git a/src/tables.less b/src/tables.less deleted file mode 100644 index 68f806f..0000000 --- a/src/tables.less +++ /dev/null @@ -1,15 +0,0 @@ -// -// Tables -// - -// Avoid layout breaking with setting `max-width`. -// Remove most spacing between table cells. -table { - max-width: 100%; - border-collapse: collapse; -} - -// Reset default `text-align`. -th { - text-align: left; -} diff --git a/src/text.less b/src/text.less index 42f4b53..cf6c736 100644 --- a/src/text.less +++ b/src/text.less @@ -2,21 +2,25 @@ // Text // -// Remove the gray background color from links in IE 10+. +// Remove the gray background color from links in IE 10. +// Remove gaps in links underline in iOS 8+ and Safari 8+. a { background: transparent; + -webkit-text-decoration-skip: objects; } // Address differences between Firefox and other browsers. +// Show overflow in IE and Edge. hr { height: 0; box-sizing: content-box; + overflow: visible; } // Address variable `h1` font-size and margin within `section` and `article` // contexts in Chrome, Firefox and Safari. h1 { - margin: 0.7em 0; + margin: 0.67em 0; font-size: 2em; } @@ -28,7 +32,7 @@ strong { // Address inconsistent and variable `font-size`. small { - font-size: 85%; + font-size: 80%; } // Prevent `sub` and `sup` affecting `line-height`. @@ -45,23 +49,13 @@ sup { } sub { - bottom: -0.25em; -} - -// Address styling not present in Safari. -dfn { - font-style: italic; + bottom: -0.5em; } -// Address styling not present in Chrome, Safari and IE 9. +// Address styling not present in Chrome, Edge, IE, Opera and Safari. abbr[title] { - border-bottom: 1px dotted; -} - -// Address styling not present in IE 9. -mark { - color: #000; - background: #ff0; + text-decoration: underline; + text-decoration: underline dotted; } // Remove redundant quotes. @@ -70,12 +64,13 @@ blockquote:after { content: ""; } -// Correct `font-family` set oddly in Chrome and Safari. +// Correct odd font family inheritance and `em` sizing in all browsers. code, kbd, pre, samp { - font-family: monospace; + font-family: monospace, monospace; + font-size: 1em; } // Improve overflow and readability of preformatted text.