Download and install sass and compass in ruby, and reference css styles.

Source: Internet
Author: User

Download and install sass and compass in ruby, and reference css styles.

It is very convenient to use scss to write css. The first is ruby download and installation, is the http://rubyinstaller.org/downloads. After the download, open the installation file and click Next to install it. Note that

Check the following to prevent future commands from being found.
After the installation is complete, click it to open it.
Run the gem install sass command.

Then wait until the installation is complete. The first installation may take a long time or be blocked. Try multiple times.
You can.
Next, install compass and run the gem install compass command.

And then wait for installation.
After the installation is complete, run sass-v and compass-v. Indicates that the installation is successful.
For usage, for example, if you create a project named test under the edisk, first enter the test of the edisk.

Create a folder in test to store css styles and run the compass create style command.

Press enter to generate a lot of code, and the style file is created,
These files are generated in the style folder:

Then enter the following content in the black box above.

It indicates that the listener is successful, and then you can write styles in the files in the sass folder (for example, in ie. scss ).

Reference stylesheets or css files in the stylesheets folder, such

<Link style = "stylesheet" href = "style/stylesheets/ie.css">

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.