Priorité des breakpoints dans les classes utilitaires #338

Priorité des breakpoints dans les classes utilitaires #338
This commit is contained in:
Raphaël Goetter 2021-03-05 20:17:01 +01:00
parent 19362135c4
commit d125d2a407
7 changed files with 5643 additions and 16 deletions

View File

@ -36,9 +36,9 @@ Principe de briques modulaires :
@import "abstracts/mixins-sass"; @import "abstracts/mixins-sass";
// UTILITY CLASSES // UTILITY CLASSES
// @import "utils/utils-global"; @import "utils/utils-global";
// @import "utils/utils-spacers"; @import "utils/utils-spacers";
// @import "utils/grillade"; @import "utils/grillade";
// COMPONENTS (add them only if you need) // COMPONENTS (add them only if you need)
// @import "components/button"; // @import "components/button";

View File

@ -1,5 +1,6 @@
# Changelog # Changelog
- 5 mars : les classes utilitaires font à présent partie du Core
- 26 novembre 2020 : Documentation + V1.0.0 - 26 novembre 2020 : Documentation + V1.0.0
- 22 octobre 2020 : grosse remise à jour. V0.9.0 - 22 octobre 2020 : grosse remise à jour. V0.9.0
- 12 octobre 2020 : début de refonte classes utilitaires - 12 octobre 2020 : début de refonte classes utilitaires

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "knacss", "name": "knacss",
"version": "v8.0.2", "version": "8.0.3",
"homepage": "http://www.knacss.com/", "homepage": "http://www.knacss.com/",
"bugs": "https://github.com/alsacreations/KNACSS/issues", "bugs": "https://github.com/alsacreations/KNACSS/issues",
"author": "Raphaël GOETTER, Alsacreations (http://www.alsacreations.fr)", "author": "Raphaël GOETTER, Alsacreations (http://www.alsacreations.fr)",

View File

@ -1,7 +1,7 @@
/*! /*!
* KNACSS Reborn: Just keep it simple! * KNACSS Reborn: Just keep it simple!
* @author: Alsacreations * @author: Alsacreations
* v1.0.0 2020/11 * v8.0.3 2021/05
* Licence WTFPL http://www.wtfpl.net/ * Licence WTFPL http://www.wtfpl.net/
*/ */
@ -18,9 +18,9 @@
@import "base/layout"; @import "base/layout";
// UTILITY CLASSES // UTILITY CLASSES
// @import "utils/utils-global"; @import "utils/utils-global";
// @import "utils/utils-spacers"; @import "utils/utils-spacers";
// @import "utils/grillade"; @import "utils/grillade";
// COMPONENTS (add them only if you need) // COMPONENTS (add them only if you need)
// @import "components/button"; // @import "components/button";

View File

@ -6,16 +6,17 @@
.#{$class} { .#{$class} {
#{$prop}: #{$value}; #{$prop}: #{$value};
} }
}
// loop for each breakpoint
// loop for each breakpoint
@each $class, $prop, $value in $utils {
@each $bp, $bpv in $breakpoints { @each $bp, $bpv in $breakpoints {
@media (min-width: #{$bpv}) { @media (min-width: #{$bpv}) {
.#{$bp}\:#{$class} { .#{$bp}\:#{$class} {
#{$prop}: #{$value}; #{$prop}: #{$value};
} }
} }
} }
} }
// multi-properties utils // multi-properties utils
@ -37,7 +38,7 @@
// loop for each breakpoint // loop for each breakpoint
@each $bp, $bpv in $breakpoints { @each $bp, $bpv in $breakpoints {
@media (min-width: #{$bpv}) { @media (min-width: #{$bpv}) {
.#{$bp}\:visually-hidden { .#{$bp}\:visually-hidden {
position: absolute !important; position: absolute !important;
border: 0 !important; border: 0 !important;