WIN7 System installs Ruby and uses sass

Source: Internet
Author: User
Tags sublime text css preprocessor

Not long ago, my friend told me that sass to write CSS is very good, I tried to use, then in the use of SASS when the installation is also a point of time, then I tidied up the installation and use of some of the things, share, so that you want to use sass to write CSS classmate less go some installation detours, here only for WI Ndows under Install Mode (Linux or OS X please move), okay crap don't say go directly to the topic

1. Download the ruby package first and install it (1.8.7 installed here) Please tick the following three boxes on the installation: HTTP://DL.DBANK.COM/C0E1B2PTMK

2. Open Ruby's command Panel (black window for ruby) and enter the Gem install Haml (wait a few seconds for the installation process) and Gem Installsass

3. Sass is a "CSS preprocessor" that allows the development of CSS to be simple and maintainable. But only with compass can it show real power, so let's use compass now. Open the command line (black window of the system) enter the Gem install compass (in fact, this line of command should be in the second step of the input together, here I did not try, interested students can go to try) here can refer to this master's blog/http/ Www.ruanyifeng.com/blog/2012/11/compass.html

4. Exciting time to create the Sass file, I intend to create a MyProject folder in the E-disk, then enter the compass create myproject (filename) in the black window

5. Then the sass file is automatically compiled with CSS synchronization, in the Black window input command line Compass Watch

6. Create a new Sass file in the MyProject folder named Style.scss, at which point you will find that the stylesheets This folder is synchronized with a style.css file, then in the project use you can refer to this style.css file, and you write is Style.scss file

7. The Sass code written in sublime text will not be highlighted, then need a plugin in this good person's blog to download the plugin http://www.csssea.com/?p=1818, unzip the downloaded plugin, extract the second layer of files (shown) paste into Sublime text in the browser package inside the Emmet file (remember to paste into the file, do not overwrite the file, or sublime Tex will have problems), restart the sublime text at this time a long absence of feeling back, the next thing is to free your Sass Code Bar ...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.