Created
May 8, 2014 10:15
-
-
Save masamitsu-konya/b875a7eff0321c74ce97 to your computer and use it in GitHub Desktop.
CSSが超絶便利になる!Compassについてまとめてみた ref: http://qiita.com/masamitsu-konya/items/8ae3ed489aef1388814a
This file contains 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
div { | |
text-indent: -119988px; | |
overflow: hidden; | |
text-align: left; | |
background-image: url(/icon/iconmonstr-archive-icon-256.png); | |
background-repeat: no-repeat; | |
background-position: 50% 50%; | |
} |
This file contains 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
div { | |
@include replace-text('/icon/iconmonstr-archive-icon-256.png'); | |
} |
This file contains 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
gem update --system | |
gem install compass |
This file contains 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 project名 |
This file contains 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 compass-test |
This file contains 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
# Require any additional compass plugins here. | |
# Set this to the root of your project when deployed: | |
http_path = "/" #HTTPパス | |
css_dir = "stylesheets" #cssが書き出されるディレクトリ名 | |
sass_dir = "sass" #sass(scss)ファイルがあるディレクトリ名 | |
images_dir = "images" #画像を置くディレクトリ名 | |
javascripts_dir = "javascripts" #javascriptを置くディレクトリ名 | |
# You can select your preferred output style here (can be overridden via the command line): | |
# output_style = :expanded or :nested or :compact or :compressed | |
output_style = :expanded #CSSへの書き出しスタイル | |
# To enable relative paths to assets via compass helper functions. Uncomment: | |
relative_assets = true | |
# To disable debugging comments that display the original location of your selectors. Uncomment: | |
line_comments = false | |
# If you prefer the indented syntax, you might want to regenerate this | |
# project again passing --syntax sass, or you can uncomment this: | |
# preferred_syntax = :sass | |
# and then run: | |
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass |
This file contains 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
cd compass-test | |
compass watch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment