diff --git a/VERSION.yml b/VERSION.yml index a121ef30..d1d12a74 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -1,5 +1,4 @@ --- -:patch: 0 :major: 0 :minor: 11 :state: alpha diff --git a/compass.gemspec b/compass.gemspec index c7b20da9..20350f28 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |gemspec| gemspec.require_paths = %w(lib) gemspec.rubygems_version = "1.3.6" gemspec.summary = %q{A Real Stylesheet Framework} - gemspec.add_dependency('haml', '>= 3.0.0') + gemspec.add_dependency('haml', '>= 3.0.4') gemspec.files = %w(README.markdown LICENSE.markdown VERSION.yml Rakefile) gemspec.files += Dir.glob("bin/*") gemspec.files += Dir.glob("examples/**/*.*") diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index bb8210d5..fcf9414a 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -7,21 +7,35 @@ layout: article COMPASS CHANGELOG ================= -0.11.0.alpha.1 --------------- +<<<<<<< HEAD:doc-src/content/CHANGELOG.markdown +0.11.alpha.1 +------------ * Deprecated imports and APIs from v0.10 have been removed. -0.10.1 (May 13, 2010) ---------------------- +0.10.1 (May 15, 2010) +* Fixed a regression in the Blueprint module, the blueprint reset + was no longer automatically applying the reset styles. This behavior + is restored in this release. If you `@import blueprint/reset` and + then apply the reset mixin yourself, you should remove the mixin + call or change your import to `blueprint/reset/utilities`. * Added a subcommand for emitting sass imports for the sass CLI. * Added a subcommand for listing the available frameworks. +* Fixed a number of bugs related to Sass & Rails integration +* Fixed some documentation issues in the command line and on the website. 0.10.0 (May 10, 2010) --------------------- -This changelog entry is condensed from a very long beta release. You can read [the 0.10.0 beta release notes here](/docs/CHANGELOG-v0-10-0-beta/). +This changelog entry is condensed from a very long beta release. You can read [the 0.10.0 beta release notes here](/docs/CHANGELOG-v0-10-0-beta/). + +### Gem Location + +The compass gem is now (and has been for some time) hosted on [rubygems.org](http://rubygems.org). If you have an old version +installed from github, please remove it: + + sudo gem uninstall chriseppstein-compass ### Sass 3: diff --git a/doc-src/content/reference/blueprint/reset.haml b/doc-src/content/reference/blueprint/reset.haml index a7613fe0..ab605898 100644 --- a/doc-src/content/reference/blueprint/reset.haml +++ b/doc-src/content/reference/blueprint/reset.haml @@ -10,4 +10,5 @@ classnames: --- - render 'reference' do %p - A reset and base styling. + A reset and base styling automatically applied to your webpage + by importing this module. diff --git a/doc-src/content/reference/blueprint/reset/utilities.scss b/doc-src/content/reference/blueprint/reset/utilities.scss new file mode 100644 index 00000000..6a3a71fc --- /dev/null +++ b/doc-src/content/reference/blueprint/reset/utilities.scss @@ -0,0 +1,13 @@ +--- +title: Blueprint Reset +crumb: Reset +framework: blueprint +stylesheet: blueprint/reset/_utilities.scss +layout: blueprint +classnames: + - reference + - blueprint +--- +- render 'reference' do + %p + Utility mixins for applying a reset and base styling. diff --git a/features/command_line.feature b/features/command_line.feature index 93bf2e6b..48f9bc6d 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -158,8 +158,10 @@ Feature: Command Line | watch | And I should see the following "other" commands: | config | + | frameworks | | grid-img | | help | + | imports | | install | | interactive | | stats | diff --git a/frameworks/blueprint/stylesheets/blueprint/_reset.scss b/frameworks/blueprint/stylesheets/blueprint/_reset.scss index 620d68be..934a63ea 100644 --- a/frameworks/blueprint/stylesheets/blueprint/_reset.scss +++ b/frameworks/blueprint/stylesheets/blueprint/_reset.scss @@ -1,58 +1,3 @@ -// Global reset rules. -// For more specific resets, use the reset mixins provided below -@mixin blueprint-global-reset { - html, body { - @include blueprint-reset; } - html { - font-size: 100.01%; } - @include blueprint-nested-reset; } +@import "reset/utilities"; -// Reset all elements within some selector scope.To reset the selector itself, -// mixin the appropriate reset mixin for that element type as well. This could be -// useful if you want to style a part of your page in a dramatically different way. -@mixin blueprint-nested-reset { - div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, - pre, a, abbr, acronym, address, code, del, dfn, em, img, - dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { - @include blueprint-reset; } - blockquote, q { - @include blueprint-reset-quotation; } - th, td, caption { - @include blueprint-reset-table-cell; } - table { - @include blueprint-reset-table; } - a img { - border: none; } } - -@mixin blueprint-reset-box-model { - margin: 0; - padding: 0; - border: 0; } - -@mixin blueprint-reset { - @include blueprint-reset-box-model; - font: { - weight: inherit; - style: inherit; - size: 100%; - family: inherit; }; - vertical-align: baseline; } - -@mixin blueprint-reset-quotation { - @include blueprint-reset; - quotes: "" ""; - &:before, - &:after { - content: ""; } } - -@mixin blueprint-reset-table-cell { - @include blueprint-reset; - text-align: left; - font-weight: normal; - vertical-align: middle; } - -@mixin blueprint-reset-table { - @include blueprint-reset; - border-collapse: separate; - border-spacing: 0; - vertical-align: middle; } +@include blueprint-global-reset; \ No newline at end of file diff --git a/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss b/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss new file mode 100644 index 00000000..620d68be --- /dev/null +++ b/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss @@ -0,0 +1,58 @@ +// Global reset rules. +// For more specific resets, use the reset mixins provided below +@mixin blueprint-global-reset { + html, body { + @include blueprint-reset; } + html { + font-size: 100.01%; } + @include blueprint-nested-reset; } + +// Reset all elements within some selector scope.To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +@mixin blueprint-nested-reset { + div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, + pre, a, abbr, acronym, address, code, del, dfn, em, img, + dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { + @include blueprint-reset; } + blockquote, q { + @include blueprint-reset-quotation; } + th, td, caption { + @include blueprint-reset-table-cell; } + table { + @include blueprint-reset-table; } + a img { + border: none; } } + +@mixin blueprint-reset-box-model { + margin: 0; + padding: 0; + border: 0; } + +@mixin blueprint-reset { + @include blueprint-reset-box-model; + font: { + weight: inherit; + style: inherit; + size: 100%; + family: inherit; }; + vertical-align: baseline; } + +@mixin blueprint-reset-quotation { + @include blueprint-reset; + quotes: "" ""; + &:before, + &:after { + content: ""; } } + +@mixin blueprint-reset-table-cell { + @include blueprint-reset; + text-align: left; + font-weight: normal; + vertical-align: middle; } + +@mixin blueprint-reset-table { + @include blueprint-reset; + border-collapse: separate; + border-spacing: 0; + vertical-align: middle; } diff --git a/frameworks/compass/templates/extension/manifest.rb b/frameworks/compass/templates/extension/manifest.rb index 0f92706a..89efbe21 100644 --- a/frameworks/compass/templates/extension/manifest.rb +++ b/frameworks/compass/templates/extension/manifest.rb @@ -12,7 +12,7 @@ help %Q{ welcome_message %Q{ For a full tutorial on how to build your own extension see: -http://github.com/chriseppstein/compass/blob/edge/docs/EXTENSIONS.markdown +http://compass-style.org/docs/tutorials/extensions/ }, :replace => true diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb index 41072844..bb66436d 100644 --- a/lib/compass/app_integration/rails/installer.rb +++ b/lib/compass/app_integration/rails/installer.rb @@ -26,7 +26,7 @@ module Compass end def config_files_exist? - File.exists?(targetize('config/compass.config')) && + File.exists?(targetize('config/compass.rb')) && File.exists?(targetize('config/initializers/compass.rb')) end @@ -38,11 +38,22 @@ module Compass if options[:create] puts <<-NEXTSTEPS - Congratulations! Your rails project has been configured to use Compass. - Sass will automatically compile your stylesheets during the next - page request and keep them up to date when they change. - Make sure you restart your server! - NEXTSTEPS +Congratulations! Your rails project has been configured to use Compass. +Just one more thing left to do: Register the compass gem. + +In Rails 2.2 & 2.3, add the following to your evironment.rb: + + config.gem "compass", :version => ">= #{Compass::VERSION}" + +In Rails 3, add the following to your Gemfile: + + gem "compass", ">= #{Compass::VERSION}" + +Then, make sure you restart your server. + +Sass will automatically compile your stylesheets during the next +page request and keep them up to date when they change. +NEXTSTEPS end if manifest.has_stylesheet? puts "\nNext add these lines to the head of your layouts:\n\n" diff --git a/lib/compass/commands/create_project.rb b/lib/compass/commands/create_project.rb index 621da66a..c714b023 100644 --- a/lib/compass/commands/create_project.rb +++ b/lib/compass/commands/create_project.rb @@ -68,7 +68,7 @@ module Compass if command.to_sym == :create "Create a new compass project" else - "Initialize an existing project" + "Add compass to an existing project" end end diff --git a/lib/compass/commands/watch_project.rb b/lib/compass/commands/watch_project.rb index 533f676b..62bd3316 100644 --- a/lib/compass/commands/watch_project.rb +++ b/lib/compass/commands/watch_project.rb @@ -97,6 +97,10 @@ module Compass end class << self + def description(command) + "Compile Sass stylesheets to CSS when they change" + end + def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index b9884fd0..ea761389 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -55,7 +55,12 @@ module Compass def configure_sass_plugin! @sass_plugin_configured = true - Sass::Plugin.options.merge!(sass_plugin_configuration) + config = sass_plugin_configuration + locations = config.delete(:template_location) + Sass::Plugin.options.merge!(config) + locations.each do |sass_dir, css_dir| + Sass::Plugin.add_template_location sass_dir, css_dir + end end def sass_plugin_configured? diff --git a/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb b/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb deleted file mode 100644 index 92e9093e..00000000 --- a/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'sass/plugin' - -# XXX: We can remove this monkeypatch once Sass 2.2 is released. -module Sass::Plugin - - # splits the stylesheet_needs_update? method into two pieces so I can use the exact_stylesheet_needs_update? piece - module StylesheetNeedsUpdate - def stylesheet_needs_update?(name, template_path, css_path) - css_file = css_filename(name, css_path) - template_file = template_filename(name, template_path) - exact_stylesheet_needs_update?(css_file, template_file) - end - def exact_stylesheet_needs_update?(css_file, template_file) - if !File.exists?(css_file) - return true - else - css_mtime = File.mtime(css_file) - File.mtime(template_file) > css_mtime || - dependencies(template_file).any?(&dependency_updated?(css_mtime)) - end - end - end - - # At some point Sass::Plugin changed from using the metaclass to extend self. - metaclass = class << self; self; end - if metaclass.included_modules.include?(Sass::Plugin) - if method(:stylesheet_needs_update?).arity == 2 - alias exact_stylesheet_needs_update? stylesheet_needs_update? - elsif !method_defined?(:exact_stylesheet_needs_update?) - include StylesheetNeedsUpdate - end - else - class << self - unless method_defined?(:exact_stylesheet_needs_update?) - include StylesheetNeedsUpdate - end - end - end - -end