background preloader

Sass

Facebook Twitter

Using Compass in WebStorm. Sass and SCSS extend CSS with variables, mixins, selector inheritance and other nice features that make CSS much friendlier for modern development.

Using Compass in WebStorm

The Compass framework is built on Sass, adds a variety of great reusable patterns, and in general makes development with Sass and SCSS much better. Follow these steps to set up Compass for your project in WebStorm. First, make sure that Ruby is installed on your computer. Then install Compass (you can totally use the built-in Terminal in WebStorm for that): gem install compass You can find a little bit more information on Compass installation here: If you’d like to use Compass in the new project, you can run the command: compass init in WebStorm’s Terminal. Now let’s create a new .scss (or .sass) file. WebStorm will suggest adding a new File Watcher for automatic compilation of SCSS/Sass to CSS.

Type@import “compass” WebStorm is not aware of the Compass configuration yet. Check Enable Compass. For example, we have a project structure like this: Sass: Sass Basics. Before you can use Sass, you need to set it up on your project.

Sass: Sass Basics

If you want to just browse here, go ahead, but we recommend you go install Sass first. Go here if you want to learn how to get everything setup. Working with Sass and SCSS in Compass Projects. PhpStorm supports development in projects structured in compliance with the Compass framework.

Working with Sass and SCSS in Compass Projects

This framework uses Sass and SCSS extensions of CSS. On this page: Preparing for Compass development The Compass framework is installed through the Ruby Gem manager, therefore you need to install Ruby first. Download and install Ruby. Setting up a Compass project You can have a project set up according to the Compass requirements in two ways: create a new Compass project or create an empty project and introduce a Compass-specific structure in it. During project set-up, a conf.rb configuration file is generated. To set up the Compass-specific structure in an existing project: Open the desired project in PhpStorm. Integrating Compass with PhpStorm To develop a Compass-specific project in PhpStorm, you need to specify the Compass executable file compass and the project configuration file config.rb. Creating a Compass Sass or a Compass SCSS transpiler Make sure the File Watchers plugin is enabled.

Compass Transition. @mixin transition($transitions...) { $default: (compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay),);

Compass Transition

Codecademy. Tutoriel pour apprendre SASS et Compass. Salut à toi très cher MMI !

Tutoriel pour apprendre SASS et Compass

Aujourd’hui, j’ai le plaisir de te présenter cette mini série d’articles, j’ai nommé « Booste ton Workflow ». L’objectif est simple : Te présenter les outils d’aujourd’hui et de demain qui vont faire de toi une bête du front. Ma mission ? Faire de toi un intégrateur d’enfer que tout le monde voudra s’arracher. Tu intègreras les maquettes plus vite que ton ombre, sans relâche tu ne CSSras jamais avant d’être satisfait. SASS (Syntactically Awesome Style Sheets) Le sujet du jour, c’est le CSS, et plus particulièrement son évolution. Pour Windows Il faut commencer par installer Ruby. Pour Mac OS Sur mac, c’est relativement simple.

Si tout va bien, tu es prêt pour te lancer dans SASS ! Faire fonctionner SASS Pour faire fonctionner SASS on va avoir besoin de deux choses : Un invité de commande ou terminal (le même que celui utilisé pour l’install si tu es sur Windows)Un projet de test Très rapidement, je vais faire une structure très basique telle que : Que c’est beau.