Skip to content

Commit

Permalink
Changing css workflow from grunt-autoprefixer to grunt-postcss::requi…
Browse files Browse the repository at this point in the history
…re(autoprefixer,nanocss)
  • Loading branch information
oneTea committed Dec 2, 2015
1 parent 3a0b8b5 commit 58fe7b7
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 474 deletions.
38 changes: 13 additions & 25 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,19 @@ module.exports = function(grunt) {
}
},


/* AUTOPREFIXER
/* POSTCSS - autoprefixer & cssnano
================================================================= */
autoprefixer: {
postcss: {
options: {
browsers: ['last 2 version']
processors: [
require('autoprefixer')({browsers: 'last 2 versions'}),
require('cssnano')()
]
},
css: {
files: {
"dist/gridlex.css": "dist/gridlex.css",
"dist/demo/demo.css": "dist/demo/demo.css"
}
}
},


/* CSS MINIFY
================================================================= */
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files:{
"dist/gridlex.min.css": "dist/gridlex.css"
"dist/gridlex.min.css": "dist/gridlex.css",
"dist/demo/demo.min.css": "dist/demo/demo.css"
}
}
},
Expand All @@ -77,7 +64,8 @@ module.exports = function(grunt) {
//, livereload: true
},
less: {
files: 'src/**/*.less',
files: '**/*.less',
//files: '**/*.scss',
tasks: ['compile']
}
}
Expand All @@ -87,8 +75,8 @@ module.exports = function(grunt) {

/* GRUNT TASKS
================================================================= */
grunt.registerTask('default', ['mincss']);
grunt.registerTask('compile', ['less', 'autoprefixer', 'cssmin']);
//grunt.registerTask('compile', ['sass', 'autoprefixer', 'cssmin']);
grunt.registerTask('default', ['compile']);
grunt.registerTask('compile', ['less', 'postcss']);
//grunt.registerTask('compile', ['sass', 'postcss']); // uncomment for Sass compilation

};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The concept is simple: you need to wrap your `.col` in a `.grid`.

**I just wanna use it in my page!**

To use Gridlex out of the box, call the gridlex.css or gridlex.min.css file in your project :
To use Gridlex out of the box, call the gridlex.min.css file in your project :
```html
<link rel="stylesheet" href="gridlex.min.css">
```
Expand Down
2 changes: 1 addition & 1 deletion dist/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="demo/normalize.css">
<link rel="stylesheet" href="gridlex.min.css">
<link rel="stylesheet" href="demo/demo.css">
<link rel="stylesheet" href="demo/demo.min.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel='stylesheet' type='text/css'>
<link rel="stylesheet prefetch" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="apple-touch-icon" sizes="57x57" href="fav/apple-touch-icon-57x57.png">
Expand Down
20 changes: 4 additions & 16 deletions dist/demo/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,12 @@
right: 0;
z-index: -1;
bottom: 0;
-webkit-transform: skewY(4deg);
transform: skewY(4deg);
-webkit-transform-origin: 0%;
transform-origin: 0%;
transform: skewY(4deg);
transform-origin: 0%;
}
.header h1 {
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
align-items: center;
font-size: 3rem;
border-bottom: 10px solid #fff;
border-top: 10px solid #fff;
Expand All @@ -64,8 +58,6 @@
.header h1:before {
content: '';
position: relative;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
vertical-align: middle;
margin-right: 5px;
Expand All @@ -91,14 +83,10 @@ section {
}
section:before {
content: '';
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
border: 1px solid steelblue;
width: 100%;
-webkit-align-items: stretch;
-ms-flex-align: stretch;
align-items: stretch;
align-items: stretch;
position: absolute;
bottom: 20px;
}
Expand Down
1 change: 1 addition & 0 deletions dist/demo/demo.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 58fe7b7

Please sign in to comment.