1
mirror of https://github.com/pure-css/pure synced 2024-12-21 02:25:54 +01:00

Merge pull request #65 from ericf/csslint

Add CSSLint and `grunt test` task to lint CSS in the src/ dir
This commit is contained in:
Eric Ferraiuolo 2013-06-05 13:39:38 -07:00
commit 6a2a050fbd
13 changed files with 62 additions and 17 deletions

5
.csslintrc Normal file
View File

@ -0,0 +1,5 @@
{
"box-sizing" : false,
"display-property-grouping": false,
"star-property-hack" : false
}

View File

@ -135,6 +135,22 @@ grunt.initConfig({
}
},
// -- CSSLint Config -------------------------------------------------------
csslint: {
options: {
csslintrc: '.csslintrc'
},
src: {
src: [
'src/**/css/*.css',
'!src/base/css/*',
'!src/forms/css/forms-core.css'
]
}
},
// -- CSSMin Config --------------------------------------------------------
cssmin: {
@ -219,6 +235,7 @@ grunt.initConfig({
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-compress');
@ -237,7 +254,12 @@ grunt.registerTask('import', [
'import-normalize'
]);
grunt.registerTask('test', [
'csslint'
]);
grunt.registerTask('release', [
'test',
'default',
'clean:release',
'compress:release'

View File

@ -2,6 +2,7 @@
"name": "pure",
"version": "0.1.1-pre",
"private": true,
"repository": "git://github.com/yui/pure.git",
"devDependencies": {
"grunt": "~0.4.1",
"parserlib": "~0.2.2",
@ -10,6 +11,7 @@
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-compress": "~0.5.0",
"bower": "~0.9.2"
"bower": "~0.9.2",
"grunt-contrib-csslint": "~0.1.2"
}
}

View File

@ -11,6 +11,7 @@
-webkit-user-drag: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

View File

@ -1,3 +1,5 @@
/*csslint unqualified-attributes:false*/
.pure-button {
font-size: 100%;
*font-size: 90%; /*IE 6/7 - To reduce IE's oversized button text*/

View File

@ -12,8 +12,8 @@
-ms-transition: 0.3s linear border;
-o-transition: 0.3s linear border;
transition: 0.3s linear border;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
@ -90,9 +90,9 @@
border-bottom: 1px solid #e5e5e5;
}
.pure-form.pure-form-stacked input[type='text'],
.pure-form.pure-form-stacked select,
.pure-form.pure-form-stacked label {
.pure-form-stacked input[type='text'],
.pure-form-stacked select,
.pure-form-stacked label {
display: block;
}

View File

@ -16,7 +16,8 @@
.pure-u {
display: inline-block;
zoom: 1; *display: inline; /* IE < 8: fake inline-block */
*display: inline; /* IE < 8: fake inline-block */
zoom: 1;
letter-spacing: normal;
word-spacing: normal;
vertical-align: top;

View File

@ -1,3 +1,5 @@
/*csslint regex-selectors:false, unqualified-attributes:false*/
.pure-g-r {
letter-spacing: -0.31em;
*letter-spacing: normal;

View File

@ -27,7 +27,8 @@
.pure-u-19-24,
.pure-u-23-24 {
display: inline-block;
zoom: 1; *display: inline; /* IE < 8: fake inline-block */
*display: inline; /* IE < 8: fake inline-block */
zoom: 1;
letter-spacing: normal;
word-spacing: normal;
vertical-align: top;

View File

@ -1,3 +1,6 @@
/*csslint adjoining-classes:false*/
/*TODO: Remove this lint rule override after a refactor of this code.*/
.pure-menu ul {
position: absolute;
visibility: hidden;
@ -39,15 +42,15 @@
.pure-menu.pure-menu-horizontal > .pure-menu-heading {
display: inline-block;
margin: 0;
zoom: 1;
*display: inline;
zoom: 1;
margin: 0;
vertical-align: middle;
}
.pure-menu.pure-menu-horizontal > ul {
display: inline-block;
zoom: 1;
*display: inline;
zoom: 1;
vertical-align: middle;
height: 2.4em;
}
@ -91,8 +94,8 @@
/* Initial menus should be inline-block so that they are horizontal */
.pure-menu-horizontal li {
display: inline-block;
zoom: 1;
*display: inline;
zoom: 1;
vertical-align: middle;
}

View File

@ -1,3 +1,6 @@
/*csslint box-model:false*/
/*TODO: Remove this lint rule override after a refactor of this code.*/
.pure-paginator {
list-style: none;
margin: 0;
@ -6,8 +9,7 @@
.pure-paginator li {
display: inline-block;
*display: inline;
/* IE 7 inline-block hack */
*zoom: 1;
zoom: 1;
margin: 0 -0.35em 0 0;
}
.pure-paginator .pure-button {
@ -21,7 +23,7 @@
}
.pure-paginator .prev, .pure-paginator .next {
color: #C0C1C3;
text-shadow: 0px -1px 0px rgba(0,0,0, 0.45);
text-shadow: 0 -1px 0 rgba(0,0,0, 0.45);
}
.pure-paginator .prev {
border-radius: 2px 0 0 2px;

View File

@ -8,7 +8,7 @@
.pure-menu-children li {
display: block;
border-bottom:1px solid block;
border-bottom: 1px solid black;
}
}

View File

@ -1,3 +1,6 @@
/*csslint adjoining-classes:false*/
/*TODO: Remove this lint rule override after a refactor of this code.*/
/* MAIN MENU STYLING */
.pure-menu.pure-menu-open,
@ -7,7 +10,8 @@
}
/* remove borders for horizontal menus */
.pure-menu.pure-menu-horizontal, .pure-menu.pure-menu-horizontal .pure-menu-heading {
.pure-menu.pure-menu-horizontal,
.pure-menu.pure-menu-horizontal .pure-menu-heading {
border: none;
}