diff --git a/Gruntfile.js b/Gruntfile.js index 319d567..1d4fc9a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -20,6 +20,15 @@ module.exports = function(grunt) { }, brutal: { src: ['build/css/Ribs.css'] + }, + npci: { + options: { + absoluteFilePathsForFormatters: true, + formatters: [ + { id: 'csslint-xml', dest: 'build/csslint.xml' } + ] + }, + src: ['build/css/Ribs.css'] } }, cssmin: { @@ -63,6 +72,7 @@ module.exports = function(grunt) { grunt.registerTask('docs', ['sass', 'styleguide']); grunt.registerTask('test', ['sass', 'csslint:scssoutput']); grunt.registerTask('minify', ['cssmin']); + grunt.registerTask('npci', ['sass', 'csslint:npci']); grunt.registerTask('default', ['sass', 'cssmin']); }; diff --git a/docs/index.html b/docs/index.html index c5610b3..d3e1180 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,11 +31,13 @@
I've added grunt configuration to the repository for those of you that use it.
-There are 4 main tasks added: - default - Runs Sass to create the stylesheet from the source files, places the output in ./css then creates a minified version of the file and places it into the same directory - test - This runs CSSLint over the output CSS file (Note that there are a few bits in the original skeleton css that I still need to fix!) - minify - This literally just runs cssmin, useful if you've edited Ribs.css directly - watch - This will monitor the scss directory for changes and automatically rebuild the css and minified css (Effectively the same as sass --watch but with added minification)
+There are 4 main tasks added:
+You need to install grunt-cli globally (npm install -g grunt-cli) to start with, otherwise you wont have a runner!
Then following that, from the root dir of this project, run npm install which will set up all of the required dependencies.
- Correct block display not defined in IE 8/9.
- Correct inline-block display not defined in IE 8/9.
- Prevent modern browsers from displaying audio without controls.
- * Remove excess height in iOS 5 devices.
- Address [hidden] styling not present in IE 8/9.
- * Hide the template element in IE, Safari, and Firefox < 22.
*
+block display not defined in IE 8/9.*
+inline-block display not defined in IE 8/9.*
+audio without controls.*
+[hidden] styling not present in IE 8/9.template element in IE, Safari, and Firefox < 22.==========================================================================
article,
aside,
@@ -46,12 +54,22 @@ audio:not([controls]) {
template {
display: none;
}- 1. Set default font family to sans-serif. - 2. Prevent iOS text size adjust after orientation change, without disabling - user zoom.
-- Remove default margin.
+*
+*
+==========================================================================
html {
font-family: sans-serif; /* 1 */
@@ -63,12 +81,18 @@ template {
body {
margin: 0;
}- Remove the gray background color from active links in IE 10.
-
- Address outline inconsistency between Chrome and other browsers.
- Improve readability when focused and also mouse hovered in all browsers.
+*
+*
+outline inconsistency between Chrome and other browsers.*
+==========================================================================
a {
background: transparent;
@@ -84,29 +108,51 @@ a:active,
a:hover {
outline: 0;
}
- Address variable h1 font-size and margin within section and article
- * contexts in Firefox 4+, Safari 5, and Chrome.
- Address styling not present in IE 8/9, Safari 5, and Chrome.
-
- Address style set to bolder in Firefox 4+, Safari 5, and Chrome.
- Address styling not present in Safari 5 and Chrome.
-- Address differences between Firefox and other browsers.
-- Address styling not present in IE 8/9.
-- Correct font family set oddly in Safari 5 and Chrome.
-- Improve readability of pre-formatted text in all browsers.
-- Set consistent quote types.
-- Address inconsistent and variable font size in all browsers.
-
- Prevent sub and sup affecting line-height in all browsers.
*
+h1 font-size and margin within section and article*
+*
+bolder in Firefox 4+, Safari 5, and Chrome.*
+*
+*
+*
+*
+*
+*
+*
+sub and sup affecting line-height in all browsers.==========================================================================
h1 {
font-size: 2em;
@@ -182,10 +228,14 @@ sup {
sub {
bottom: -0.25em;
}
- Remove border when inside a element in IE 8/9.
- Correct overflow displayed oddly in IE 9.
+*
+a element in IE 8/9.*
+==========================================================================
img {
border: 0;
@@ -195,52 +245,120 @@ sub {
svg:not(:root) {
overflow: hidden;
}- Address margin not present in IE 8/9 and Safari 5.
+*
+==========================================================================
figure {
margin: 0;
}- Define consistent border, margin, and padding.
-
- 1. Correct color not being inherited in IE 8/9.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- 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.
-
- Address Firefox 4+ setting line-height on input using !important in
- * the UA stylesheet.
- 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.
- 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.
- Re-set default cursor for disabled elements.
-
- 1. Address box sizing set to content-box in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- 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).
- Remove inner padding and search cancel button in Safari 5 and Chrome - * on OS X.
-- Remove inner padding and border in Firefox 4+.
-- 1. Remove default vertical scrollbar in IE 8/9. - * 2. Improve readability and alignment in all browsers.
+*
+*
+color not being inherited in IE 8/9.*
+*
+line-height on input using !important in*
+text-transform inheritance for button and select.text-transform values.button style inheritance in Chrome, Safari 5+, and IE 8+.select style inheritance in Firefox 4+ and Opera.*
+audiovideo controls.input types in iOS.input and others.*
+*
+content-box in IE 8/9/10.*
+appearance set to searchfield in Safari 5 and Chrome.box-sizing set to border-box in Safari 5 and Chrome-moz to future-proof).*
+*
+*
+==========================================================================
fieldset {
border: 1px solid #c0c0c0;
@@ -324,8 +442,10 @@ textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}- Remove most spacing between table cells.
+*
+table {
border-collapse: collapse;
border-spacing: 0;
diff --git a/package.json b/package.json
index 35a7fb8..362eac5 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-sass": "~0.3.0",
- "grunt-contrib-csslint": "~0.1.1",
+ "grunt-contrib-csslint": "~0.1.2",
"grunt-styleguide": "~0.2.6",
"grunt-contrib-cssmin": "~0.5.0"
}