Skip to content

Commit

Permalink
* Merge and compile proposals from @dentalala in #7.
Browse files Browse the repository at this point in the history
* Clean code with autoprexier
  • Loading branch information
artpolikarpov committed Apr 11, 2014
1 parent 2f23509 commit a6f0f44
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 31 deletions.
14 changes: 12 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ module.exports = function(grunt) {
}
}
},
autoprefixer: {
main: {
options: {
browsers: ['last 2 version', 'ie 8', 'ie 7']
},
src: 'scrollyeah/scrollyeah.css',
dest: 'scrollyeah/scrollyeah.css'
}
},
cssmin: {
scrollyeah: {
src: '<%= concat.css.dest %>',
Expand All @@ -59,7 +68,7 @@ module.exports = function(grunt) {
watch: {
scrollyeah: {
files: 'src/*',
tasks: ['compass', 'concat']
tasks: 'compass autoprefixer concat'.split(' ')
}
}
});
Expand All @@ -71,8 +80,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');

// Default task.
grunt.registerTask('default', ['clean', 'compass', 'concat', 'uglify', 'cssmin']);
grunt.registerTask('default', 'clean compass autoprefixer concat uglify cssmin'.split(' '));

};
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"node": ">= 0.8.0"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-concat": "~0.1.2",
"grunt-contrib-uglify": "~0.1.1",
"grunt-contrib-watch": "~0.2.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-compass": "~0.2.0",
"grunt-contrib-cssmin": "~0.6.0",
"grunt": "~0.4.1"
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compass": "~0.7.2",
"grunt-contrib-cssmin": "~0.9.0",
"grunt": "~0.4.4",
"grunt-autoprefixer": "^0.7.2"
}
}
21 changes: 7 additions & 14 deletions scrollyeah/scrollyeah.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/*! Scrollyeah - v0.3.1 - 2013-08-23
/*! Scrollyeah - v0.3.1 - 2014-04-11
* https://github.com/artpolikarpov/scrollyeah
* Copyright (c) 2013 Artem Polikarpov; Licensed MIT */
* Copyright (c) 2014 Artem Polikarpov; Licensed MIT */
.scrollyeah {
position: relative;
overflow: hidden;
cursor: default;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
*zoom: 1;
}

Expand All @@ -24,15 +29,13 @@
.scrollyeah_active .scrollyeah__shaft {
cursor: move;
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
*cursor: move !important;
}
.scrollyeah_active .scrollyeah__shaft_grabbing, .scrollyeah_active .scrollyeah__shaft_grabbing * {
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: -o-grabbing;
cursor: -ms-grabbing;
cursor: grabbing;
Expand All @@ -47,16 +50,10 @@
width: 10px;
height: auto;
-webkit-transition-property: left, right;
-moz-transition-property: left, right;
-o-transition-property: left, right;
transition-property: left, right;
-webkit-transition-duration: 333ms, 333ms;
-moz-transition-duration: 333ms, 333ms;
-o-transition-duration: 333ms, 333ms;
transition-duration: 333ms, 333ms;
-webkit-transition-timing-function: cubic-bezier(0.1, 0, 0.25, 1), cubic-bezier(0.1, 0, 0.25, 1);
-moz-transition-timing-function: cubic-bezier(0.1, 0, 0.25, 1), cubic-bezier(0.1, 0, 0.25, 1);
-o-transition-timing-function: cubic-bezier(0.1, 0, 0.25, 1), cubic-bezier(0.1, 0, 0.25, 1);
transition-timing-function: cubic-bezier(0.1, 0, 0.25, 1), cubic-bezier(0.1, 0, 0.25, 1);
z-index: 10;
*display: none !important;
Expand All @@ -67,17 +64,13 @@
.scrollyeah__shadow_prev {
left: -10px;
background-image: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -webkit-radial-gradient(0 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-image: -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -moz-radial-gradient(0 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-image: -o-linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -o-radial-gradient(0 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), radial-gradient(0 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-position: 0 0, 0 0;
}

.scrollyeah__shadow_next {
right: -10px;
background-image: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -webkit-radial-gradient(100% 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-image: -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -moz-radial-gradient(100% 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-image: -o-linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -o-radial-gradient(100% 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), radial-gradient(100% 50%, farthest-side, rgba(0, 0, 0, 0.5), transparent);
background-position: 100% 0, 100% 0;
}
Expand Down
4 changes: 2 additions & 2 deletions scrollyeah/scrollyeah.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Scrollyeah - v0.3.1 - 2013-08-23
/*! Scrollyeah - v0.3.1 - 2014-04-11
* https://github.com/artpolikarpov/scrollyeah
* Copyright (c) 2013 Artem Polikarpov; Licensed MIT */
* Copyright (c) 2014 Artem Polikarpov; Licensed MIT */
(function($){
/*!
* Bez v1.0.10-g5ae0136
Expand Down
4 changes: 2 additions & 2 deletions scrollyeah/scrollyeah.min.css

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

Loading

0 comments on commit a6f0f44

Please sign in to comment.