see changelog

This commit is contained in:
Raphael Goetter 2016-05-16 15:45:14 +02:00
parent 2022f8bd79
commit 7c9cf52761
38 changed files with 793 additions and 5079 deletions

View File

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

View File

@ -1,3 +1,15 @@
# changelog v5.0.0 (16 mai 2016)
- suppression du support IE8-IE9 (à partir de la version KNACSS 5.0, seul IE10 et supérieurs sont pris en charge)
- suppression du support LESS (à partir de la version KNACSS 5.0, seul le préprocesseur Sass est encore pris en charge pour des raisons de maintenabilité)
- mise à jour vers Normalize 4.1.1 : https://github.com/necolas/normalize.css/blob/4.1.1/CHANGELOG.md
- restructuration / renommage des fichiers avec préfixes `_config-`, `_layout-`, `_library-`, `_object-`, `_override-`
- ajout de la library include-media (http://include-media.com/) pour faciliter la gestion des media queries
- adaptation des variables de breakpoint pour les rendre compatibles avec include-media
- adaptation des fichiers gulpfile, package.json et bower.json
- grille "grillade" à présent en mobile first (par défaut 1 colonne sur "tiny", 2 colonnes sur "small", valeurs modifiables)
- mise à jour de la documentation
- ajout de commentaires dans les grilles
# changelog v4.4.5 (1er avril 2016)
- mise à jour vers Normalize 4 : https://github.com/necolas/normalize.css/blob/4.0.0/CHANGELOG.md

View File

@ -1,252 +0,0 @@
/*!
* www.KNACSS.com V4.4.4 (23 janvier 2016) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
*/
// Config file and project variables
// font sizes
@base-font-size : 1.4rem; // ex. 1.4rem would be "14px" equivalent
@line-height : 1.5; // equiv line-height 1.5
@h1-size : 3.2rem; // equiv "32px"
@h2-size : 2.8rem; // equiv "28px"
@h3-size : 2.4rem; // equiv "24px"
@h4-size : 2.0rem; // equiv "20px"
@h5-size : 1.8rem; // equiv "18px"
@h6-size : 1.6rem; // equiv "16px"
// font stacks
@font-stack-common : sans-serif; // common font
@font-stack-headings : sans-serif; // headings font
@font-stack-monospace : consolas, courier, monospace; // monospace font
// font colors
@base-color : #000; // text color on body and content
@primary-color : #000; // text color on primary elements
@secondary-color : #000; // text color on secondary elements
@headings-color : #000; // text color on headings
@headings-1-color : #000; // text color on headings level 1
@headings-2-color : #000; // text color on headings level 2
@headings-3-color : #000; // text color on headings level 3
@base-color-link : #333; // base links color
@base-color-link-hover : #000; // base hovered/focused links color
// backgrounds
@base-background : #fff; // body background color
@primary-background : #fff; // primary elements background color
@secondary-background : #fff; // secondary elements background color
// spacings (choose unit you prefer)
@tiny-value : .5rem; // tiny value for margins / paddings
@tiny-plus-value : .7rem; // tiny+ value for margins / paddings
@small-value : 1rem; // small value for margins / paddings
@small-plus-value : 1.5rem; // small+ value for margins / paddings
@medium-value : 2rem; // medium value for margins / paddings
@medium-plus-value : 3rem; // medium+ value for margins / paddings
@large-value : 4rem; // large value for margins / paddings
@large-plus-value : 6rem; // large value for margins / paddings
@extra-large-value : 8rem; // extra large value for margins / paddings
@extra-large-plus-value : 12rem; // extra large value for margins / paddings
@ultra-large-value : 16rem; // ultra large value for margins / paddings
@ultra-large-plus-value : 20rem; // ultra large value for margins / paddings
// breakpoints (choose unit you prefer)
@tiny-screen : 320px; // tiny screens media query (less-equal than 320px)
@tiny-plus-screen : 480px; // screens between 321px and 480px
@small-screen : 640px; // screens between 481px and 640px
@small-plus-screen : 768px; // screens between 641px and 768px
@medium-screen : 960px; // screens between 769px and 960px
@medium-plus-screen : 1024px; // screens between 961px and 1024px
@large-screen : 1280px; // screens between 1025px and 1280px
@large-plus-screen : 1440px; // screens between 1281px and 1440px
@extra-large-screen : 1600px; // screens between 1441px and 1600px
@ultra-large-screen : 1920px; // ultra large screens
// grids variables (choose unit you prefer)
@gutter: 2rem; // gutter value for grid layouts. Unit can be: %, px, em, rem
@number: 4; // number of equal columns
@left: 2; // left side of uneven columns
@right: 1; // right side of uneven columns
//namespace (default : empty)
@kna-namespace:~"";
/* ---------------------------------- */
/* ==Grillade */
/* ---------------------------------- */
// Tuto : http://www.alsacreations.com/tuto/lire/1659-une-grille-responsive-avec-flexbox-et-LESS.html
// Demo : http://codepen.io/raphaelgoetter/pen/zxBMLW
// Usage in vanilla CSS:
// - <div class="grid-4"> for an equal fourth columns grid container
// - <div class="grid-2-1"> for an uneven columns grid container
// Usage with preprocessors : if you're using LESS, you can config grids variables :
// n = number of columns (default = 4)
// example : .grid-perso { .grid(12); }
// ... or uneven grids :
// left = left ratio column (default = 2) / right = right ratio column (default = 1)
// example : .grid-perso { .uneven-grid(2, 1); }
/* grid container */
[class*="@{kna-namespace}grid-"] {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-left: -@gutter;
/* inline-block fallback for IE9 generation */
letter-spacing: -0.31em;
}
/* grid childs */
[class*="@{kna-namespace}grid-"] > * {
box-sizing: border-box;
flex: 0 0 auto;
width: ~'calc(100% * 1 / @{number} - @{gutter} - .01px)';
min-width: 0;
margin-left: @gutter;
/* inline-block fallback for IE9 generation */
display: inline-block;
vertical-align: top;
letter-spacing: normal;
}
// LESS mixins for *equal* columns grid container
// example : .grid-perso { .grid(12); }
.grid(@number:@number, @gutter:@gutter) {
& > * {
width: ~'calc(100% * 1 / @{number} - @{gutter} - .01px)';
}
& > .@{kna-namespace}flex-item-double {
width: ~'calc(100% * 2 / @{number} - @{gutter} - .01px)';
}
}
// Examples : will be compiled in CSS
[class*="@{kna-namespace}grid-2"] {
.grid(2);
}
[class*="@{kna-namespace}grid-3"] {
.grid(3);
}
[class*="@{kna-namespace}grid-4"] {
.grid(4);
}
[class*="@{kna-namespace}grid-5"] {
.grid(5);
}
[class*="@{kna-namespace}grid-6"] {
.grid(6);
}
[class*="@{kna-namespace}grid-7"] {
.grid(7);
}
[class*="@{kna-namespace}grid-8"] {
.grid(8);
}
[class*="@{kna-namespace}grid-10"] {
.grid(10);
}
[class*="@{kna-namespace}grid-12"] {
.grid(12);
}
/* Responsive grid */
// "small-2" = 2 columns when small screen
// example : .grid-4-small-2 will be 4 then 2 columns
@media (max-width: @small-screen) {
[class*="-small-4"] > * {
width: ~'calc(100% * 1 / 4 - @{gutter} - .01px)';
}
[class*="-small-4"] > .flex-item-double {
width: ~'calc(100% * 1 / 2 - @{gutter} - .01px)';
}
[class*="-small-3"] > * {
width: ~'calc(100% * 1 / 3 - @{gutter} - .01px)';
}
[class*="-small-3"] > .flex-item-double {
width: ~'calc(100% * 2 / 3 - @{gutter} - .01px)';
}
[class*="-small-2"] > * {
width: ~'calc(100% * 1 / 2 - @{gutter} - .01px)';
}
[class*="-small-2"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-small-1"] > * {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-small-1"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
}
// "tiny-1" = 1 column when tiny screen
// example : .grid-4-small-2-tiny-1 will be 4 then 2 columns then 1 column
@media (max-width: @tiny-screen) {
[class*="-tiny-2"] > * {
width: ~'calc(100% * 1 / 2 - @{gutter} - .01px)';
}
[class*="-tiny-2"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-tiny-1"] > * {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-tiny-1"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
}
// LESS mixins for *unequal* columns grid container
// example : .grid-perso { .uneven-grid(2, 1); }
.uneven-grid(@left:@left, @right:@right, @gutter:@gutter) {
& > *:nth-child(odd) {
@size: (@left / (@left + @right)) * 100%;
width: ~'calc(@{size} - @{gutter} - .01px)';
}
& > *:nth-child(even) {
@size: (@right / (@left + @right)) * 100%;
width: ~'calc(@{size} - @{gutter} - .01px)';
}
@media (max-width: @small-screen) {
& > *:nth-child(n) {
width: ~'calc(100% - @{gutter} - .01px)';
}
}
}
// Examples : will be compiled in CSS
.@{kna-namespace}grid-2-1 {
.uneven-grid(2,1);
}
.@{kna-namespace}grid-1-2 {
.uneven-grid(1,2);
}
.@{kna-namespace}grid-3-1 {
.uneven-grid(3,1);
}
.@{kna-namespace}grid-1-3 {
.uneven-grid(1,3);
}
.@{kna-namespace}grid-3-2 {
.uneven-grid(3,2);
}
.@{kna-namespace}grid-2-3 {
.uneven-grid(2,3);
}
.@{kna-namespace}grid-4-1 {
.uneven-grid(4,1);
}
.@{kna-namespace}grid-1-4 {
.uneven-grid(1,4);
}
.@{kna-namespace}pull {
margin-right: auto;
}
.@{kna-namespace}push {
margin-left: auto;
}

View File

@ -15,12 +15,14 @@ La version courte est "il n'y a rien à installer".
Selon votre environnement de travail vous suffit de récupérer la feuille de styles :
- en version [CSS classique](https://raw.githubusercontent.com/raphaelgoetter/KNACSS/master/css/knacss-unminified.css) (ou [minifié](vhttps://raw.githubusercontent.com/raphaelgoetter/KNACSS/master/css/knacss.css))
- en version [LESS](https://github.com/raphaelgoetter/KNACSS/tree/master/less)
- en version [Sass](https://github.com/raphaelgoetter/KNACSS/tree/master/sass)
_Les versions LESS et Sass seront bien évidemment plus malléables grâce à l'apport de variables et fonctions._
_La version Sass sera bien évidemment plus malléable grâce à l'apport de variables et fonctions._
À noter que KNACSS est basé sur un socle [Normalize.css](http://necolas.github.io/normalize.css/), célèbre - et éprouvé - reset CSS employé par Twitter, Github, Bootstrap, Guardian, etc.
À noter que KNACSS est basé sur deux outils :
- [Normalize.css](http://necolas.github.io/normalize.css/), célèbre - et éprouvé - reset CSS employé par Twitter, Github, Bootstrap, Guardian, etc.
- [include-media](http://include-media.com/), mixins Sass pour la gestion des Media Queries.
## Usage
@ -32,11 +34,8 @@ Il est également possible de l'installer (toutes versions) via [Bower](http://b
## Compatibilité
KNACSS est - dans sa grande majorité - compatible avec l'ensemble des navigateurs à partir d'IE8 inclus.
KNACSS est - dans sa grande majorité - compatible avec l'ensemble des navigateurs à partir d'IE10 inclus.
Seules exceptions :
- les positionnements avancés à base de Flexbox (IE10+ minimum), c'est à dire toutes les classes débutant par `.flex-`
## RTFM!
@ -51,19 +50,15 @@ Sachez qu'un [pense-bête en PDF](http://knacss.com/KNACSS-cheatsheet.pdf) est
KNACSS en version complète ne vous convient pas&nbsp;? Seule la grille flexbox vous intéresse&nbsp;? Bienvenue dans *Grillade* !
### votre grillade avec LESS ?
### votre grillade avec Sass ?
Il est possible de n'utiliser KNACSS que pour sa fonctionnalité de grille de positionnement et de bénéficier de colonnes égales, inégales, responsive, des offsets, des pull et push et des mises en exergue. Bref, de [tout l'attirail des grilles KNACSS](https://github.com/alsacreations/KNACSS/blob/master/doc/03-grilles.md).
Il vous suffit pour cela de récupérer le fichier suivant : [grillade.less](https://raw.githubusercontent.com/alsacreations/KNACSS/master/css/grillade.less)
Ce fichier n'est rien d'autre que la concaténation de deux fichiers essentiels :
- `_00-config.less` (nécessaire pour les variables, les tailles de gouttières et les valeurs de breakpoints)
- `_03-grids.less` (ben oui, quand même)
Il vous suffit pour cela de récupérer le fichier suivant : [grillade.less](https://raw.githubusercontent.com/alsacreations/KNACSS/master/css/grillade.scss)
### votre grillade plutôt nature ?
Vous souhaitez simplement bénéficier d'une grille de mise en page simple mais fonctionnelle, en pur CSS sans passer par LESS ou Sass&nbsp;?
Vous souhaitez simplement bénéficier d'une grille de mise en page simple mais fonctionnelle, en pur CSS sans passer par Sass&nbsp;?
Alors contentez-vous du fichier <a href="https://raw.githubusercontent.com/alsacreations/KNACSS/master/css/grillade.css"><strong>grillade.css</strong></a>, il est parfaitement autonome et ne pèse que 4ko seulement&nbsp;!
@ -72,18 +67,18 @@ Par contre, n'oubliez quand même pas de lire [la documentation](https://github.
## Préprocesseurs
KNACSS est conçu et pensé pour être adapté aux préprocesseurs que sont LESS et Sass. Nous employons LESS en interne, nos fichiers de travail sont donc des `.less` et non des `.css` (cela fonctionne aussi avec Sass).
KNACSS est conçu et pensé pour être adapté au préprocesseur Sass. Nos fichiers de travail sont donc des `.scss` et non des `.css`.
Si, comme nous, vous intégrez à l'aide de préprocesseurs, KNACSS va vous faciliter la vie dès le début du projet puisqu'un [fichier de configuration](https://github.com/raphaelgoetter/KNACSS/blob/master/less/_00-config.less) contenant toutes les variables du projet est intégré.
Si, comme nous, vous intégrez à l'aide de préprocesseurs, KNACSS va vous faciliter la vie dès le début du projet puisqu'un [fichier de configuration](https://github.com/raphaelgoetter/KNACSS/blob/master/sass/_config-variables.scss) contenant toutes les variables du projet est intégré.
Libre à vous de le modifier selon les contraintes de votre projet.
**Attention**, si vous importez KNACSS automatiquement via Bower (par exemple dans un dossier `vendor`), ce fichier de configuration risque d'être écrasé à chaque mise à jour de KNACSS. Nous vous invitons à en faire une copie dans votre dossier de travail et à commenter l'appel au fichier de config de `vendor`.
**Attention**, si vous importez KNACSS automatiquement via Bower (par exemple dans un dossier `vendor`), ce fichier de configuration risque d'être écrasé à chaque mise à jour de KNACSS. **Nous vous invitons à en faire une copie dans votre dossier de travail et à commenter l'appel au fichier de config de `vendor`**.
Dans le cas d'un usage via préprocesseur, vos deux fichiers de travail principaux seront :
- le fichier `less/_00-config.less` contenant toutes les variables du projet à définir une fois pour toute au départ
- le fichier `less/knacss.less` qui importe tous les fichiers que vous risquez d'employez dans votre projet (`layout.css`, `responsive.css`, `forms.css`, `print.css`, etc.).
- le fichier `sass/_config-variables.scss` contenant toutes les variables du projet à définir une fois pour toute au départ
- le fichier `sass/knacss.scss` qui importe tous les fichiers que vous risquez d'employez dans votre projet.
En cours de développement, il vous suffit de compiler ce fichier `less/knacss.less` (ou `sass/knacss.scss`) pour obtenir vos fichiers CSS utiles.
En cours de développement, il vous suffit de compiler ce fichier `sass/knacss.scss` pour obtenir vos fichiers CSS utiles.
### Préfixes navigateurs
@ -91,15 +86,25 @@ Certaines fonctionnalités avancées de KNACSS nécessitent d'employer toute une
Au sein de la version classique CSS de KNACSS, l'ensemble des préfixes est présent, **vous n'avez donc pas à vous en soucier** (Autoprefixer réglé à "last 2 versions").
**Par contre, dans les versions LESS et Sass de KNACSS, les préfixes n'apparaissent pas** pour ne pas polluer la lecture du fichier de travail. **Il vous sera donc nécessaire de les ajouter**, de préférence automatiquement grâce à un plugin ou aux excellents outils que sont [autoprefixer](https://github.com/postcss/autoprefixer) ou [pleeease](http://pleeease.io/).
**Par contre, dans la version Sass de KNACSS, les préfixes n'apparaissent pas** pour ne pas polluer la lecture du fichier de travail. **Il vous sera donc nécessaire de les ajouter**, de préférence automatiquement grâce à un plugin ou aux excellents outils que sont [autoprefixer](https://github.com/postcss/autoprefixer) ou [pleeease](http://pleeease.io/).
### Mise à jour depuis une version précédente de KNACSS ?
La version `4.*.*` de KNACSS est une version majeure, ce qui implique que certaines fonctionnalités ne sont plus forcément rétro-compatibles avec les versions précédentes `3.*.*`.
La version `5.*.*` de KNACSS est une version majeure, ce qui implique que certaines fonctionnalités ne sont plus forcément rétro-compatibles avec les versions précédentes `4.*.*`.
Voici les principales modifications dont il faudra tenir compte lors d'une bascule vers la version 4 de KNACSS&nbsp;:
Voici les principales modifications dont il faudra tenir compte lors d'une bascule vers la version 5 de KNACSS&nbsp;:
#### Alignements et flottants
#### Modifications majeures depuis la `4.*.*`
- suppression de la version LESS (à partir de la version KNACSS 5.0, seul le préprocesseur Sass est encore pris en charge)
- suppression des fallbacks pour IE8-IE9 (à partir de la version KNACSS 5.0, seul IE10 et supérieurs sont pris en charge)
- restructuration / renommage des fichiers avec préfixes `_config-`, `_layout-`, `_library-`, `_object-`, `_override-`
- ajout de la library include-media (http://include-media.com/)
- grille "grillade" à présent en mobile first
#### Modifications majeures depuis la `3.*.*`
##### Alignements et flottants
La rétrocompatibilité n'est pas préservée pour certains noms de classes ( `.left`, `.start`, `.fl`, `.table-`, `.flex-start`, `.flex-end`)&nbsp;:
@ -107,7 +112,7 @@ La rétrocompatibilité n'est pas préservée pour certains noms de classes ( `.
- `.right` ne correspond plus à un `float: right` mais à un `margin-left: auto`, il faut dorénavant employer `.fr` pour obtenir un flottant à droite
- `.start` et `.end` n'existent plus
#### Nommages des grilles
##### Nommages des grilles
Le système de grilles de KNACSS 4 est à présent basé sur flexbox (mais demeure compatible IE8 grâce à une alternative inline-block).
@ -118,7 +123,7 @@ Exemple :
- ancien nommage : `.grid2`, `.grid1-3`
- nouveau nommage : `.grid-2`, `.grid-1-3`
#### Nommages de flexbox
##### Nommages de flexbox
Les classes relatives à flexbox ont été renommées pour ne pas entrer en conflit avec des outils tels que Modernizer (qui ajoutent aux-aussi ce genre de classes).

View File

@ -3,8 +3,8 @@
Une grille "KNACSS" a les caractéristiques globales suivantes :
- Les largeurs des colonnes sont fluides (définies en pourcentage du parent),
- Une gouttière sépare chaque colonne (la valeur de cette gouttière est modifiable dans les fichiers `less/knacss.less` ou `sass/knacss.scss`),
- Par défaut, une grille n'est pas responsive mais il est très simple d'activer cette fonctionnalité,
- Une gouttière sépare chaque colonne (la valeur de cette gouttière est modifiable dans le fichier `sass/knacss.scss`),
- Par défaut, une grille est "mobile-first" (une seule colonne sur petit écran, 2 colonnes sur écran "small") et il est très simple d'activer la fonctionnalité "Responsive",
- La technologie employée est [CSS3 Flexbox](http://www.alsacreations.com/tuto/lire/1493-css3-flexbox-layout-module.html).
Il existe deux types principaux de systèmes de grilles dans KNACSS :
@ -12,18 +12,17 @@ Il existe deux types principaux de systèmes de grilles dans KNACSS :
- Les grilles à colonnes égales
- Les grilles à colonnes inégales
Dans les deux cas, la technique associée depuis KNACSS v4 pour concevoir les grilles est **CSS3 Flexbox**, ce qui signifie que la compatibilité de **cette fonctionnalité sera réservée aux [navigateurs modernes](http://caniuse.com/#search=flexbox)** (IE10, Android 4.4+ et tous les autres). Note : une alternative, basée sur `inline-block` est cependant proposée automatiquement pour les anciens navigateurs (IE8, Android 2).
Dans les deux cas, la technique associée depuis KNACSS v4 pour concevoir les grilles est **CSS3 Flexbox**, ce qui signifie que la compatibilité de **cette fonctionnalité sera réservée aux [navigateurs modernes](http://caniuse.com/#search=flexbox)** (IE10, Android 4.4+ et tous les autres).
Quelques exemples pour vous échauffer :
- `<div class="grid-4">` : grille de 4 colonnes également réparties
- `<div class="grid-2-1">` : grille de répartition 2/3 - 1/3
- `<div class="grid-3-tiny-1">` : grille de 3 colonnes égales, puis 1 colonne sur très petit écran
- `<div class="grid-6-small-3-tiny-2">` : grille de 6 colonnes, puis 3 colonnes sur écran "small", puis 2 colonnes sur écran "tiny".
- `<div class="grid-3-small-1">` : grille de 3 colonnes égales, puis 1 colonne sur écran "small"
- `<div class="grid-6-small-3">` : grille de 6 colonnes, puis 3 colonnes sur écran "small"
- note : sur écran très petit ("tiny"), il n'y aura systématiquement qu'une seule colonne.
Et maintenant passons aux explications&nbsp;!
**NOTE pour les utilisateurs de LESS / Sass :** par défaut, les grilles sont activées dans KNACSS. Si vous avez le moindre souci, vérifiez que `@import "_03-grids";` est présent et non commenté dans votre fichier `less/knacss.less` ou `sass/knacss.scss`).
## Précautions à prendre
Qui dit CSS3 dit précautions à prendre.
@ -31,7 +30,7 @@ La bonne nouvelle est que Flexbox est plutôt bien reconnu par l'ensemble des na
Au sein de la version CSS de KNACSS, l'ensemble des préfixes est présent, **vous n'avez donc pas à vous en soucier**.
**Par contre, dans les versions LESS et Sass de KNACSS, les préfixes n'apparaissent pas** pour ne pas polluer la lecture du fichier de travail. **Il vous sera donc nécessaire de les ajouter**, de préférence automatiquement grâce à un plugin ou aux excellents outils que sont [autoprefixer](https://github.com/postcss/autoprefixer) ou [pleeease](http://pleeease.io/).
**Par contre, dans la version Sass de KNACSS, les préfixes n'apparaissent pas** pour ne pas polluer la lecture du fichier de travail. **Il vous sera donc nécessaire de les ajouter**, de préférence automatiquement grâce à un plugin ou aux excellents outils que sont [autoprefixer](https://github.com/postcss/autoprefixer) ou [pleeease](http://pleeease.io/).
## Exemple concret
@ -86,6 +85,26 @@ Les **enfants** directs d'un conteneur, quels qu'ils soient, se répartissent au
- Tester une [grille simple en ligne](http://codepen.io/raphaelgoetter/pen/GAenb?editors=110) (Codepen).
- Tester une [grille de largeur inégale en ligne](http://codepen.io/raphaelgoetter/pen/jmAkx?editors=110) (Codepen).
## Grilles responsive
Les grilles KNACSS sont mobile-first et "plus ou moins" responsive naturellement, dans la mesure où par défaut :
- elles s'affichent systématiquement sur une seule colonne sur un très petit écran ("tiny"),
- elles s'affichent par défaut en 2 colonnes sur un écran de taille réduite ("small"),
- elles occupent le nombre de colonnes définies dans la variable `$number` sur un écran suffisamment large.
Vous pouvez définir le nombre de colonnes selon les tailles d'écran à l'aide du mot-clé : `-small-*`.
Ce mot-clé définit le nombre de colonnes lorsque le point de rupture se situe au-delà de la taille "tiny" et en-deçà de la taille "medium".
La grille ci-dessous s'affichera en 4 colonnes sur grand écran, puis en 2 colonnes sur un écran réduit, puis en une seule colonne sur petit écran :
```html
<div class="grid-4-small-2">
<div>un div ou n'importe quoi d'autre</div>
<div>un 2è div ou n'importe quoi d'autre</div>
<div>un 3è div ou n'importe quoi d'autre</div>
<div>etc.</div>
</div>
```
## Offsets
Il vous est très facile de "pousser" un élément à droite ou à gauche de sa ligne dans la grille, et créer ainsi un espacement volontaire, ce que l'on appelle "offset".
@ -147,22 +166,7 @@ HTML :
Résultat :
![preums!](https://raw.githubusercontent.com/raphaelgoetter/KNACSS/master/doc/illust/03-first.PNG)
## Grilles responsive
Vous pouvez définir le nombre de colonnes selon les tailles d'écran à l'aide des mots-clés suivants :
- `-small-*` : définit le nombre de colonnes lorsque le point de rupture atteint la valeur de la variable `small-screen`
- `-tiny-*` : définit le nombre de colonnes lorsque le point de rupture atteint la valeur de la variable `tiny-screen`
La grille ci-dessous s'affichera en 4 colonnes sur grand écran, puis en 2 colonnes sur un écran réduit, puis en une seule colonne sur petit écran :
```html
<div class="grid-4-small-2-tiny-1">
<div>un div ou n'importe quoi d'autre</div>
<div>un 2è div ou n'importe quoi d'autre</div>
<div>un 3è div ou n'importe quoi d'autre</div>
<div>etc.</div>
</div>
```
## Grilles imbriquées
@ -193,32 +197,32 @@ KNACSS est pensé pour être utilisé à l'aide de preprocesseurs tels que LESS
### Modifier les variables globales
Les variables de configuration des grilles se trouvent dans le fichier `less/_00-config.less` (pour les utilisateurs de LESS) et `sass/_00-config.scss` (en version Sass) :
Les variables de configuration des grilles se trouvent dans le fichier `sass/_config-variables.scss` :
```css
@gutter: 1em;
@number: 4; // for equal columns
@left: 2; // left side of uneven columns
@right: 1; // right side of uneven columns
$gutter: 2rem !default; // gutter value for grid layouts. Unit can be: %, px, em, rem
$number: 4 !default; // number of equal columns
$left: 2 !default; // left side of uneven columns
$right: 1 !default; // right side of uneven columns
```
Il vous suffit de modifier les valeurs de ces variables de config pour répercuter vos préférences sur l'ensemble du projet dès que vos fichiers LESS/Sass seront compilés en CSS.
Il vous suffit de modifier les valeurs de ces variables de config pour répercuter vos préférences sur l'ensemble du projet dès que vos fichiers Sass seront compilés en CSS.
### Générer des grilles personnalisées
Indépendamment des variables de configuration, rien de vous empêche de créer une grille personnalisée en incluant directement l'un des deux mixins possibles dans vos éléments :
- `.grid(n)` pour personnaliser une grille de colonnes **égales**. Les arguments sont "n" = nombre de colonnes
- `.grid(n,g)` pour personnaliser une grille de colonnes **égales**. Les arguments sont "n" = nombre de colonnes et "g" = largeur de la grille
- `.uneven-grid(l,r)` pour personnaliser une grille de colonnes **inégales**. Les arguments sont "l" = pour le ratio de la colonne de gauche, "r" = pour le ratio de la colonne de droite
#### Grille de colonnes égales en LESS
#### Grille de colonnes égales en Sass
**Objectif : je souhaite créer un mixin sur mon élément `.grid-container` afin que celui-ci crée une grille de 6 colonnes égales**
LESS (fichier de développement) :
Sass (fichier de développement) :
```css
.grid-container {
.grid(6);
@include grid(4, 12px)
}
```
@ -228,17 +232,14 @@ CSS compilé (sans Autoprefixer) :
```css
.grid-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-left: -1em;
margin-left: -12px;
}
.grid-container > * {
flex: 0 0 auto;
width: 16.66666667%;
display: block; /* IE fix */
border-left: 1em solid transparent;
background-clip: padding-box !important; /* no background on border */
width: calc(100% * 1 / 4 - 12px - .01px);
margin-left: 12px;
}
.grid-container > .flex-item-double {
width: calc(100% * 2 / 4 - 12px);
}
...
```
@ -251,7 +252,7 @@ LESS (fichier de développement) :
```css
.grid-truc {
.uneven-grid(2, 1);
@include uneven-grid(2, 1);
}
```
@ -261,22 +262,13 @@ LESS (fichier de développement) :
CSS compilé (sans Autoprefixer) :
```css
.grid-truc {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-left: -1em;
}
.grid-truc > * {
display: block; /* IE fix */
border-left: 1em solid transparent;
background-clip: padding-box !important; /* no background on border */
}
.grid-truc > *:nth-child(odd) {
width: 66.66666667%;
}
.grid-truc > *:nth-child(even) {
width: 33.33333333%;
@media (min-width: 641px) {
.grid-truc :nth-child(odd) {
width: calc(66.66667% - 2rem);
}
.grid-truc :nth-child(even) {
width: calc(33.33333% - 2rem);
}
}
...
```

View File

@ -2,7 +2,7 @@
var gulp = require('gulp');
// Include plugins
var less = require('gulp-less');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var minifycss = require('gulp-minify-css');
@ -12,8 +12,8 @@ var autoprefixer = require('gulp-autoprefixer');
// tâche CSS = compile vers knacss.css et knacss-unminified.css
gulp.task('css', function () {
return gulp.src('./less/knacss.less')
.pipe(less())
return gulp.src('./sass/knacss.scss')
.pipe(sass())
.pipe(autoprefixer())
.pipe(rename('knacss-unminified.css'))
.pipe(gulp.dest('./css/'))
@ -25,10 +25,10 @@ gulp.task('css', function () {
});
gulp.task('grillade', function() {
return gulp.src(['./less/_00-config.less', './less/_03-grids.less'])
.pipe(concat('grillade.less'))
return gulp.src(['./sass/_include-media/_include-media.scss','./sass/_config-variables.scss', './sass/_layout-grids.scss'])
.pipe(concat('grillade.scss'))
.pipe(gulp.dest('./css/'))
.pipe(less())
.pipe(sass())
.pipe(autoprefixer())
.pipe(minifycss())
.pipe(gulp.dest('./css/'));
@ -36,7 +36,7 @@ gulp.task('grillade', function() {
// Watcher
gulp.task('watch', function() {
gulp.watch(['./less/*.less'], ['css']);
gulp.watch(['./sass/*.scss'], ['css']);
});

View File

@ -1,72 +0,0 @@
/*!
* www.KNACSS.com V4.4.5 (1er avril 2016) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
*/
// Config file and project variables
// font sizes
@base-font-size : 1.4rem; // ex. 1.4rem would be "14px" equivalent
@line-height : 1.5; // equiv line-height 1.5
@h1-size : 3.2rem; // equiv "32px"
@h2-size : 2.8rem; // equiv "28px"
@h3-size : 2.4rem; // equiv "24px"
@h4-size : 2.0rem; // equiv "20px"
@h5-size : 1.8rem; // equiv "18px"
@h6-size : 1.6rem; // equiv "16px"
// font stacks
@font-stack-common : sans-serif; // common font
@font-stack-headings : sans-serif; // headings font
@font-stack-monospace : consolas, courier, monospace; // monospace font
// font colors
@base-color : #000; // text color on body and content
@primary-color : #000; // text color on primary elements
@secondary-color : #000; // text color on secondary elements
@headings-color : #000; // text color on headings
@headings-1-color : #000; // text color on headings level 1
@headings-2-color : #000; // text color on headings level 2
@headings-3-color : #000; // text color on headings level 3
@base-color-link : #333; // base links color
@base-color-link-hover : #000; // base hovered/focused links color
// backgrounds
@base-background : #fff; // body background color
@primary-background : #fff; // primary elements background color
@secondary-background : #fff; // secondary elements background color
// spacings (choose unit you prefer)
@tiny-value : .5rem; // tiny value for margins / paddings
@tiny-plus-value : .7rem; // tiny+ value for margins / paddings
@small-value : 1rem; // small value for margins / paddings
@small-plus-value : 1.5rem; // small+ value for margins / paddings
@medium-value : 2rem; // medium value for margins / paddings
@medium-plus-value : 3rem; // medium+ value for margins / paddings
@large-value : 4rem; // large value for margins / paddings
@large-plus-value : 6rem; // large value for margins / paddings
@extra-large-value : 8rem; // extra large value for margins / paddings
@extra-large-plus-value : 12rem; // extra large value for margins / paddings
@ultra-large-value : 16rem; // ultra large value for margins / paddings
@ultra-large-plus-value : 20rem; // ultra large value for margins / paddings
// breakpoints (choose unit you prefer)
@tiny-screen : 320px; // tiny screens media query (less-equal than 320px)
@tiny-plus-screen : 480px; // screens between 321px and 480px
@small-screen : 640px; // screens between 481px and 640px
@small-plus-screen : 768px; // screens between 641px and 768px
@medium-screen : 960px; // screens between 769px and 960px
@medium-plus-screen : 1024px; // screens between 961px and 1024px
@large-screen : 1280px; // screens between 1025px and 1280px
@large-plus-screen : 1440px; // screens between 1281px and 1440px
@extra-large-screen : 1600px; // screens between 1441px and 1600px
@ultra-large-screen : 1920px; // ultra large screens
// grids variables (choose unit you prefer)
@gutter: 2rem; // gutter value for grid layouts. Unit can be: %, px, em, rem
@number: 4; // number of equal columns
@left: 2; // left side of uneven columns
@right: 1; // right side of uneven columns
//namespace (default : empty)
@kna-namespace:~"";

View File

@ -1,424 +0,0 @@
/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
* 2. Add the correct display in IE.
*/
article,
aside,
details, /* 1 */
figcaption,
figure,
footer,
header,
main, /* 2 */
menu,
nav,
section,
summary { /* 1 */
display: block;
}
/**
* Add the correct display in IE 9-.
*/
audio,
canvas,
progress,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Add the correct display in IE 10-.
* 1. Add the correct display in IE.
*/
template, /* 1 */
[hidden] {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/* Forms
========================================================================== */
/**
* Change font properties to `inherit` in all browsers (opinionated).
*/
button,
input,
select,
textarea {
font: inherit;
}
/**
* Restore the font weight unset by the previous rule.
*/
optgroup {
font-weight: bold;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
* 2. Show the overflow in Edge, Firefox, and IE.
*/
button,
input, /* 1 */
select { /* 2 */
overflow: visible;
}
/**
* Remove the margin in Safari.
* 1. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea { /* 1 */
margin: 0;
}
/**
* Remove the inheritence of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritence of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Change the cursor in all browsers (opinionated).
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
cursor: pointer;
}
/**
* Restore the default cursor to disabled elements unset by the previous rule.
*/
[disabled] {
cursor: default;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
input:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* Correct the odd appearance of search inputs in Chrome and Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
}
/**
* Remove the inner padding and cancel buttons in Chrome on OS X and
* Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}

View File

@ -1,212 +0,0 @@
/* ----------------------------- */
/* == soft reset */
/* ----------------------------- */
/* switching to border-box model for all elements */
html {
box-sizing: border-box;
}
* {
box-sizing: inherit;
}
ul,
ol {
padding-left: 2em;
}
img {
vertical-align: middle;
}
/* height auto only for non SVG images */
img:not([src$=".svg"]) {
height: auto;
}
blockquote,
figure {
margin-left: 0;
margin-right: 0;
}
/* ----------------------------- */
/* == typography */
/* ----------------------------- */
html {
/* set base font-size to equiv "10px", which is adapted to rem unit */
font-size: 62.5%;
/* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
/* thanks to @guardian, @victorbritopro and @eQRoeil */
font-size: ~'calc(1em * .625)';
}
body {
font-size: @base-font-size;
background-color: @base-background;
color: @base-color;
font-family: @font-stack-common;
line-height: @line-height;
}
a {
color: @base-color-link;
&:hover, &:focus, &:active {
color: @base-color-link-hover;
}
}
/* font-sizing for content */
p,
.@{kna-namespace}p-like,
ul,
ol,
dl,
blockquote,
pre,
td,
th,
label,
textarea,
caption,
details,
figure {
margin-top: 0.75em;
margin-bottom: 0;
line-height: @line-height;
}
h1,
.@{kna-namespace}h1-like {
font-size: @h1-size;
font-family: @font-stack-headings;
}
h2,
.@{kna-namespace}h2-like {
font-size: @h2-size;
font-family: @font-stack-headings;
}
h3,
.@{kna-namespace}h3-like {
font-size: @h3-size;
}
h4,
.@{kna-namespace}h4-like {
font-size: @h4-size;
}
h5,
.@{kna-namespace}h5-like {
font-size: @h5-size;
}
h6,
.@{kna-namespace}h6-like {
font-size: @h6-size;
}
/* alternate font-sizing */
.@{kna-namespace}smaller {
font-size: 0.6em;
}
.@{kna-namespace}small {
font-size: 0.8em;
}
.@{kna-namespace}big {
font-size: 1.2em;
}
.@{kna-namespace}bigger {
font-size: 1.5em;
}
.@{kna-namespace}biggest {
font-size: 2em;
}
code,
pre,
samp,
kbd {
/* IE fix */
white-space: pre-line;
white-space: pre-wrap;
font-family: @font-stack-monospace;
line-height: normal;
}
em,
.@{kna-namespace}italic,
address,
cite,
i,
var {
font-style: italic;
}
/* ----------------------------- */
/* == browsers consistency */
/* ----------------------------- */
/* avoid top margins on first content element */
p,
.@{kna-namespace}p-like,
ul,
ol,
dl,
blockquote,
pre,
h1,
.@{kna-namespace}h1-like,
h2,
.@{kna-namespace}h2-like,
h3,
.@{kna-namespace}h3-like,
h4,
.@{kna-namespace}h4-like,
h5,
.@{kna-namespace}h5-like,
h6,
.@{kna-namespace}h6-like {
&:first-child {
margin-top: 0;
}
}
/* avoid margins on nested elements */
li p,
li .@{kna-namespace}p-like,
li ul,
li ol {
margin-top: 0;
margin-bottom: 0;
}
/* max values */
img,
table,
td,
blockquote,
code,
pre,
textarea,
input,
video,
svg {
max-width: 100%;
}
/* margin-bottom on tables */
table {
margin-bottom: @medium-value;
}

View File

@ -1,139 +0,0 @@
/* ----------------------------- */
/* ==layout and modules */
/* ----------------------------- */
/* module, gains superpower "BFC" Block Formating Context */
.mod,
.bfc {
overflow: hidden;
}
/* blocks that needs to be placed under floats */
.clear,
.@{kna-namespace}line,
.@{kna-namespace}row {
clear: both;
}
/* blocks that must contain floats */
.clearfix,
.@{kna-namespace}line {
&::after {
content: "";
display: table;
clear: both;
border-collapse: collapse;
}
}
/* simple blocks alignment */
.@{kna-namespace}left {
margin-right: auto;
}
.@{kna-namespace}right {
margin-left: auto;
}
.@{kna-namespace}center {
margin-left: auto;
margin-right: auto;
}
/* text and contents alignment */
.@{kna-namespace}txtleft {
text-align: left;
}
.@{kna-namespace}txtright {
text-align: right;
}
.@{kna-namespace}txtcenter {
text-align: center;
}
/* floating elements */
.@{kna-namespace}fl {
float: left;
}
img.@{kna-namespace}fl {
margin-right: @small-value;
}
.@{kna-namespace}fr {
float: right;
}
img.@{kna-namespace}fr {
margin-left: @small-value;
}
img.@{kna-namespace}fl,
img.@{kna-namespace}fr {
margin-bottom: @tiny-value;
}
/* table layout */
.@{kna-namespace}row {
display: table;
table-layout: fixed;
width: 100%;
}
.@{kna-namespace}row > *,
.@{kna-namespace}col {
display: table-cell;
vertical-align: top;
}
/* no table-cell for script tag when body is a .row */
body > script {
display: none !important;
}
/* inline-block */
.@{kna-namespace}inbl {
display: inline-block;
vertical-align: top;
}
/* flexbox layout
http://www.alsacreations.com/tuto/lire/1493-css3-flexbox-layout-module.html
*/
[class*="@{kna-namespace}flex-container"],
.@{kna-namespace}flex-container {
display : flex;
flex-wrap: wrap;
}
.@{kna-namespace}flex-container-h {
flex-direction: row;
}
.@{kna-namespace}flex-container-v {
flex-direction: column;
}
.@{kna-namespace}flex-item-fluid {
flex: 1;
min-width: 0;
}
.@{kna-namespace}flex-item-first {
order : -1;
}
.@{kna-namespace}flex-item-medium {
order : 0;
}
.@{kna-namespace}flex-item-last {
order : 1;
}
.@{kna-namespace}flex-item-center {
margin: auto;
}

View File

@ -1,191 +0,0 @@
/* ---------------------------------- */
/* ==Grillade */
/* ---------------------------------- */
// Tuto : http://www.alsacreations.com/tuto/lire/1659-une-grille-responsive-avec-flexbox-et-LESS.html
// Demo : http://codepen.io/raphaelgoetter/pen/zxBMLW
// Usage in vanilla CSS:
// - <div class="grid-4"> for an equal fourth columns grid container
// - <div class="grid-2-1"> for an uneven columns grid container
// Usage with preprocessors : if you're using LESS, you can config grids variables :
// n = number of columns (default = 4)
// example : .grid-perso { .grid(12); }
// ... or uneven grids :
// left = left ratio column (default = 2) / right = right ratio column (default = 1)
// example : .grid-perso { .uneven-grid(2, 1); }
/* grid container */
[class*="@{kna-namespace}grid-"] {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-left: -@gutter;
/* inline-block fallback for IE9 generation */
letter-spacing: -0.31em;
}
/* grid childs */
[class*="@{kna-namespace}grid-"] > * {
box-sizing: border-box;
flex: 0 0 auto;
width: ~'calc(100% * 1 / @{number} - @{gutter} - .01px)';
min-width: 0;
margin-left: @gutter;
/* inline-block fallback for IE9 generation */
display: inline-block;
vertical-align: top;
letter-spacing: normal;
}
// LESS mixin for custom grid container
.check-new-margin(@newgutter, @multiplier) when not (@newgutter = @gutter) {
margin-left: @newgutter * @multiplier;
}
// LESS mixins for *equal* columns grid container
// example : .grid-perso { .grid(12); }
.grid(@number:@number, @gutter:@gutter) {
.check-new-margin(@gutter, -1);
& > * {
width: ~'calc(100% * 1 / @{number} - @{gutter} - .01px)';
.check-new-margin(@gutter, 1);
}
& > .@{kna-namespace}flex-item-double {
width: ~'calc(100% * 2 / @{number} - @{gutter} - .01px)';
}
}
// Examples : will be compiled in CSS
[class*="@{kna-namespace}grid-2"] {
.grid(2);
}
[class*="@{kna-namespace}grid-3"] {
.grid(3);
}
[class*="@{kna-namespace}grid-4"] {
.grid(4);
}
[class*="@{kna-namespace}grid-5"] {
.grid(5);
}
[class*="@{kna-namespace}grid-6"] {
.grid(6);
}
[class*="@{kna-namespace}grid-7"] {
.grid(7);
}
[class*="@{kna-namespace}grid-8"] {
.grid(8);
}
[class*="@{kna-namespace}grid-10"] {
.grid(10);
}
[class*="@{kna-namespace}grid-12"] {
.grid(12);
}
/* Responsive grid */
// "small-2" = 2 columns when small screen
// example : .grid-4-small-2 will be 4 then 2 columns
@media (max-width: @small-screen) {
[class*="-small-4"] > * {
width: ~'calc(100% * 1 / 4 - @{gutter} - .01px)';
}
[class*="-small-4"] > .flex-item-double {
width: ~'calc(100% * 1 / 2 - @{gutter} - .01px)';
}
[class*="-small-3"] > * {
width: ~'calc(100% * 1 / 3 - @{gutter} - .01px)';
}
[class*="-small-3"] > .flex-item-double {
width: ~'calc(100% * 2 / 3 - @{gutter} - .01px)';
}
[class*="-small-2"] > * {
width: ~'calc(100% * 1 / 2 - @{gutter} - .01px)';
}
[class*="-small-2"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-small-1"] > * {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-small-1"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
}
// "tiny-1" = 1 column when tiny screen
// example : .grid-4-small-2-tiny-1 will be 4 then 2 columns then 1 column
@media (max-width: @tiny-screen) {
[class*="-tiny-2"] > * {
width: ~'calc(100% * 1 / 2 - @{gutter} - .01px)';
}
[class*="-tiny-2"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-tiny-1"] > * {
width: ~'calc(100% - @{gutter} - .01px)';
}
[class*="-tiny-1"] > .flex-item-double {
width: ~'calc(100% - @{gutter} - .01px)';
}
}
// LESS mixins for *unequal* columns grid container
// example : .grid-perso { .uneven-grid(2, 1); }
.uneven-grid(@left:@left, @right:@right, @gutter:@gutter) {
.check-new-margin(@gutter, -1);
& > * {
.check-new-margin(@gutter, 1);
&:nth-child(odd) {
@size: (@left / (@left + @right)) * 100%;
width: ~'calc(@{size} - @{gutter} - .01px)';
}
&:nth-child(even) {
@size: (@right / (@left + @right)) * 100%;
width: ~'calc(@{size} - @{gutter} - .01px)';
}
}
@media (max-width: @small-screen) {
& > *:nth-child(n) {
width: ~'calc(100% - @{gutter} - .01px)';
}
}
}
// Examples : will be compiled in CSS
.@{kna-namespace}grid-2-1 {
.uneven-grid(2,1);
}
.@{kna-namespace}grid-1-2 {
.uneven-grid(1,2);
}
.@{kna-namespace}grid-3-1 {
.uneven-grid(3,1);
}
.@{kna-namespace}grid-1-3 {
.uneven-grid(1,3);
}
.@{kna-namespace}grid-3-2 {
.uneven-grid(3,2);
}
.@{kna-namespace}grid-2-3 {
.uneven-grid(2,3);
}
.@{kna-namespace}grid-4-1 {
.uneven-grid(4,1);
}
.@{kna-namespace}grid-1-4 {
.uneven-grid(1,4);
}
.@{kna-namespace}pull {
margin-right: auto;
}
.@{kna-namespace}push {
margin-left: auto;
}

View File

@ -1,28 +0,0 @@
/* ----------------------------- */
/* ==tables */
/* ----------------------------- */
table,
.@{kna-namespace}table {
width: 100%;
max-width : 100%;
table-layout: fixed;
border-collapse: collapse;
vertical-align: top;
}
.@{kna-namespace}table {
display: table;
}
#recaptcha_table,
table.@{kna-namespace}table-auto {
table-layout:auto;
}
td,
th {
vertical-align: top;
min-width: @medium-value;
cursor: default;
}

View File

@ -1,111 +0,0 @@
/* ----------------------------- */
/* ==forms */
/* ----------------------------- */
/* thanks to HTML5boilerplate,
* github.com/nathansmith/formalize and www.sitepen.com
*/
/* buttons */
.@{kna-namespace}btn {
display: inline-block;
}
/* forms items */
form,
fieldset {
border: none;
}
input,
button,
select,
label,
.@{kna-namespace}btn {
font-family: inherit;
font-size: inherit;
}
button,
input,
optgroup,
select,
textarea {
color: @base-color;
}
label {
display: inline-block;
cursor: pointer;
}
legend {
border: 0;
white-space: normal;
}
textarea {
min-height: 5em;
vertical-align: top;
font-family: inherit;
font-size: inherit;
resize: vertical;
}
select {
-webkit-appearance: menulist-button;
}
/* if select styling bugs on WebKit */
/* select { -webkit-appearance: none; } */
/* 'x' appears on right of search input when text is entered. This removes it */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
display: none;
}
::-webkit-input-placeholder {
color: #777;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
color: #777;
}
.@{kna-namespace}btn:focus,
input[type="button"]:focus,
button:focus {
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* unstyled forms */
.@{kna-namespace}unstyled {
button&,
input[type="button"]&,
input[type="submit"]&,
input[type="reset"]& {
padding: 0;
border: none;
line-height: 1;
text-align: left;
background: none;
border-radius: 0;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
&:focus {
box-shadow: none;
outline: none;
}
}
}

View File

@ -1,352 +0,0 @@
/* ---------------------------------- */
/* ==state helpers */
/* ---------------------------------- */
/* invisible for all */
.is-hidden,
[hidden] {
display: none;
}
/* hidden but not for an assistive technology like a screen reader, Yahoo! method */
.visually-hidden {
position: absolute !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
padding: 0 !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
}
.is-disabled,
[disabled] {
opacity: 0.5;
pointer-events: none;
cursor: not-allowed;
filter: grayscale(1);
}
ul.is-unstyled,
ul.unstyled {
list-style: none;
padding-left: 0;
}
/* ---------------------------------- */
/* ==visual helpers */
/* .. use them with parcimony ! */
/* ---------------------------------- */
/* blocks widths (percentage and pixels) */
.@{kna-namespace}w10 {
width: 10%;
}
.@{kna-namespace}w20 {
width: 20%;
}
.@{kna-namespace}w25 {
width: 25%;
}
.@{kna-namespace}w30 {
width: 30%;
}
.@{kna-namespace}w33 {
width: 33.3333%;
}
.@{kna-namespace}w40 {
width: 40%;
}
.@{kna-namespace}w50 {
width: 50%;
}
.@{kna-namespace}w60 {
width: 60%;
}
.@{kna-namespace}w66 {
width: 66.6666%;
}
.@{kna-namespace}w70 {
width: 70%;
}
.@{kna-namespace}w75 {
width: 75%;
}
.@{kna-namespace}w80 {
width: 80%;
}
.@{kna-namespace}w90 {
width: 90%;
}
.@{kna-namespace}w100 {
width: 100%;
}
.@{kna-namespace}w50p {
width: 50px;
}
.@{kna-namespace}w100p {
width: 100px;
}
.@{kna-namespace}w150p {
width: 150px;
}
.@{kna-namespace}w200p {
width: 200px;
}
.@{kna-namespace}w300p {
width: 300px;
}
.@{kna-namespace}w400p {
width: 400px;
}
.@{kna-namespace}w500p {
width: 500px;
}
.@{kna-namespace}w600p {
width: 600px;
}
.@{kna-namespace}w700p {
width: 700px;
}
.@{kna-namespace}w800p {
width: 800px;
}
.@{kna-namespace}w960p {
width: 960px;
}
.@{kna-namespace}mw960p {
max-width: 960px;
}
.@{kna-namespace}w1140p {
width: 1140px;
}
.@{kna-namespace}mw1140p {
max-width: 1140px;
}
.@{kna-namespace}wauto {
width: auto;
}
/* spacing helpers
p,m = padding,margin
a,t,r,b,l = all,top,right,bottom,left
s,m,l,n = small, medium, large, none
*/
.@{kna-namespace}man,
.@{kna-namespace}ma0 {
margin: 0;
}
.@{kna-namespace}pan,
.@{kna-namespace}pa0 {
padding: 0;
}
.@{kna-namespace}mas {
margin: @small-value;
}
.@{kna-namespace}mam {
margin: @medium-value;
}
.@{kna-namespace}mal {
margin: @large-value;
}
.@{kna-namespace}pas {
padding: @small-value;
}
.@{kna-namespace}pam {
padding: @medium-value;
}
.@{kna-namespace}pal {
padding: @large-value;
}
.@{kna-namespace}mtn,
.@{kna-namespace}mt0 {
margin-top: 0;
}
.@{kna-namespace}mts {
margin-top: @small-value;
}
.@{kna-namespace}mtm {
margin-top: @medium-value;
}
.@{kna-namespace}mtl {
margin-top: @large-value;
}
.@{kna-namespace}mrn,
.@{kna-namespace}mr0 {
margin-right: 0;
}
.@{kna-namespace}mrs {
margin-right: @small-value;
}
.@{kna-namespace}mrm {
margin-right: @medium-value;
}
.@{kna-namespace}mrl {
margin-right: @large-value;
}
.@{kna-namespace}mbn,
.@{kna-namespace}mb0 {
margin-bottom: 0;
}
.@{kna-namespace}mbs {
margin-bottom: @small-value;
}
.@{kna-namespace}mbm {
margin-bottom: @medium-value;
}
.@{kna-namespace}mbl {
margin-bottom: @large-value;
}
.@{kna-namespace}mln,
.@{kna-namespace}ml0 {
margin-left: 0;
}
.@{kna-namespace}mls {
margin-left: @small-value;
}
.@{kna-namespace}mlm {
margin-left: @medium-value;
}
.@{kna-namespace}mll {
margin-left: @large-value;
}
.@{kna-namespace}mauto {
margin: auto;
}
.@{kna-namespace}mtauto {
margin-top: auto;
}
.@{kna-namespace}mrauto {
margin-right: auto;
}
.@{kna-namespace}mbauto {
margin-bottom: auto;
}
.@{kna-namespace}mlauto {
margin-left: auto;
}
.@{kna-namespace}ptn,
.@{kna-namespace}pt0 {
padding-top: 0;
}
.@{kna-namespace}pts {
padding-top: @small-value;
}
.@{kna-namespace}ptm {
padding-top: @medium-value;
}
.@{kna-namespace}ptl {
padding-top: @large-value;
}
.@{kna-namespace}prn,
.@{kna-namespace}pr0 {
padding-right: 0;
}
.@{kna-namespace}prs {
padding-right: @small-value;
}
.@{kna-namespace}prm {
padding-right: @medium-value;
}
.@{kna-namespace}prl {
padding-right: @large-value;
}
.@{kna-namespace}pbn,
.@{kna-namespace}pb0 {
padding-bottom: 0;
}
.@{kna-namespace}pbs {
padding-bottom: @small-value;
}
.@{kna-namespace}pbm {
padding-bottom: @medium-value;
}
.@{kna-namespace}pbl {
padding-bottom: @large-value;
}
.@{kna-namespace}pln,
.@{kna-namespace}pl0 {
padding-left: 0;
}
.@{kna-namespace}pls {
padding-left: @small-value;
}
.@{kna-namespace}plm {
padding-left: @medium-value;
}
.@{kna-namespace}pll {
padding-left: @large-value;
}

View File

@ -1,372 +0,0 @@
/* ----------------------------- */
/* ==desktop and HD devices */
/* ----------------------------- */
@media (min-width: (@medium-screen + 1)) {
/* rules for big resources and big screens like: background-images, font-faces, etc. */
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
/* style adjustments for high density devices */
}
/* ---------------------------------- */
/* ==Responsive large */
/* ---------------------------------- */
@media (min-width: (@medium-screen + 1)) {
/* layouts for large screens */
.@{kna-namespace}large-hidden {
display: none !important;
}
.@{kna-namespace}large-visible {
display: block !important;
}
.@{kna-namespace}large-no-float {
float: none;
}
.@{kna-namespace}large-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
.@{kna-namespace}large-row {
display: table;
table-layout: fixed;
width: 100% !important;
}
.@{kna-namespace}large-col {
display: table-cell;
vertical-align: top;
}
/* widths for large screens */
.@{kna-namespace}large-w25 {
width: 25% !important;
}
.@{kna-namespace}large-w33 {
width: 33.3333% !important;
}
.@{kna-namespace}large-w50 {
width: 50% !important;
}
.@{kna-namespace}large-w66 {
width: 66.6666% !important;
}
.@{kna-namespace}large-w75 {
width: 75% !important;
}
.@{kna-namespace}large-w100,
.@{kna-namespace}large-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for large screens */
.@{kna-namespace}large-man {
margin: 0 !important;
}
}
/* ---------------------------------- */
/* ==Responsive medium */
/* ---------------------------------- */
@media (min-width: (@small-screen + 1)) and (max-width: @medium-screen) {
/* layouts for medium screens */
.@{kna-namespace}medium-hidden {
display: none !important;
}
.@{kna-namespace}medium-visible {
display: block !important;
}
.@{kna-namespace}medium-no-float {
float: none;
}
.@{kna-namespace}medium-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
.@{kna-namespace}medium-row {
display: table;
table-layout: fixed;
width: 100% !important;
}
.@{kna-namespace}medium-col {
display: table-cell;
vertical-align: top;
}
/* widths for medium screens */
.@{kna-namespace}medium-w25 {
width: 25% !important;
}
.@{kna-namespace}medium-w33 {
width: 33.3333% !important;
}
.@{kna-namespace}medium-w50 {
width: 50% !important;
}
.@{kna-namespace}medium-w66 {
width: 66.6666% !important;
}
.@{kna-namespace}medium-w75 {
width: 75% !important;
}
.@{kna-namespace}medium-w100,
.@{kna-namespace}medium-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for medium screens */
.@{kna-namespace}medium-man,
.@{kna-namespace}medium-ma0 {
margin: 0 !important;
}
}
/* ---------------------------------- */
/* ==Responsive small */
/* ---------------------------------- */
@media (min-width: (@tiny-screen + 1)) and (max-width: @small-screen) {
/* quick reset in small resolution and less */
.@{kna-namespace}w600p,
.@{kna-namespace}w700p,
.@{kna-namespace}w800p,
.@{kna-namespace}w960p,
.@{kna-namespace}mw960p {
width: auto;
float: none;
}
/* layouts for small screens */
.@{kna-namespace}small-hidden {
display: none !important;
}
.@{kna-namespace}small-visible {
display: block !important;
}
.@{kna-namespace}small-no-float {
float: none;
}
.@{kna-namespace}small-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
.@{kna-namespace}small-row {
display: table !important;
table-layout: fixed !important;
width: 100% !important;
}
.@{kna-namespace}small-col {
display: table-cell !important;
vertical-align: top !important;
}
/* widths for small screens */
.@{kna-namespace}small-w25 {
width: 25% !important;
}
.@{kna-namespace}small-w33 {
width: 33.3333% !important;
}
.@{kna-namespace}small-w50 {
width: 50% !important;
}
.@{kna-namespace}small-w66 {
width: 66.6666% !important;
}
.@{kna-namespace}small-w75 {
width: 75% !important;
}
.@{kna-namespace}small-w100,
.@{kna-namespace}small-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for small screens */
.@{kna-namespace}small-man,
.@{kna-namespace}small-ma0 {
margin: 0 !important;
}
.@{kna-namespace}small-pan,
.@{kna-namespace}small-pa0 {
padding: 0 !important;
}
}
/* ---------------------------------- */
/* ==Responsive tiny */
/* ---------------------------------- */
@media (max-width: @tiny-screen) {
/* quick tiny resolution reset */
.@{kna-namespace}mod,
.@{kna-namespace}col,
fieldset {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
.@{kna-namespace}flex-container {
flex-direction: column;
}
.@{kna-namespace}w300p,
.@{kna-namespace}w400p,
.@{kna-namespace}w500p {
width: auto;
float: none;
}
.@{kna-namespace}row {
display: block !important;
width: 100% !important;
}
/* layouts for tiny screens */
.@{kna-namespace}tiny-hidden {
display: none !important;
}
.@{kna-namespace}tiny-visible {
display: block !important;
}
.@{kna-namespace}tiny-no-float {
float: none;
}
.@{kna-namespace}tiny-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
.@{kna-namespace}tiny-row {
display: table !important;
table-layout: fixed !important;
width: 100% !important;
}
.@{kna-namespace}tiny-col {
display: table-cell !important;
vertical-align: top !important;
}
th,
td {
display: block;
width: auto;
text-align: left;
}
thead {
display: none;
}
/* widths for tiny screens */
.@{kna-namespace}tiny-w25 {
width: 25% !important;
}
.@{kna-namespace}tiny-w33 {
width: 33.3333% !important;
}
.@{kna-namespace}tiny-w50 {
width: 50% !important;
}
.@{kna-namespace}tiny-w66 {
width: 66.6666% !important;
}
.@{kna-namespace}tiny-w75 {
width: 75% !important;
}
.@{kna-namespace}tiny-w100,
.@{kna-namespace}tiny-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for tiny screens */
.@{kna-namespace}tiny-man,
.@{kna-namespace}tiny-ma0 {
margin: 0 !important;
}
.@{kna-namespace}tiny-pan,
.@{kna-namespace}tiny-pa0 {
padding: 0 !important;
}
}

View File

@ -1,93 +0,0 @@
/* quick print reset */
@media print {
* {
background: transparent !important;
box-shadow: none !important;
text-shadow: none !important;
}
body {
width: auto;
margin: auto;
font-family: serif;
font-size: 12pt;
}
p,
.@{kna-namespace}p-like,
h1,
.@{kna-namespace}h1-like,
h2,
.@{kna-namespace}h2-like,
h3,
.@{kna-namespace}h3-like,
h4,
.@{kna-namespace}h4-like,
h5,
.@{kna-namespace}h5-like,
h6,
.@{kna-namespace}h6-like,
blockquote,
ul,
ol {
color: #000;
margin: auto;
}
.@{kna-namespace}print {
display: block;
}
.@{kna-namespace}no-print {
display: none;
}
/* no orphans, no widows */
p,
.@{kna-namespace}p-like,
blockquote {
orphans: 3;
widows: 3;
}
/* no breaks inside these elements */
blockquote,
ul,
ol {
page-break-inside: avoid;
}
/* page break before main headers
h1,
.h1-like {
page-break-before: always;
}
*/
/* no breaks after these elements */
h1,
.@{kna-namespace}h1-like,
h2,
.@{kna-namespace}h2-like,
h3,
.@{kna-namespace}h3-like,
caption {
page-break-after: avoid;
}
a {
color: #000;
}
/* displaying URLs
a[href]::after {
content: " (" attr(href) ")";
}
*/
a[href^="javascript:"]::after,
a[href^="#"]::after {
content: "";
}
}

View File

@ -1,48 +0,0 @@
/* ----------------------------- */
/* ==misc rules */
/* ----------------------------- */
/* styling skip links */
.@{kna-namespace}skip-links {
position: absolute;
& a {
position: absolute;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
padding: 0.5em;
background: black;
color: white;
text-decoration: none;
&:focus {
position: static;
overflow: visible;
clip: auto;
}
}
}
// hyphens on small screens
@media (max-width: @small-screen) {
/* you shall not pass */
div,
textarea,
table,
td,
th,
code,
pre,
samp {
word-wrap: break-word;
hyphens: auto;
}
}
// use .no-wrapping to disallow hyphens on small screens
@media (max-width: @small-screen) {
.no-wrapping {
word-wrap: normal;
hyphens: manual;
}
}

View File

@ -1,115 +0,0 @@
/* ----------------------------- */
/* ==minor stylings */
/* ----------------------------- */
/* styling elements */
code,
kbd,
mark {
border-radius: 2px;
}
kbd {
padding: 0 2px;
border: 1px solid #999;
}
code {
padding: 2px 4px;
background: rgba(0,0,0,0.04);
color: #b11;
}
pre code {
padding: 0;
background: none;
color: inherit;
border-radius: 0;
}
mark {
padding:2px 4px;
}
sup,
sub {
vertical-align: 0;
}
sup {
bottom: 1ex;
}
sub {
top: 0.5ex;
}
blockquote {
position: relative;
padding-left: 3em;
}
blockquote::before {
content: "\201C";
position: absolute;
left: 0;
top: 0;
font-family: georgia, serif;
font-size: 5em;
line-height: 0.9;
color: rgba(0, 0, 0, .3);
}
blockquote > footer {
margin-top: .75em;
font-size: 0.9em;
color: rgba(0, 0, 0, .7);
}
blockquote > footer::before {
content: "\2014 \0020";
}
q {
font-style: normal;
}
q,
.@{kna-namespace}q {
quotes: "“\00a0" "\00a0”";
}
q:lang(fr),
.@{kna-namespace}q:lang(fr) {
quotes: "«\00a0" "\00a0»";
}
hr {
display: block;
clear: both;
height: 1px;
margin: 1em 0 2em;
padding: 0;
border: 0;
color: #ccc;
background-color: #ccc;
}
/* tables */
table,
.@{kna-namespace}table {
border: 1px solid #ccc;
}
caption {
padding: @small-value;
color: #555;
font-style: italic;
}
td,
th {
padding: 0.3em 0.8em;
border: 1px #aaa dotted;
text-align: left;
}

View File

@ -1,302 +0,0 @@
/* ----------------------------- */
/* ==WordPress reset */
/* ----------------------------- */
/*
Author: Geoffrey Crofte, Alsacréations
Contributors: Automattic, Geoffrey Crofte
Description: Reset styles for WordPress usage of KNACSS
*/
/* ----------------------------- */
/* ==Menus */
/* ----------------------------- */
// current menu elements
.current_page_item > a {
}
.current-menu-item > a {
}
.current_page_ancestor > a {
}
// blocks of content navigation
.comment-navigation,
.paging-navigation,
.post-navigation {
margin: 0 0 1.5em;
overflow: hidden;
}
.comment-navigation .nav-previous,
.paging-navigation .nav-previous,
.post-navigation .nav-previous {
float: left;
width: 50%;
}
.comment-navigation .nav-next,
.paging-navigation .nav-next,
.post-navigation .nav-next {
float: right;
text-align: right;
width: 50%;
}
/* ----------------------------- */
/* ==Alignments */
/* ----------------------------- */
// class in img elements
.alignnone {
margin: .25em 1.5em 1.5em 0;
}
.aligncenter {
clear: both;
display: block;
margin: 1.5em auto;
}
.alignleft {
float: left;
margin: 0 1.5em .25em 0;
}
.alignright {
float: right;
margin: 0 0 .25em 1.5em;
}
/* ----------------------------- */
/* ==Clearings */
/* ----------------------------- */
.entry-content,
.comment-content {
clear: both;
&::after, &::before {
content: "";
display: table;
}
}
/* ----------------------------- */
/* ==Widgets */
/* ----------------------------- */
.widget + .widget {
margin: 1.5em 0 0;
}
// usage example:
.widget select {
max-width: 100%;
}
/* ----------------------------- */
/* ==Posts and pages */
/* ----------------------------- */
/* === 5.1 Posts - post_class === */
// featured content
.sticky {
}
// attachment post
.attachment {
}
// format of post
.format- {
&aside {
}
&gallery {
}
&link {
}
&image {
}
&quote {
}
&status {
}
&video {
}
&chat {
}
}
// class for a tag
.tag- {
&name-of-tag {
}
}
// class for categorie
.category- {
&name-of-category {
}
}
/* === 5.2 Pages - body_class === */
// front page
.home {
// if display posts
&.blog {
}
// if static page
&.page {
}
}
// page displays posts
.blog {
// if is frontpage
&.home {
}
// if static page
&.page {
}
}
// simple page
.page {
}
// page of single post
.single {
}
// page of archives
.archive {
}
// page of search
.search {
// if has results
.search-results {
}
// if has no results
.search-no-results {
}
}
// page 404
.error404 {
}
// user logged in
.logged-in {
}
// text direction if right-to-left
// prefer rtl.css: http://codex.wordpress.org/Right-to-Left_Language_Support
.rtl {
}
/* === 5.3 Posts and Pages - Contents === */
.hentry {
margin: 0 0 1.5em;
}
.page-content,
.entry-content,
.entry-summary {
margin: 1.5em 0 0;
}
.page-links {
clear: both;
margin: 0 0 1.5em;
}
/* ----------------------------- */
/* ==Comments */
/* ----------------------------- */
.comment-content a {
word-wrap: break-word;
}
.bypostauthor {
// some make-the-logo-bigger styles
}
/* ----------------------------- */
/* ==Media */
/* ----------------------------- */
img.wp-smiley {
margin-bottom: 0;
margin-top: 0;
padding: 0;
border: none;
}
/* ----------------------------- */
/* ==Captions */
/* ----------------------------- */
.wp-caption {
max-width: 100%;
margin-bottom: 1.5em;
}
.wp-caption img {
display: block;
margin: 0 auto;
}
.wp-caption-text {
margin: 1em 0;
text-align: center;
}
/* ----------------------------- */
/* ==Galleries */
/* ----------------------------- */
.gallery {
margin-bottom: 1.5em;
}
.gallery-item {
display: inline-block;
width: 100%;
text-align: center;
vertical-align: top;
.gallery-columns-2 & {
max-width: 50%;
}
.gallery-columns-3 & {
max-width: 33.33%;
}
.gallery-columns-4 & {
max-width: 25%;
}
.gallery-columns-5 & {
max-width: 20%;
}
.gallery-columns-6 & {
max-width: 16.66%;
}
.gallery-columns-7 & {
max-width: 14.28%;
}
.gallery-columns-8 & {
max-width: 12.5%;
}
.gallery-columns-9 & {
max-width: 11.11%;
}
}
.gallery-caption {
display: block;
}

View File

@ -1,33 +0,0 @@
// LESS config file
// -----------------
// (WARNING : you should comment this line and move config file from vendor/knacss folder to your own folder)
@import "_00-config";
// normalize include
@import "_01a-normalize"; // normalize
// LESS base styles
@import "_01b-base"; // reset and basic styles
// LESS files : chose the ones you need
@import "_02-layout"; // alignment, modules, positionning
@import "_03-grids"; // grids
@import "_04-tables"; // data tables consistency
@import "_05-forms"; // forms consistency
@import "_06-helpers"; // width and spacers visually classes
@import "_07-responsive"; // Responsive Web Design helpers
@import "_08-print"; // print quick reset
@import "_09-misc"; // skip links, google maps and hyphens
@import "_10-styling"; // minor stylings
// WordPress base styles
// @import "_11-wordpress"; // WordPress reset and basic styles
/* ----------------------------- */
/* ==own stylesheet */
/* ----------------------------- */
/* Here should go your own CSS styles */
/* You can also link them with a LESS @import */
/* @import "my-styles.less"; */

View File

@ -1,6 +1,6 @@
{
"name": "knacss",
"version": "4.4.5",
"version": "5.0.0",
"homepage": "http://www.knacss.com/",
"bugs": "https://github.com/alsacreations/KNACSS/issues",
"author": [

View File

@ -1,8 +1,3 @@
/*!
* www.KNACSS.com V4.4.5 (1er avril 2016) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
*/
// Config file and project variables
// font sizes
@ -22,8 +17,8 @@ $font-stack-monospace : consolas, courier, monospace !default; // monospace font
// font colors
$base-color : #000 !default; // text color on body and content
$primary-color : #000 !default; // text color on primary elements
$secondary-color : #000 !default; // text color on secondary elements
$alpha-color : #000 !default; // text color on primary elements
$beta-color : #000 !default; // text color on secondary elements
$headings-color : #000 !default; // text color on headings
$headings-1-color : #000 !default; // text color on headings level 1
$headings-2-color : #000 !default; // text color on headings level 2
@ -32,9 +27,9 @@ $base-color-link : #333 !default; // base links color
$base-color-link-hover : #000 !default; // base hovered/focused links color
// backgrounds
$base-background : #fff !default; // body background color
$primary-background : #fff !default; // primary elements background color
$secondary-background : #fff !default; // secondary elements background color
$base-background : #fff !default; // body background color
$alpha-background : #fff !default; // primary elements background color
$beta-background : #fff !default; // secondary elements background color
// spacings (choose unit you prefer)
$tiny-value : .5rem !default; // tiny value for margins / paddings
@ -50,17 +45,20 @@ $extra-large-plus-value : 12rem !default; // extra large value for margins / pad
$ultra-large-value : 16rem !default; // ultra large value for margins / paddings
$ultra-large-plus-value : 20rem !default; // ultra large value for margins / paddings
// breakpoints (choose unit you prefer)
$tiny-screen : 320px !default; // tiny screens media query (less-equal than 320px)
$tiny-plus-screen : 480px !default; // screens between 321px and 480px
$small-screen : 640px !default; // screens between 481px and 640px
$small-plus-screen : 768px !default; // screens between 641px and 768px
$medium-screen : 960px !default; // screens between 769px and 960px
$medium-plus-screen : 1024px !default; // screens between 961px and 1024px
$large-screen : 1280px !default; // screens between 1025px and 1280px
$large-plus-screen : 1440px !default; // screens between 1281px and 1440px
$extra-large-screen : 1600px !default; // screens between 1441px and 1600px
$ultra-large-screen : 1920px !default; // ultra large screens
// breakpoints (overrides include-media.scss) (choose unit you prefer)
// doc : http://include-media.com/documentation/
$breakpoints: (
tiny-screen : 320px,
tiny-plus-screen : 480px,
small-screen : 640px,
small-plus-screen : 768px,
medium-screen : 960px,
medium-plus-screen: 1024px,
large-screen : 1280px,
large-plus-screen : 1440px,
extra-large-screen: 1600px,
ultra-large-screen: 1920px
);
// grids variables (choose unit you prefer)
$gutter: 2rem !default; // gutter value for grid layouts. Unit can be: %, px, em, rem

View File

@ -0,0 +1,568 @@
@charset 'UTF-8';
// _ _ _ _ _
// (_) | | | | | (_)
// _ _ __ ___| |_ _ __| | ___ _ __ ___ ___ __| |_ __ _
// | | '_ \ / __| | | | |/ _` |/ _ \ | '_ ` _ \ / _ \/ _` | |/ _` |
// | | | | | (__| | |_| | (_| | __/ | | | | | | __/ (_| | | (_| |
// |_|_| |_|\___|_|\__,_|\__,_|\___| |_| |_| |_|\___|\__,_|_|\__,_|
//
// Simple, elegant and maintainable media queries in Sass
// v1.4.3
//
// http://include-media.com
//
// Authors: Eduardo Boucas (@eduardoboucas)
// Hugo Giraudel (@hugogiraudel)
//
// This project is licensed under the terms of the MIT license
////
/// include-media library public configuration
/// @author Eduardo Boucas
/// @access public
////
///
/// Creates a list of global breakpoints
///
/// @example scss - Creates a single breakpoint with the label `phone`
/// $breakpoints: ('phone': 320px);
///
$breakpoints: (
'phone': 320px,
'tablet': 768px,
'desktop': 1024px
) !default;
///
/// Creates a list of static expressions or media types
///
/// @example scss - Creates a single media type (screen)
/// $media-expressions: ('screen': 'screen');
///
/// @example scss - Creates a static expression with logical disjunction (OR operator)
/// $media-expressions: (
/// 'retina2x': '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)'
/// );
///
$media-expressions: (
'screen': 'screen',
'print': 'print',
'handheld': 'handheld',
'landscape': '(orientation: landscape)',
'portrait': '(orientation: portrait)',
'retina2x': '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)',
'retina3x': '(-webkit-min-device-pixel-ratio: 3), (min-resolution: 350dpi)'
) !default;
///
/// Defines a number to be added or subtracted from each unit when declaring breakpoints with exclusive intervals
///
/// @example scss - Interval for pixels is defined as `1` by default
/// @include media('>128px') {}
///
/// /* Generates: */
/// @media (min-width: 129px) {}
///
/// @example scss - Interval for ems is defined as `0.01` by default
/// @include media('>20em') {}
///
/// /* Generates: */
/// @media (min-width: 20.01em) {}
///
/// @example scss - Interval for rems is defined as `0.1` by default, to be used with `font-size: 62.5%;`
/// @include media('>2.0rem') {}
///
/// /* Generates: */
/// @media (min-width: 2.1rem) {}
///
$unit-intervals: (
'px': 1,
'em': 0.01,
'rem': 0.1
) !default;
///
/// Defines whether support for media queries is available, useful for creating separate stylesheets
/// for browsers that don't support media queries.
///
/// @example scss - Disables support for media queries
/// $im-media-support: false;
/// @include media('>=tablet') {
/// .foo {
/// color: tomato;
/// }
/// }
///
/// /* Generates: */
/// .foo {
/// color: tomato;
/// }
///
$im-media-support: true !default;
///
/// Selects which breakpoint to emulate when support for media queries is disabled. Media queries that start at or
/// intercept the breakpoint will be displayed, any others will be ignored.
///
/// @example scss - This media query will show because it intercepts the static breakpoint
/// $im-media-support: false;
/// $im-no-media-breakpoint: 'desktop';
/// @include media('>=tablet') {
/// .foo {
/// color: tomato;
/// }
/// }
///
/// /* Generates: */
/// .foo {
/// color: tomato;
/// }
///
/// @example scss - This media query will NOT show because it does not intercept the desktop breakpoint
/// $im-media-support: false;
/// $im-no-media-breakpoint: 'tablet';
/// @include media('>=desktop') {
/// .foo {
/// color: tomato;
/// }
/// }
///
/// /* No output */
///
$im-no-media-breakpoint: 'desktop' !default;
///
/// Selects which media expressions are allowed in an expression for it to be used when media queries
/// are not supported.
///
/// @example scss - This media query will show because it intercepts the static breakpoint and contains only accepted media expressions
/// $im-media-support: false;
/// $im-no-media-breakpoint: 'desktop';
/// $im-no-media-expressions: ('screen');
/// @include media('>=tablet', 'screen') {
/// .foo {
/// color: tomato;
/// }
/// }
///
/// /* Generates: */
/// .foo {
/// color: tomato;
/// }
///
/// @example scss - This media query will NOT show because it intercepts the static breakpoint but contains a media expression that is not accepted
/// $im-media-support: false;
/// $im-no-media-breakpoint: 'desktop';
/// $im-no-media-expressions: ('screen');
/// @include media('>=tablet', 'retina2x') {
/// .foo {
/// color: tomato;
/// }
/// }
///
/// /* No output */
///
$im-no-media-expressions: ('screen', 'portrait', 'landscape') !default;
////
/// Cross-engine logging engine
/// @author Hugo Giraudel
/// @access private
////
///
/// Log a message either with `@error` if supported
/// else with `@warn`, using `feature-exists('at-error')`
/// to detect support.
///
/// @param {String} $message - Message to log
///
@function log($message) {
@if feature-exists('at-error') {
@error $message;
} @else {
@warn $message;
$_: noop();
}
@return $message;
}
///
/// Wrapper mixin for the log function so it can be used with a more friendly
/// API than `@if log('..') {}` or `$_: log('..')`. Basically, use the function
/// within functions because it is not possible to include a mixin in a function
/// and use the mixin everywhere else because it's much more elegant.
///
/// @param {String} $message - Message to log
///
@mixin log($message) {
@if log($message) {}
}
///
/// Function with no `@return` called next to `@warn` in Sass 3.3
/// to trigger a compiling error and stop the process.
///
@function noop() {}
///
/// Determines whether a list of conditions is intercepted by the static breakpoint.
///
/// @param {Arglist} $conditions - Media query conditions
///
/// @return {Boolean} - Returns true if the conditions are intercepted by the static breakpoint
///
@function im-intercepts-static-breakpoint($conditions...) {
$no-media-breakpoint-value: map-get($breakpoints, $im-no-media-breakpoint);
@if not $no-media-breakpoint-value {
@if log('`#{$im-no-media-breakpoint}` is not a valid breakpoint.') {}
}
@each $condition in $conditions {
@if not map-has-key($media-expressions, $condition) {
$operator: get-expression-operator($condition);
$prefix: get-expression-prefix($operator);
$value: get-expression-value($condition, $operator);
// scss-lint:disable SpaceAroundOperator
@if ($prefix == 'max' and $value <= $no-media-breakpoint-value) or
($prefix == 'min' and $value > $no-media-breakpoint-value) {
@return false;
}
} @else if not index($im-no-media-expressions, $condition) {
@return false;
}
}
@return true;
}
////
/// Parsing engine
/// @author Hugo Giraudel
/// @access private
////
///
/// Get operator of an expression
///
/// @param {String} $expression - Expression to extract operator from
///
/// @return {String} - Any of `>=`, `>`, `<=`, `<`, ``, ``
///
@function get-expression-operator($expression) {
@each $operator in ('>=', '>', '<=', '<', '', '') {
@if str-index($expression, $operator) {
@return $operator;
}
}
// It is not possible to include a mixin inside a function, so we have to
// rely on the `log(..)` function rather than the `log(..)` mixin. Because
// functions cannot be called anywhere in Sass, we need to hack the call in
// a dummy variable, such as `$_`. If anybody ever raise a scoping issue with
// Sass 3.3, change this line in `@if log(..) {}` instead.
$_: log('No operator found in `#{$expression}`.');
}
///
/// Get dimension of an expression, based on a found operator
///
/// @param {String} $expression - Expression to extract dimension from
/// @param {String} $operator - Operator from `$expression`
///
/// @return {String} - `width` or `height` (or potentially anything else)
///
@function get-expression-dimension($expression, $operator) {
$operator-index: str-index($expression, $operator);
$parsed-dimension: str-slice($expression, 0, $operator-index - 1);
$dimension: 'width';
@if str-length($parsed-dimension) > 0 {
$dimension: $parsed-dimension;
}
@return $dimension;
}
///
/// Get dimension prefix based on an operator
///
/// @param {String} $operator - Operator
///
/// @return {String} - `min` or `max`
///
@function get-expression-prefix($operator) {
@return if(index(('<', '<=', ''), $operator), 'max', 'min');
}
///
/// Get value of an expression, based on a found operator
///
/// @param {String} $expression - Expression to extract value from
/// @param {String} $operator - Operator from `$expression`
///
/// @return {Number} - A numeric value
///
@function get-expression-value($expression, $operator) {
$operator-index: str-index($expression, $operator);
$value: str-slice($expression, $operator-index + str-length($operator));
@if map-has-key($breakpoints, $value) {
$value: map-get($breakpoints, $value);
} @else {
$value: to-number($value);
}
$interval: map-get($unit-intervals, unit($value));
@if not $interval {
// It is not possible to include a mixin inside a function, so we have to
// rely on the `log(..)` function rather than the `log(..)` mixin. Because
// functions cannot be called anywhere in Sass, we need to hack the call in
// a dummy variable, such as `$_`. If anybody ever raise a scoping issue with
// Sass 3.3, change this line in `@if log(..) {}` instead.
$_: log('Unknown unit `#{unit($value)}`.');
}
@if $operator == '>' {
$value: $value + $interval;
} @else if $operator == '<' {
$value: $value - $interval;
}
@return $value;
}
///
/// Parse an expression to return a valid media-query expression
///
/// @param {String} $expression - Expression to parse
///
/// @return {String} - Valid media query
///
@function parse-expression($expression) {
// If it is part of $media-expressions, it has no operator
// then there is no need to go any further, just return the value
@if map-has-key($media-expressions, $expression) {
@return map-get($media-expressions, $expression);
}
$operator: get-expression-operator($expression);
$dimension: get-expression-dimension($expression, $operator);
$prefix: get-expression-prefix($operator);
$value: get-expression-value($expression, $operator);
@return '(#{$prefix}-#{$dimension}: #{$value})';
}
///
/// Slice `$list` between `$start` and `$end` indexes
///
/// @access private
///
/// @param {List} $list - List to slice
/// @param {Number} $start [1] - Start index
/// @param {Number} $end [length($list)] - End index
///
/// @return {List} Sliced list
///
@function slice($list, $start: 1, $end: length($list)) {
@if length($list) < 1 or $start > $end {
@return ();
}
$result: ();
@for $i from $start through $end {
$result: append($result, nth($list, $i));
}
@return $result;
}
////
/// String to number converter
/// @author Hugo Giraudel
/// @access private
////
///
/// Casts a string into a number
///
/// @param {String | Number} $value - Value to be parsed
///
/// @return {Number}
///
@function to-number($value) {
@if type-of($value) == 'number' {
@return $value;
} @else if type-of($value) != 'string' {
$_: log('Value for `to-number` should be a number or a string.');
}
$first-character: str-slice($value, 1, 1);
$result: 0;
$digits: 0;
$minus: ($first-character == '-');
$numbers: ('0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9);
// Remove +/- sign if present at first character
@if ($first-character == '+' or $first-character == '-') {
$value: str-slice($value, 2);
}
@for $i from 1 through str-length($value) {
$character: str-slice($value, $i, $i);
@if not (index(map-keys($numbers), $character) or $character == '.') {
@return to-length(if($minus, -$result, $result), str-slice($value, $i))
}
@if $character == '.' {
$digits: 1;
} @else if $digits == 0 {
$result: $result * 10 + map-get($numbers, $character);
} @else {
$digits: $digits * 10;
$result: $result + map-get($numbers, $character) / $digits;
}
}
@return if($minus, -$result, $result);
}
///
/// Add `$unit` to `$value`
///
/// @param {Number} $value - Value to add unit to
/// @param {String} $unit - String representation of the unit
///
/// @return {Number} - `$value` expressed in `$unit`
///
@function to-length($value, $unit) {
$units: ('px': 1px, 'cm': 1cm, 'mm': 1mm, '%': 1%, 'ch': 1ch, 'pc': 1pc, 'in': 1in, 'em': 1em, 'rem': 1rem, 'pt': 1pt, 'ex': 1ex, 'vw': 1vw, 'vh': 1vh, 'vmin': 1vmin, 'vmax': 1vmax);
@if not index(map-keys($units), $unit) {
$_: log('Invalid unit `#{$unit}`.');
}
@return $value * map-get($units, $unit);
}
///
/// This mixin aims at redefining the configuration just for the scope of
/// the call. It is helpful when having a component needing an extended
/// configuration such as custom breakpoints (referred to as tweakpoints)
/// for instance.
///
/// @author Hugo Giraudel
///
/// @param {Map} $tweakpoints [()] - Map of tweakpoints to be merged with `$breakpoints`
/// @param {Map} $tweak-media-expressions [()] - Map of tweaked media expressions to be merged with `$media-expression`
///
/// @example scss - Extend the global breakpoints with a tweakpoint
/// @include media-context(('custom': 678px)) {
/// .foo {
/// @include media('>phone', '<=custom') {
/// // ...
/// }
/// }
/// }
///
/// @example scss - Extend the global media expressions with a custom one
/// @include media-context($tweak-media-expressions: ('all': 'all')) {
/// .foo {
/// @include media('all', '>phone') {
/// // ...
/// }
/// }
/// }
///
/// @example scss - Extend both configuration maps
/// @include media-context(('custom': 678px), ('all': 'all')) {
/// .foo {
/// @include media('all', '>phone', '<=custom') {
/// // ...
/// }
/// }
/// }
///
@mixin media-context($tweakpoints: (), $tweak-media-expressions: ()) {
// Save global configuration
$global-breakpoints: $breakpoints;
$global-media-expressions: $media-expressions;
// Update global configuration
$breakpoints: map-merge($breakpoints, $tweakpoints) !global;
$media-expressions: map-merge($media-expressions, $tweak-media-expressions) !global;
@content;
// Restore global configuration
$breakpoints: $global-breakpoints !global;
$media-expressions: $global-media-expressions !global;
}
////
/// include-media public exposed API
/// @author Eduardo Boucas
/// @access public
////
///
/// Generates a media query based on a list of conditions
///
/// @param {Arglist} $conditions - Media query conditions
///
/// @example scss - With a single set breakpoint
/// @include media('>phone') { }
///
/// @example scss - With two set breakpoints
/// @include media('>phone', '<=tablet') { }
///
/// @example scss - With custom values
/// @include media('>=358px', '<850px') { }
///
/// @example scss - With set breakpoints with custom values
/// @include media('>desktop', '<=1350px') { }
///
/// @example scss - With a static expression
/// @include media('retina2x') { }
///
/// @example scss - Mixing everything
/// @include media('>=350px', '<tablet', 'retina3x') { }
///
@mixin media($conditions...) {
// scss-lint:disable SpaceAroundOperator
@if ($im-media-support and length($conditions) == 0) or
(not $im-media-support and im-intercepts-static-breakpoint($conditions...)) {
@content;
} @else if ($im-media-support and length($conditions) > 0) {
@media #{unquote(parse-expression(nth($conditions, 1)))} {
// Recursive call
@include media(slice($conditions, 2)...) {
@content;
}
}
}
}

View File

@ -22,23 +22,24 @@
flex-direction: row;
flex-wrap: wrap;
margin-left: -$gutter;
/* inline-block fallback for IE9 generation */
letter-spacing: -0.31em;
}
/* grid childs */
[class*="#{$kna-namespace}grid-"] > * {
box-sizing: border-box;
flex: 0 0 auto;
width: calc(100% * 1 / #{$number} - #{$gutter} - .01px);
width: calc(100% - #{$gutter} - .01px);// @bugfix IE https://github.com/alsacreations/KNACSS/issues/133;
min-width: 0;
min-height: 0;
margin-left: $gutter;
/* inline-block fallback for IE9 generation */
display: inline-block;
vertical-align: top;
letter-spacing: normal;
@include media('>tiny-screen', '<=small-screen') {
& {
width: calc(100% * 1 / 2 - #{$gutter} - .01px);
}
&.flex-item-double {
width: calc(100% - #{$gutter} - .01px);
}
}
}
// Sass mixins for *equal* columns grid container
@ -59,47 +60,17 @@
}
// Examples : will be compiled in CSS
[class*="#{$kna-namespace}grid-2"] {
@include grid(2);
}
[class*="#{$kna-namespace}grid-3"] {
@include grid(3);
}
[class*="#{$kna-namespace}grid-4"] {
@include grid(4);
}
[class*="#{$kna-namespace}grid-5"] {
@include grid(5);
}
[class*="#{$kna-namespace}grid-6"] {
@include grid(6);
}
[class*="#{$kna-namespace}grid-7"] {
@include grid(7);
}
[class*="#{$kna-namespace}grid-8"] {
@include grid(8);
}
[class*="#{$kna-namespace}grid-10"] {
@include grid(10);
}
[class*="#{$kna-namespace}grid-12"] {
@include grid(12);
@include media('>small-screen') {
@for $i from 2 through 12 {
[class*="#{$kna-namespace}grid-#{$i}"] {
@include grid(#{$i});
}
}
}
/* Responsive grid */
// "small-2" = 2 columns when small screen
// example : .grid-4-small-2 will be 4 then 2 columns
@media (max-width: $small-screen) {
// example : .grid-4-small-2 will be 1 column (tiny) then 2 columns (small) then 4 columns
@include media('>tiny-screen', '<=small-screen') {
[class*="-small-4"] > * {
width: calc(100% * 1 / 4 - #{$gutter} - .01px);
}
@ -125,22 +96,7 @@
width: calc(100% - #{$gutter} - .01px);
}
}
// "tiny-1" = 1 column when tiny screen
// example : .grid-4-small-2-tiny-1 will be 4 then 2 columns then 1 column
@media (max-width: $tiny-screen) {
[class*="-tiny-2"] > * {
width: calc(100% * 1 / 2 - #{$gutter} - .01px);
}
[class*="-tiny-2"] > .flex-item-double {
width: calc(100% - #{$gutter} - .01px);
}
[class*="-tiny-1"] > * {
width: calc(100% - #{$gutter} - .01px);
}
[class*="-tiny-1"] > .flex-item-double {
width: calc(100% - #{$gutter} - .01px);
}
}
// Sass mixins for *unequal* columns grid container
// example : .grid-perso { @include uneven-grid(2, 1); }
@ -151,21 +107,19 @@
> * {
@if $newgutter != $gutter {
margin-left: $newgutter;
width: calc(100% - #{$newgutter});
}
&:nth-child(odd) {
}
@include media('>small-screen') {
& :nth-child(odd) {
$size: ($left / ($left + $right)) * 100%;
width: calc(#{$size} - #{$newgutter});
}
&:nth-child(even) {
& :nth-child(even) {
$size: ($right / ($left + $right)) * 100%;
width: calc(#{$size} - #{$newgutter});
}
}
@media (max-width: $small-screen) {
& > *:nth-child(n) {
width: calc(100% - #{$newgutter});
}
}
}

View File

@ -47,7 +47,6 @@ html {
body {
font-size: $base-font-size;
background-color: $base-background;
color: $base-color;
font-family: $font-stack-common;

View File

@ -23,8 +23,8 @@
}
}
// hyphens on small screens
@media (max-width: $small-screen) {
// hyphens on tiny screens
@include media('<=tiny-screen') {
/* you shall not pass */
div,
textarea,
@ -40,7 +40,7 @@
}
// use .no-wrapping to disallow hyphens on small screens
@media (max-width: $small-screen) {
@include media('<=tiny-screen') {
.no-wrapping {
word-wrap: normal;
hyphens: manual;

View File

@ -1,4 +1,4 @@
/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
@ -85,11 +85,13 @@ template, /* 1 */
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent;
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
@ -248,14 +250,16 @@ hr {
========================================================================== */
/**
* Change font properties to `inherit` in all browsers (opinionated).
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea {
font: inherit;
font: inherit; /* 1 */
margin: 0; /* 2 */
}
/**
@ -269,30 +273,16 @@ optgroup {
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
* 2. Show the overflow in Edge, Firefox, and IE.
*/
button,
input, /* 1 */
select { /* 2 */
input { /* 1 */
overflow: visible;
}
/**
* Remove the margin in Safari.
* 1. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea { /* 1 */
margin: 0;
}
/**
* Remove the inheritence of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritence of text transform in Firefox.
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
@ -300,29 +290,10 @@ select { /* 1 */
text-transform: none;
}
/**
* Change the cursor in all browsers (opinionated).
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
cursor: pointer;
}
/**
* Restore the default cursor to disabled elements unset by the previous rule.
*/
[disabled] {
cursor: default;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
@ -337,8 +308,10 @@ html [type="button"], /* 1 */
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
@ -347,7 +320,9 @@ input::-moz-focus-inner {
*/
button:-moz-focusring,
input:-moz-focusring {
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
@ -406,19 +381,39 @@ textarea {
}
/**
* Correct the odd appearance of search inputs in Chrome and Safari.
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome on OS X and
* Safari on OS X.
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}

View File

@ -1,20 +1,8 @@
/* ----------------------------- */
/* ==desktop and HD devices */
/* ----------------------------- */
@media (min-width: ($medium-screen + 1)) {
/* rules for big resources and big screens like: background-images, font-faces, etc. */
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
/* style adjustments for high density devices */
}
/* ---------------------------------- */
/* ==Responsive large */
/* ---------------------------------- */
@media (min-width: ($medium-screen + 1)) {
@include media('>=large-screen') {
/* layouts for large screens */
.#{$kna-namespace}large-hidden {
@ -86,8 +74,7 @@
/* ---------------------------------- */
/* ==Responsive medium */
/* ---------------------------------- */
@media (min-width: ($small-screen + 1)) and (max-width: $medium-screen) {
@include media('>=medium-screen', '<large-screen') {
/* layouts for medium screens */
.#{$kna-namespace}medium-hidden {
@ -162,7 +149,7 @@
/* ==Responsive small */
/* ---------------------------------- */
@media (min-width: ($tiny-screen + 1)) and (max-width: $small-screen) {
@include media('>=small-screen', '<medium-screen') {
/* quick reset in small resolution and less */
.#{$kna-namespace}w600p,
@ -253,7 +240,7 @@
/* ==Responsive tiny */
/* ---------------------------------- */
@media (max-width: $tiny-screen) {
@include media('<small-screen') {
/* quick small resolution reset */
.#{$kna-namespace}mod,

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,28 +1,37 @@
// Sass config file
/*!
* www.KNACSS.com V5.0.0 (16 mai 2016) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
*/
// This is the global Sass imports file
// -----------------
// (WARNING : you should comment this line and move config file from vendor/knacss folder to your own folder)
@import "_00-config";
// normalize and include-media imports
@import "_normalize/_normalize.scss"; // normalize
@import "_include-media/_include-media.scss"; // include-media
// normalize include
@import "_01a-normalize"; // normalize
// (WARNING : you should comment this line and move config file from vendor/knacss folder to your own project folder)
@import "_config-variables.scss";
// Sass base styles
@import "_01b-base"; // reset and basic styles
// Libraries
@import "_library-base.scss"; // reset and basic styles
@import "_library-print.scss"; // print quick reset
@import "_library-styling.scss"; // minor stylings
@import "_library-misc.scss"; // skip links, hyphens
// @import "_library-wordpress.scss"; // WordPress reset and basic styles
// Sass files : chose the ones you need
@import "_02-layout"; // alignment, modules, positionning
@import "_03-grids"; // grids
@import "_04-tables"; // data tables consistency
@import "_05-forms"; // forms consistency
@import "_06-helpers"; // width and spacers visually classes
@import "_07-responsive"; // Responsive Web Design helpers
@import "_08-print"; // print quick reset
@import "_09-misc"; // skip links, google maps and hyphens
@import "_10-styling"; // minor stylings
// Layout
@import "_layout-general.scss"; // alignment, modules, positionning
@import "_layout-grids.scss"; // grids
// Objects
@import "_object-tables.scss"; // data tables consistency
@import "_object-forms.scss"; // forms consistency
// Overrides
@import "_override-helpers.scss"; // width and spacers helpers
@import "_override-responsive.scss"; // Responsive Web Design helpers
// WordPress base styles
// @import "_11-wordpress"; // WordPress reset and basic styles
/* ----------------------------- */
/* ==own stylesheet */