Skip to content

Instantly share code, notes, and snippets.

@Ourelius
Forked from leemour/Compass
Last active August 29, 2015 14:20
Show Gist options
  • Save Ourelius/c5d70b21d2c160754b41 to your computer and use it in GitHub Desktop.
Save Ourelius/c5d70b21d2c160754b41 to your computer and use it in GitHub Desktop.
# 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