Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Checkbox and radio button style and markup work done in advance of de…
Browse files Browse the repository at this point in the history
…precating the custom controls javascript. New grunt servedev task added to Gruntfile.js for LESS dev work. New markup examples added.

Checkbox and radio button style and markup work done in advance of deprecating the custom controls javascript. New grunt servedev task added to Gruntfile.js for LESS dev work. New markup examples added.
  • Loading branch information
Chris Corwin authored and Chris Corwin committed Mar 4, 2015
1 parent 50f8a7f commit 1965055
Show file tree
Hide file tree
Showing 17 changed files with 2,645 additions and 1,321 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ less/fuelux-no-namespace.less
dev/dev.html

# screenshots
page-at-timeout-*
page-at-timeout-*

# dev css and maps
dist/css/fuelux-dev.css
dist/css/fuelux-dev.css.map
dist/css/fuelux-fuelux-no-namespace.css.map

53 changes: 49 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,30 @@ module.exports = function (grunt) {
}
},
less: {
pre: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>-fuelux-no-namespace.css.map',
sourceMapFilename: 'dist/css/<%= pkg.name %>-fuelux-no-namespace.css.map'
},
files: {
'less/fuelux-no-namespace.less': 'less/fuelux.less'
}
},
dev: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>-dev.css.map',
sourceMapFilename: 'dist/css/<%= pkg.name %>-dev.css.map'
},
files: {
'dist/css/fuelux-dev.css': 'less/fuelux.less'
}
},
dist: {
options: {
strictMath: true,
Expand All @@ -283,10 +307,10 @@ module.exports = function (grunt) {
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
},
files: {
'less/fuelux-no-namespace.less': 'less/fuelux.less',
'dist/css/fuelux.css': 'less/fuelux-namespace.less'
}
},

minify: {
options: {
cleancss: true,
Expand All @@ -296,7 +320,8 @@ module.exports = function (grunt) {
files: {
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css'
}
},
}

},
prompt: {
bump: {
Expand Down Expand Up @@ -430,6 +455,7 @@ module.exports = function (grunt) {
},
stoponerror: true,
relaxerror: [//ignores these errors
'Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.',
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
'Element head is missing a required instance of child element title.'
],
Expand Down Expand Up @@ -459,12 +485,19 @@ module.exports = function (grunt) {
},
//only watch and dist less, useful when doing LESS/CSS work
less: {
files: ['fonts/**', 'less/**'],
files: ['fonts/**', 'less/**', '!less/fuelux-no-namespace.less'],
options: {
livereload: isLivereloadEnabled
},
tasks: ['distcss']
},
cssdev: {
files: ['Gruntfile.js', 'less/**', 'index.html', 'index-dev.html', 'dev.html', '!less/fuelux-no-namespace.less'],
options: {
livereload: isLivereloadEnabled
},
tasks: ['distcssdev']
},
//watch things that need compiled, useful for debugging/developing against dist
dist: {
files: ['fonts/**', 'js/**', 'less/**'],
Expand Down Expand Up @@ -499,6 +532,10 @@ module.exports = function (grunt) {
// CSS distribution task
grunt.registerTask('distcss', 'Compile LESS into CSS', ['less', 'usebanner', 'delete-temp-less-file']);

// CSS distribution task (dev)
grunt.registerTask('distcssdev', 'Compile LESS into the dev CSS', ['less:pre', 'less:dev', 'delete-temp-less-file']);


// Temporary LESS file deletion task
grunt.registerTask('delete-temp-less-file', 'Delete the temporary LESS file created during the build process', function () {
var options = {
Expand Down Expand Up @@ -591,7 +628,7 @@ module.exports = function (grunt) {
grunt.task.run(tasks);
});

// default serve task that runs tests and builds and tests dist by default (~20s).
// serve task that runs tests and builds and tests dist by default (~20s).
grunt.registerTask('serveslow', 'Serve files. Run all tests. Does not build. (~20s)', function () {
var tasks = ['connect:server', 'test', 'watch:source'];
grunt.task.run(tasks);
Expand Down Expand Up @@ -627,6 +664,14 @@ module.exports = function (grunt) {
grunt.task.run(['connect:server', 'watch:less']);
});

// Complies the less files into the -dev versions, does not overwrite the main css files.
grunt.registerTask('servedev', 'Serve the files with no "dist" build or tests. Optional --no-less to also disable compiling less into css.', function() {
if (! grunt.option('no-less') ) {
grunt.task.run(['distcssdev']);
}
grunt.task.run(['connect:server', 'watch:cssdev']);
});

// same as `grunt serve` but tests default to being off
grunt.registerTask('servedist', 'Compile and serve everything, pass --test to run tests. (~7s)', function () {
grunt.task.run(['dist']);
Expand Down
10 changes: 9 additions & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
}

#mainWrapper {
padding-bottom: 40px;
padding-bottom: 1.5rem;
}

#mainWrapper section {
padding-bottom: 1.5rem;
}

#mainWrapper section section {
padding-bottom: 1.5rem;
}

#myInfiniteScroll1, #myInfiniteScroll2 {
Expand Down
Loading

0 comments on commit 1965055

Please sign in to comment.