variable $utilities

This commit is contained in:
Raphael 2019-07-19 10:37:17 +02:00
parent 3182e3088f
commit 271ff3acd5
5 changed files with 28 additions and 20 deletions

View file

@ -5,6 +5,7 @@
- mise à jour du reset, suppression des reset vendors (reboot) - mise à jour du reset, suppression des reset vendors (reboot)
- support passé de IE10 à IE11 (browserlist) - support passé de IE10 à IE11 (browserlist)
- ajout d'une variable pour supporter ou non IE11 : `$ie: true !default;`. Activation de Grid Layout ou flexbox selon cette variable - ajout d'une variable pour supporter ou non IE11 : `$ie: true !default;`. Activation de Grid Layout ou flexbox selon cette variable
- ajout d'une variable pour supporter ou non les classes utilitaires : `$utilities: true !default;`.
- ajout d'une variable pour supporter ou non WordPress : `$wordpress: false !default;`. Activation de reset et styles WordPress selon cette variable - ajout d'une variable pour supporter ou non WordPress : `$wordpress: false !default;`. Activation de reset et styles WordPress selon cette variable
- corrections typo - corrections typo
- renommage de dossiers à la "7-1 pattern": `_config` > `abstracts`, `_library` > `base`, et du fichier `_base.scss` en `_reset.scss` - renommage de dossiers à la "7-1 pattern": `_config` > `abstracts`, `_library` > `base`, et du fichier `_base.scss` en `_reset.scss`

View file

@ -73,7 +73,10 @@ $weight-medium : 500 !default;
$weight-bold : 700 !default; $weight-bold : 700 !default;
// Activate hyphenation on small screens // Activate hyphenation on small screens
$hyphens: false !default; $hyphens: true !default;
// Activate Utility classes
$utilities: true !default;
// Activate WordPress reset and styles // Activate WordPress reset and styles
$wordpress: false !default; $wordpress: false !default;

View file

@ -473,6 +473,23 @@ figure {
margin-right: 0; margin-right: 0;
} }
@if variable-exists(hyphens) and $hyphens==true {
@media (max-width: ($small - 1)) {
body,
div,
textarea,
table,
td,
th,
code,
pre,
samp {
word-wrap: break-word;
overflow-wrap: break-word;
}
}
}
@if variable-exists(ie) and $ie==true { @if variable-exists(ie) and $ie==true {

View file

@ -74,23 +74,6 @@
text-align: center; text-align: center;
} }
@if variable-exists(hyphens) and $hyphens==true {
@media (max-width: ($small - 1)) {
div,
textarea,
table,
td,
th,
code,
pre,
samp {
word-wrap: break-word;
overflow-wrap: break-word;
hyphens: auto;
}
}
}
/* blocks that need to be placed under floats */ /* blocks that need to be placed under floats */
.clear, .clear,

View file

@ -8,7 +8,7 @@
/* ----------------------------- */ /* ----------------------------- */
/* /*
1- Reboot (basic reset) 1- Abstracts (variables and mixins)
2- Base : 2- Base :
- Reset - Reset
- Print - Print
@ -40,9 +40,13 @@
@import "base/reset"; // basic styles @import "base/reset"; // basic styles
@import "base/print"; // print quick reset @import "base/print"; // print quick reset
@import "base/layout"; // alignment, modules, positionning @import "base/layout"; // alignment, modules, positionning
@import "base/utilities"; // width and spacer helpers
@import "base/responsive"; // Responsive Web Design helpers @import "base/responsive"; // Responsive Web Design helpers
// Utilities (loaded if $utilities variable is true).
@if variable-exists(utilities) and $utilities==true {
@import "base/utilities"; // width and spacer helpers
}
// WordPress reset and basics (loaded if $wordpress variable is true). // WordPress reset and basics (loaded if $wordpress variable is true).
@if variable-exists(wordpress) and $wordpress==true { @if variable-exists(wordpress) and $wordpress==true {
@import "base/wordpress"; // WordPress reset and basic styles @import "base/wordpress"; // WordPress reset and basic styles