Last active
December 19, 2015 03:18
-
-
Save leemour/5889020 to your computer and use it in GitHub Desktop.
Compass with Sass without Rails. Gem 'compass' and gem 'bootstrap-sass'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compass create --syntax sass --sass-dir "app/assets/stylesheets" --css-dir "public/stylesheets" --javascripts-dir "app/assets/javascripts" --images-dir "public/images" | |
compass create -r bootstrap-sass --using bootstrap --syntax sass --sass-dir "app/assets/stylesheets" --css-dir "public/stylesheets" --javascripts-dir "app/assets/javascripts" --images-dir "public/images" | |
# compass create compass-test -r bootstrap-sass --using bootstrap --syntax sass | |
# Result: | |
Congratulations! Your compass project has been created. | |
You may now add and edit sass stylesheets in the sass subdirectory of your project. | |
Sass files beginning with an underscore are called partials and won't be | |
compiled to CSS, but they can be imported into other sass stylesheets. | |
You can configure your project by editing the config.rb configuration file. | |
You must compile your sass stylesheets into CSS when they change. | |
This can be done in one of the following ways: | |
1. To compile on demand: | |
compass compile [path/to/project] | |
2. To monitor your project for changes and automatically recompile: | |
compass watch [path/to/project] | |
More Resources: | |
* Website: http://compass-style.org/ | |
* Sass: http://sass-lang.com | |
* Community: http://groups.google.com/group/compass-users/ | |
To import your new stylesheets add the following lines of HTML (or equivalent) to your webpage: | |
<head> | |
<link href="/stylesheets/styles.css" rel="stylesheet" type="text/css" /> | |
</head> | |
# OR | |
<link href="/public/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> | |
<link href="/public/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" /> | |
<!--[if IE]> | |
<link href="/public/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" /> | |
<![endif]--> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment