User Tools

Site Tools


sass

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sass [2014/11/23 21:43] adminsass [2021/12/06 22:32] (current) – removed admin
Line 1: Line 1:
-====== Sass ====== 
  
-===== Required software ===== 
- 
-  * a recent version of Ruby 
-  * compass 
-  * css_parser 
- 
- 
- 
-**Install required gems** 
- 
-  gem install compass 
-  gem install css_parser 
- 
- 
- 
-===== config.rb file ===== 
- 
-This file contains all the configuration 
- 
-<code ruby config.rb> 
-if RUBY_VERSION =~ /1.9/ 
-    Encoding.default_external = Encoding::UTF_8 
-    Encoding.default_internal = Encoding::UTF_8 
-end 
-relative_assets = true 
- 
-################################## 
-# ENVIROMENT INDEPENDANT SETTINGS! 
-################################## 
- 
-# WHERE COMPILED FILES WILL BE COPIED TO 
-css_dir = "../css"  
-# USE ALL *.scss FILES IN THIS FOLDER 
-sass_dir = "."  
- 
-# IMAGE SOURCE DIR 
-images_path = "./"  
- 
-# IMAGE TARGET DIR 
-images_dir = "../images"  
- 
-############################################################# 
-# Settings to override when enviroment param is given 
-# Invoke from command line: compass watch -e YOUR_ENV --force 
-############################################################# 
- 
-# To be used for Development - feel free to modify as needed 
-if environment == :development  
-  output_style = :expanded 
-  sass_options = {:debug_info => true} 
-end 
- 
-# To be used for Production 
-if environment == :production  
-  output_style = :compressed 
-  sass_options = {:debug_info => false} 
-end 
-</code> 
- 
-===== Main Scss File ===== 
- 
- 
-<code sass main.scss> 
-@charset "UTF-8"; 
- 
-// Include libraries 
-@import "compass"; 
- 
-// Include modules - *.scss-Files 
-@import "Chapter"; 
- 
-// IMPORT SPRITE UTILITY 
-@import "compass/utilities/sprites"; 
- 
-// PATH RELATIVE TO config.rb:images_path 
-// IMPORTS ALL IMAGES FROM FOLDER AND GENERATES A SPRITE INCL. CSS. THIS DOES NOT INCLUDE SUBFOLDERS 
-@import "images/*.png"; 
-// GENERATE IMAGE SIZES AND INCLUDE IMAGES 
-$images-sprite-dimensions: true; 
-@include all-images-sprites; 
-</code> 
- 
- 
-===== Using sass ===== 
- 
-If you have created a folder containing config.rb and main.scss you are ready. Make sure you have created the css target folder and you have included all needed scss file by using: @import "YourFileName"; 
- 
-Create css files automatically when changed 
- 
-  compass watch 
- 
-Manually trigger compilation 
- 
-  compass compile 
- 
-Force compilation of specific enviroment 
- 
-  compass compile -e production --force 
sass.1416775397.txt.gz · Last modified: 2014/11/23 21:43 by admin