Ajout de @media (prefers-reduced-motion: reduce)

This commit is contained in:
Raphael Goetter 2019-01-30 21:54:32 +01:00
parent 32ad91f29a
commit 4782f69f44
7 changed files with 24 additions and 18 deletions

View file

@ -1,6 +1,6 @@
{
"name": "KNACSS",
"version": "7.1.1",
"version": "7.1.2",
"homepage": "http://www.knacss.com/",
"authors": [
"Raphaël GOETTER, Alsacreations"

View file

@ -1,3 +1,6 @@
# changelog v7.1.2 (30 janvier 2019)
- ajout de la règle `@media (prefers-reduced-motion: reduce)`
# changelog v7.1.1 (10 decembre 2018)
- patch correctif de gulpfile

View file

@ -385,6 +385,16 @@ template {
/* ----------------------------- */
/* ==Base (basic styles) */
/* ----------------------------- */
/* disable animations styles when reduced rotion is enabled */
@media (prefers-reduced-motion: reduce) {
* {
-webkit-animation: none !important;
animation: none !important;
-webkit-transition: none !important;
transition: none !important;
}
}
/* switching to border-box model for all elements */
html {
-webkit-box-sizing: border-box;

File diff suppressed because one or more lines are too long

View file

@ -45,21 +45,6 @@ var pluginsProd = [
cssnano()
];
// tâche CSS = compile vers knacss.css et knacss-unminified.css
// gulp.task('css', function () {
// return gulp.src('./sass/knacss.scss')
// .pipe(sass({
// outputStyle: 'expanded' // CSS non minifiée plus lisible ('}' à la ligne)
// }))
// .pipe(postcss(plugins))
// .pipe(rename('knacss-unminified.css'))
// .pipe(gulp.dest('./css/'))
// .pipe(rename('knacss.css'))
// //.pipe(postcss(cssnano()))
// .pipe(gulp.dest('./css/'));
// });
// tâche cssDev = compile vers knacss-unminified.css
gulp.task('cssDev', function () {
return gulp.src('./sass/knacss.scss')

View file

@ -2,6 +2,14 @@
/* ==Base (basic styles) */
/* ----------------------------- */
/* disable animations styles when reduced rotion is enabled */
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}
/* switching to border-box model for all elements */
html {
box-sizing: border-box;

View file

@ -1,5 +1,5 @@
/*!
* www.KNACSS.com v7.1.1 (december, 10 2018) @author: Alsacreations, Raphael Goetter
* www.KNACSS.com v7.1.2 (january, 30 2019) @author: Alsacreations, Raphael Goetter
* Licence WTFPL http://www.wtfpl.net/
*/