Skip to content

Commit

Permalink
Some improvements to Compass.
Browse files Browse the repository at this point in the history
  • Loading branch information
greendog99 committed Apr 7, 2011
1 parent 6591de1 commit a94864f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 42 deletions.
35 changes: 35 additions & 0 deletions Documentation.md
Expand Up @@ -37,3 +37,38 @@ Helper classes:

## CSS (from Compass)

For full details of Compass CSS features, see <http://compass-style.org/docs/reference/compass/>

Compass mixins can be used in SASS by prefixing with a plus-sign or with @include:

div
+border-radius(25px)
@include border-radius(25px)

Some useful features to check out:
* @include border-radius(pixels)
* @include box-shadow(color, h-offset, v-offset, blur, spread, inset)
* @include linear-gradient(color-stops, start, image)
* @include opacity(value)
* @include float(left or right)
* @inlcude min-height(value)
* @include min-width(value)
* @include sprite-img(img, col, row, width, height, margin)

Text:
* @include font-face(name, files, eot)
* @include text-shadow(color, h-offset, v-offset, blur)
* @include nowrap
* @include replace-text(img, x, y)
* @include hide-text

Links:
* @include link-colors(normal, hover, active, visited, focus)
* @include unstyled-link

Lists:
* @include no-bullet
* @include no-bullets
* @include horizontal-list
* @include inline-list

5 changes: 5 additions & 0 deletions files/app/stylesheets/screen.sass
@@ -0,0 +1,5 @@
// In this file you should write your main styles or centralize your imports
// Automatically imports compass/CSS3 and compass/Utilities
// See http://compass-style.org/docs/reference/compass/
@import compass
35 changes: 0 additions & 35 deletions files/app/stylesheets/style.sass

This file was deleted.

4 changes: 4 additions & 0 deletions partials/_compass.rb
Expand Up @@ -6,6 +6,10 @@

run "compass init rails --syntax sass -c config/compass.rb --force > /dev/null"

# Need to override the default compass screen.sass file after it's created
remove_file 'app/stylesheets/screen.sass'
copy_static_file 'app/stylesheets/screen.sass'

git :add => '.'
git :commit => "-aqm 'Initialized Compass.'"

Expand Down
11 changes: 5 additions & 6 deletions partials/_stylesheets.rb
Expand Up @@ -2,13 +2,12 @@

puts "Creating default stylesheets ...".magenta

remove_file 'app/stylesheets/partials/_example.sass'

%w{grid page buttons flashes forms tables}.each do |component|
copy_static_file "app/stylesheets/partials/_#{component}.sass"
end

copy_static_file "app/stylesheets/style.sass"
# %w{grid page buttons flashes forms tables}.each do |component|
# copy_static_file "app/stylesheets/partials/_#{component}.sass"
# end
#
# copy_static_file "app/stylesheets/style.sass"

git :add => '.'
git :commit => "-aqm 'Added stylesheets.'"
Expand Down
4 changes: 3 additions & 1 deletion template.rb
Expand Up @@ -55,7 +55,7 @@ def download_file(uri_string, destination)
apply "#{@partials}/_rvm.rb" # Must be after gemfile since it runs bundler
apply "#{@partials}/_boilerplate.rb"
apply "#{@partials}/_compass.rb"
# apply "#{@partials}/_stylesheets.rb"
apply "#{@partials}/_stylesheets.rb"
apply "#{@partials}/_helpers.rb"
apply "#{@partials}/_appconfig.rb"
apply "#{@partials}/_rspec.rb"
Expand All @@ -66,6 +66,8 @@ def download_file(uri_string, destination)
# apply "#{@partials}/_forgery.rb"
# apply "#{@partials}/_demo.rb"

run "#{@rvm} exec rails generate scaffold post title:string body:text"

puts "\n========================================================="
puts " INSTALLATION COMPLETE!".yellow.bold
puts "=========================================================\n\n\n"

0 comments on commit a94864f

Please sign in to comment.