ajout de @supports (display: grid) dans le mixin de grille

This commit is contained in:
Raphael Goetter 2019-01-30 22:06:31 +01:00
parent 4782f69f44
commit 5e90fdb583
2 changed files with 7 additions and 4 deletions

View file

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

View file

@ -15,11 +15,13 @@
// arguments are : columns number, gutter, min-breakpoint // arguments are : columns number, gutter, min-breakpoint
// ex. .ingrid { @include grid(4, 1rem, 640px); } // ex. .ingrid { @include grid(4, 1rem, 640px); }
@mixin grid($number:1, $gutter:0, $breakpoint:0) { @mixin grid($number:1, $gutter:0, $breakpoint:0) {
@supports (display: grid) {
@media (min-width: $breakpoint) { @media (min-width: $breakpoint) {
display: grid; display: grid;
grid-template-columns: repeat($number, 1fr); grid-template-columns: repeat($number, 1fr);
grid-gap: $gutter; grid-gap: $gutter;
} }
}
} }
// Additionnal "utility" breakpoints aliases // Additionnal "utility" breakpoints aliases