Skip to content

Commit 07c553f

Browse files
committed
Add csslint
1 parent c4d01b3 commit 07c553f

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

.csslintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"adjoining-classes": false,
3+
"box-model": false,
4+
"box-sizing": false,
5+
"floats": false,
6+
"font-sizes": false,
7+
"important": false,
8+
"known-properties": false,
9+
"overqualified-elements": false,
10+
"qualified-headings": false,
11+
"regex-selectors": false,
12+
"unique-headings": false,
13+
"universal-selector": false,
14+
"unqualified-attributes": false
15+
}

gulpfile.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
/* jshint node:true */
33
'use strict';
44

5+
var csslint = require('gulp-csslint');
56
var gulp = require('gulp');
67
var jscs = require('gulp-jscs');
78
var jshint = require('gulp-jshint');
8-
var Server = require('karma').Server;
99
var karmaConfig = __dirname + '/karma.conf.js';
1010
var lodash = require('lodash');
1111
var paths = require('./paths');
1212
var plato = require('plato');
13+
var Server = require('karma').Server;
1314

1415
gulp.task('complexity', function (done) {
1516

@@ -20,6 +21,14 @@ gulp.task('complexity', function (done) {
2021
plato.inspect(paths.lint, 'complexity', {title: 'prerender', recurse: true}, callback);
2122
});
2223

24+
25+
gulp.task('csslint', function () {
26+
return gulp.src(paths.css)
27+
.pipe(csslint())
28+
.pipe(csslint.reporter())
29+
.pipe(csslint.failReporter());
30+
});
31+
2332
var testConfig = function (options) {
2433
var travisOptions = process.env.TRAVIS &&
2534
{
@@ -45,7 +54,7 @@ gulp.task('test', function (done) {
4554
});
4655

4756
gulp.task('tdd', function (done) {
48-
gulp.watch(paths.all, ['lint']);
57+
gulp.watch(paths.all, ['jscs', 'lint', 'csslint']);
4958

5059
var config = testConfig(
5160
{
@@ -75,4 +84,4 @@ gulp.task('jscs', function () {
7584
.pipe(jscs('.jscsrc'));
7685
});
7786

78-
gulp.task('default', ['jscs', 'lint', 'complexity', 'test']);
87+
gulp.task('default', ['jscs', 'lint', 'csslint', 'complexity', 'test']);

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
},
1616
"devDependencies": {
1717
"bower": "latest",
18+
"csslint": "^0.10.0",
1819
"grunt": "^0.4.4",
1920
"grunt-bump": "^0.3.2",
2021
"gulp": "^3.8.11",
22+
"gulp-csslint": "^0.2.0",
2123
"gulp-jscs": "^2.0.0",
2224
"gulp-jshint": "^1.11.2",
2325
"jshint": "^2.6.0",

paths.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ var bower = [
88
'bower_components/angular/angular.js',
99
'bower_components/angular-mocks/angular-mocks.js'
1010
];
11-
var bumpFiles = ['package.json', 'bower.json', 'README.md', 'src/js/*.js', 'src/css/*.css'];
12-
var miscFiles = ['GruntFile.js', 'gulpfile.js', 'karma.conf.js', 'paths.js'];
11+
var bumpFiles = ['package.json', 'bower.json', 'README.md', 'src/js/*.js'];
12+
var cssFiles = ['src/css/*.css'];
1313
var demoFiles = ['demo/**/*.js'];
14+
var miscFiles = ['GruntFile.js', 'gulpfile.js', 'karma.conf.js', 'paths.js'];
1415
var sourceFiles = ['src/**/*.js'];
1516
var testFiles = ['test/**/*.spec.js'];
1617

1718
module.exports = {
1819
all: bower.concat(sourceFiles).concat(testFiles).concat(demoFiles),
1920
app: sourceFiles,
20-
bump: bumpFiles,
21+
bump: bumpFiles.concat(cssFiles),
22+
css: cssFiles,
2123
lint: miscFiles.concat(sourceFiles).concat(testFiles).concat(miscFiles),
2224
src: sourceFiles,
2325
test: testFiles

src/css/datetimepicker.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
border-left: 7px solid transparent;
3434
border-right: 7px solid transparent;
3535
border-bottom: 7px solid #ccc;
36+
border-bottom-color: rgb(0, 0, 0);
3637
border-bottom-color: rgba(0, 0, 0, 0.2);
3738
position: absolute;
3839
}
@@ -52,6 +53,7 @@
5253
border-left: 7px solid transparent;
5354
border-right: 7px solid transparent;
5455
border-top: 7px solid #ccc;
56+
border-top-color: rgb(0, 0, 0);
5557
border-top-color: rgba(0, 0, 0, 0.2);
5658
border-bottom: 0;
5759
}
@@ -202,7 +204,6 @@
202204
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
203205
border-color: #fdf59a #fdf59a #fbed50;
204206
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
205-
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
206207
}
207208

208209
.datetimepicker table tr td.today:hover,
@@ -254,7 +255,6 @@
254255
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
255256
border-color: #0044cc #0044cc #002a80;
256257
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
257-
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
258258
color: #fff;
259259
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
260260
}
@@ -332,7 +332,6 @@
332332
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
333333
border-color: #0044cc #0044cc #002a80;
334334
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
335-
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
336335
color: #fff;
337336
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
338337
}

0 commit comments

Comments
 (0)