Tutorial Compass, CSS trop facile avec SCSS et SASS Compass est un framework qui permet de compiler des feuilles de style css en utilisant SCSS ou SASS. Cet outil permet d’intégrer des frameworks CSS tel que blueprint. Il met également à disposition une API pour une intégration HTML et CSS3 propre et productive. Les limites de CSS A l’air des sites web dynamiques et des supports mobiles, le concept de feuille de style semble souffrir de quelques faiblesses. Mise en place rapide d’un bootstrap avec Compass Compass est développé en ruby, il faut donc s’assurer que la machine sur laquelle vous développez possède un interpréteur ruby d’installé. Pour installer compass Pour créer un nouveau projet, il suffit de lancer la commande suivante : Il est possible de changer certains paramètres (tels que le noms des répertoires des différents assets) en ajoutant les options suivantes : Dans le cas d’un projet Rails, il suffit d’ajouter compass-rails dans le GemFile, et de recréer le bundle de votre application. Synthaxe d’écriture du SCSS ou du SASS
CodeKit — THE Mac App For Web Developers Simplifiez-vous la vie avec LESS La partie fun du cours commence. Vous allez apprendre à utiliser LESS pas à pas. On commence ? Veuillez noter que CSS est totalement compatible avec LESS, ce qui signifie que vous pourrez tout à fait utiliser du CSS pur dans votre code si vous le souhaitez. Constantes Tout d’abord, LESS vous permet d’utiliser des constantes. un bleu électrique (#17B6FF) ;un magenta pétant (#FF17B6) ;un vert citron (#B6FF17) ;un vert acide (#1BFF17). Si vous décidez de changer une des couleurs de votre palette, vous allez devoir vous battre avec votre éditeur à coups de « rechercher / remplacer ». LESS générera le CSS suivant : On pourrait pousser un peu plus loin le concept en utilisant des noms de variables plus ciblés : Vous pouvez utiliser des variables de différents types (couleurs, dimensions, pourcentages, chaînes de caractères, etc.). Classes abstraites Les classes abstraites peuvent être comparées à des fonctions. Si vous souhaitez utiliser plusieurs paramètres, séparez-les par des virgules. Imbrication
Sass vs. LESS "Which CSS preprocessor language should I choose?" is a hot topic lately. I've been asked in person several times and an online debate has been popping up every few days it seems. It's nice that the conversation has largely turned from whether or not preprocessing is a good idea to which one language is best. Let's do this thing. Really short answer: Sass Slightly longer answer: Sass is better on a whole bunch of different fronts, but if you are already happy in LESS, that's cool, at least you are doing yourself a favor by preprocessing. Much longer answer: Read on. The Much Longer Answer The Learning Curve with Ruby and Command Line and Whatever The only learning curve is the syntax. Winner: Nobody Helping with CSS3 With either language, you can write your own mixins to help with vendor prefixes. In Sass, you can use Compass, and Compass will keep itself updated, and thus the prefix situation is handled for you. In LESS, there are also some mixin libraries battling to be the best. See that?
Sass: Install Sass Applications There are a good many applications that will get you up and running with Sass in a few minutes for Mac, Windows, and Linux. You can download most of the applications for free but a few of them are paid apps (and totally worth it). CodeKit (Paid) Mac Ghostlab (Paid) Mac Windows Hammer (Paid) Mac LiveReload (Paid, Open Source) Mac Windows Prepros (Paid) Mac Windows Linux Scout-App (Free, Open Source) Windows Linux Mac Libraries The Sass team maintains two Node.js packages for Sass, both of which support the standard JavaScript API. There are also community-maintained wrappers for the following languages: Java, including a Gradle plugin. Command Line When you install Sass on the command line, you'll be able to run the sass executable to compile .sass and .scss files to .css files. sass source/stylesheets/index.scss build/stylesheets/index.css First install Sass using one of the options below, then run sass --version to be sure it installed correctly. Learn More About Sass
mxcl/homebrew Installing Rails on OS X Lion with HomeBrew, RVM and Mysql » Ruby, Rails, OSX and Linux fun | Ruby, Rails, OSX and Linux fun Bye Bye Macports, Welcome Homebrew DefinitionHomebrew: The missing package manager for OS X Why? well, the reality is, macports is not that good anymore. Homebrew is very easy to install, it’s fast and simple. Back to topic, this is you how you get rails with mysql up and running with homebrew and rvm. Clean up To make sure to have a clean install, I recommend removing any previous .rvm installation and previous Xcode. $ rm -rf ~/.rvm/ $ sudo rm -rf /Developer 1. Install Xcode from AppStore. it’s 1+ GB download so it may take a while. after it’s downloaded it will not install automatically, you need to open Applications and install again from there, the name will be “Install Xcode”. Better way is to go to and download from there, you will have to login with a free apple developer account. - Xcode 4.3.1 for Lion (1.85 GB) - Command Line Tools for Xcode (171.70 MB) 2. mkdir -p /usr/local/Cellar 3. install RVM 4. See: Rails booting a lot faster.