Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Dernière révision Les deux révisions suivantes | ||
devweb:less [21-09-2013 22:34] edmc73 |
devweb:less [03-02-2015 17:14] edmc73 [CSS3] |
||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
===== Installation ===== | ===== Installation ===== | ||
+ | |||
+ | ==== Méthode la plus simple ==== | ||
+ | |||
+ | apt-get install python g++ make checkinstall | ||
+ | src=$(mktemp -d) && cd $src | ||
+ | wget -N http:// | ||
+ | tar xzvf node-latest.tar.gz && cd node-v* | ||
+ | ./configure | ||
+ | checkinstall -y --install=no --pkgversion 0.10.25 | ||
+ | dpkg -i node_* | ||
+ | |||
+ | Installez less | ||
+ | npm install -g less | ||
+ | |||
+ | Pour désinstaller | ||
+ | dpkg -r node | ||
+ | |||
+ | |||
+ | ==== Méthode plus longue... ==== | ||
# être root | # être root | ||
Ligne 28: | Ligne 47: | ||
make install | make install | ||
- | #Installer less | + | |
+ | Installer less | ||
npm install -g less | npm install -g less | ||
| | ||
Ligne 47: | Ligne 68: | ||
$ lessc styles.less > styles.css | $ lessc styles.less > styles.css | ||
+ | | ||
+ | Pour minifier le code, il faut installer YUI Compressor | ||
+ | |||
+ | $ aptitude install yui-compressor | ||
+ | | ||
To output minified CSS, simply pass the **-x** option. If you would like more involved minification, | To output minified CSS, simply pass the **-x** option. If you would like more involved minification, | ||
To see all the command line options run lessc without parameters. | To see all the command line options run lessc without parameters. | ||
+ | |||
+ | Un petit script pour automatiser tout ça | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | cd `dirname $0` | ||
+ | lessc --yui-compress public/ | ||
+ | </ | ||
+ | ===== Mixins library ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | To use:\\ | ||
+ | Download the " | ||
+ | Place it in the same folder with your other LESS files.\\ | ||
+ | Reference it at the top of your LESS stylesheets with:\\ | ||
+ | |||
+ | @import " | ||
+ | |||
+ | |||
+ | |||
+ | https:// |