diff --git a/.travis.yml b/.travis.yml index a388edde..0d7fa848 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ rvm: - 1.8.7 - 1.9.2 + - 1.9.3 - jruby - rbx - ree diff --git a/Gemfile b/Gemfile index 9d4eac85..15601958 100644 --- a/Gemfile +++ b/Gemfile @@ -2,28 +2,27 @@ source :rubygems gemspec -gem "cucumber", "~> 0.9.2" +gem "cucumber", "~> 1.1.4" gem "rspec", "~>2.0.0" -gem "rails", "~>3.0.0.rc" +gem "rails", "~> 3.1" gem "compass-validator", "3.0.1" gem "css_parser", "~> 1.0.1" -gem "sass", "~>3.1" +gem "sass", "~> 3.1" gem "haml", "~> 3.1" -gem "rcov", :platform => :mri_18 gem "rubyzip" -gem "livereload" -gem "ruby-prof", :platform => :mri_18 - -gem 'autotest' -gem 'autotest-fsevent' if RUBY_PLATFORM =~ /darwin/ -gem 'fakefs', :git => 'git://github.com/johnbintz/fakefs.git' gem 'mocha' -gem 'timecop' gem 'diff-lcs', '~> 1.1.2' +gem 'rake', '~> 0.9.2' -gem 'rake', '0.8.7' +# Warning becarful adding OS dependant gems above this line it will break the CI server please +# place them below so they are excluded -group :mac do - gem "rb-fsevent" +unless ENV["CI"] + gem 'rb-fsevent' + gem 'growl_notify' + gem "ruby-prof", :platform => :mri_18 + gem "rcov", :platform => :mri_18 + gem 'guard' + gem 'guard-test' + gem 'guard-cucumber' end - diff --git a/Guardfile b/Guardfile new file mode 100644 index 00000000..c1258d0c --- /dev/null +++ b/Guardfile @@ -0,0 +1,16 @@ +group :tests do + guard :test do + watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" } + watch(%r{^test/.+_test\.rb$}) + watch(%r{^test/units/.+_test\.rb$}) + watch('test/test_helper.rb') { "test" } + end +end + +group :features do + guard :cucumber do + watch(%r{^features/.+\.feature$}) + watch(%r{^features/support/.+$}) { 'features' } + watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' } + end +end \ No newline at end of file diff --git a/README.markdown b/README.markdown index 0b04d84f..a804a069 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,7 @@ # Compass + +Build Status: ![Build Status](https://secure.travis-ci.org/chriseppstein/compass.png) + A [Sass][sass]-based CSS Meta-Framework that allows you to mix and match any of the following CSS frameworks: - [Compass Core][compass_core_website] - [Wiki Documentation][compass_core_wiki] diff --git a/Rakefile b/Rakefile index e077d6f8..7fcfe035 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,7 @@ require 'rubygems' require 'bundler' Bundler.setup +require 'rake/dsl_definition' rescue nil require 'compass' # ----- Default: Testing ------ @@ -29,6 +30,16 @@ To run with an alternate version of Rails, make test/rails a symlink to that ver To run with an alternate version of Haml & Sass, make test/haml a symlink to that version. END +Rake::TestTask.new :units do |t| + t.libs << 'lib' + t.libs << 'test' + test_files = FileList['test/units/**/*_test.rb'] + test_files.exclude('test/rails/*', 'test/haml/*') + t.test_files = test_files + t.verbose = true +end + + desc "Compile Examples into HTML and CSS" task :examples do linked_haml = "tests/haml" diff --git a/VERSION.yml b/VERSION.yml index 38ecce4f..a56ccbb4 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -1,5 +1,6 @@ --- :major: 0 -:minor: 11 -:patch: 7 -:name: Antares +:minor: 12 +:state: rc +:build: 1 +:name: Alnilam diff --git a/autotest/discover.rb b/autotest/discover.rb deleted file mode 100644 index ee7f82c5..00000000 --- a/autotest/discover.rb +++ /dev/null @@ -1,5 +0,0 @@ -Autotest.add_discovery { 'rspec2' } - - - - diff --git a/bin/compass b/bin/compass index 00996203..b7e7e012 100755 --- a/bin/compass +++ b/bin/compass @@ -21,6 +21,10 @@ fallback_load_path(File.join(File.dirname(__FILE__), '..', 'lib')) do require 'compass/exec' end +if defined?(Bundler) + Bundler.require :assets +end + runner = Proc.new do Compass::Exec::SubCommandUI.new(ARGV).run! end @@ -36,9 +40,5 @@ if ARGV.delete("--profile") printer.print(STDERR, 0) exit exit_code else - if exit_code = runner.call - exit exit_code - else - exit 1 - end + exit runner.call || 1 end diff --git a/doc-src/.compass/config.rb b/doc-src/.compass/config.rb index 44420f21..46d1e4ac 100644 --- a/doc-src/.compass/config.rb +++ b/doc-src/.compass/config.rb @@ -1,7 +1,7 @@ # Require any additional compass plugins here. require 'susy' require 'css-slideshow' - +require 'compass-theme' # Set this to the root of your project when deployed: http_path = "/" project_path = File.expand_path(File.join(File.dirname(__FILE__), '..')) diff --git a/doc-src/Gemfile b/doc-src/Gemfile index e207f08e..20bbd758 100644 --- a/doc-src/Gemfile +++ b/doc-src/Gemfile @@ -1,6 +1,7 @@ source :gemcutter gem 'nanoc3' +gem 'asdf' gem 'rdiscount' gem 'thor' gem 'rack' @@ -8,12 +9,13 @@ gem 'mime-types' gem 'serve', "1.0.0" gem 'nokogiri' gem 'coderay' -gem 'sass', ">= 3.1" -gem 'haml', ">= 3.1" +gem 'haml' gem 'rake' +gem 'activesupport', '~> 3.0.10', :require => 'active_support/inflector' gem 'compass', :path => ".." -gem 'compass-susy-plugin', ">=0.7.0.pre8" -gem 'css-slideshow', "0.2.0" +gem 'compass-theme', :path => '../../compass-theme' #:git => 'git://github.com/Compass/compass-theme.git' +# gem 'compass-susy-plugin', ">=0.7.0.pre8" +# gem 'css-slideshow', "0.2.0" gem 'json' gem 'css_parser', "1.0.1" gem 'ruby-prof' diff --git a/doc-src/Gemfile.lock b/doc-src/Gemfile.lock index 23b07b0a..a761d11c 100644 --- a/doc-src/Gemfile.lock +++ b/doc-src/Gemfile.lock @@ -1,57 +1,68 @@ PATH remote: .. specs: - compass (0.11.5.38ccee8) + compass (0.12.rc.0.c403ac9) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) +PATH + remote: ../../compass-theme + specs: + compass-theme (0.0.2) + compass (~> 0.11) + compass-susy-plugin (~> 0.7.0) + css-slideshow (= 0.2.0) + GEM remote: http://rubygems.org/ specs: - activesupport (3.0.7) - builder (2.1.2) + activesupport (3.0.10) + asdf (0.5.0) + rack (~> 1.2.1) + builder (3.0.0) chunky_png (1.2.5) coderay (0.9.7) - compass-susy-plugin (0.9.beta.3) - compass (>= 0.11.beta.3) + compass-susy-plugin (0.7.0) + compass (>= 0.10.0) cri (2.0.2) css-slideshow (0.2.0) compass (>= 0.10.0.rc3) css_parser (1.0.1) - fssm (0.2.7) - haml (3.1.0) + fssm (0.2.8.1) + haml (3.1.2) i18n (0.4.2) - json (1.5.1) + json (1.5.4) mime-types (1.16) nanoc3 (3.2.2) cri (~> 2.0) nokogiri (1.4.4) rack (1.2.2) - rake (0.8.7) + rake (0.9.2) rb-fsevent (0.4.0) rdiscount (1.6.8) - ruby-prof (0.9.2) - sass (3.1.0) + ruby-prof (0.10.8) + sass (3.1.12) serve (1.0.0) activesupport (~> 3.0.1) i18n (~> 0.4.1) rack (~> 1.2.1) tzinfo (~> 0.3.23) thor (0.14.6) - tzinfo (0.3.26) + tzinfo (0.3.29) PLATFORMS ruby DEPENDENCIES + activesupport (~> 3.0.10) + asdf builder coderay compass! - compass-susy-plugin (>= 0.7.0.pre8) - css-slideshow (= 0.2.0) + compass-theme! css_parser (= 1.0.1) - haml (>= 3.1) + haml json mime-types nanoc3 @@ -61,6 +72,5 @@ DEPENDENCIES rb-fsevent rdiscount ruby-prof - sass (>= 3.1) serve (= 1.0.0) thor diff --git a/doc-src/Rules b/doc-src/Rules index ee84cd46..884c7901 100644 --- a/doc-src/Rules +++ b/doc-src/Rules @@ -63,6 +63,7 @@ end compile '*' do if item[:extension] == "markdown" + filter :erb filter :rdiscount elsif item[:extension] == "haml" filter :haml, :ugly => true diff --git a/doc-src/assets/images/tutorials/sprites/layout/diagonal.png b/doc-src/assets/images/tutorials/sprites/layout/diagonal.png new file mode 100644 index 00000000..a7b3f93d Binary files /dev/null and b/doc-src/assets/images/tutorials/sprites/layout/diagonal.png differ diff --git a/doc-src/assets/images/tutorials/sprites/layout/horizontal.png b/doc-src/assets/images/tutorials/sprites/layout/horizontal.png new file mode 100644 index 00000000..057568e4 Binary files /dev/null and b/doc-src/assets/images/tutorials/sprites/layout/horizontal.png differ diff --git a/doc-src/assets/images/tutorials/sprites/layout/smart.png b/doc-src/assets/images/tutorials/sprites/layout/smart.png new file mode 100644 index 00000000..7fe102a6 Binary files /dev/null and b/doc-src/assets/images/tutorials/sprites/layout/smart.png differ diff --git a/doc-src/assets/images/tutorials/sprites/layout/vert.png b/doc-src/assets/images/tutorials/sprites/layout/vert.png new file mode 100644 index 00000000..dde31b03 Binary files /dev/null and b/doc-src/assets/images/tutorials/sprites/layout/vert.png differ diff --git a/doc-src/assets/javascripts/install.js b/doc-src/assets/javascripts/install.js index 6b52b844..31f371de 100644 --- a/doc-src/assets/javascripts/install.js +++ b/doc-src/assets/javascripts/install.js @@ -4,15 +4,38 @@ function showInstallCommand() { var notes = []; var project_name = "<myproject>"; var can_be_bare = true; - commands.push("$ gem install compass"); + var in_working_dir = false; + var use_bundler = false; + if ($("#app-type").val() != "rails") { + commands.push("$ gem install compass"); + } if (cmd == "init") { commands.push("$ cd " + project_name); + in_working_dir = true project_name = "."; + $(".creating").hide(); + } else { + $(".creating").show(); + if ($("#project_name").val() != "") + project_name = $("#project_name").val(); + } + if ($("#app-type").val() == "rails") { + notes.push("

Rails 2.3 and 3.0 users require additional installation steps. For full rails installation and upgrade instructions please refer to the compass-rails README.

"); + use_bundler = true; } if ($("#app-type").val() == "rails") { if (cmd == "create") { commands.push("$ rails new " + project_name); + commands.push("$ cd " + project_name); + in_working_dir = true + project_name = "."; } + commands.push("> Edit Gemfile and add this:"); + commands.push(" group :assets do"); + commands.push(" gem 'compass-rails'"); + commands.push(" # Add any compass extensions here"); + commands.push(" end"); + commands.push("$ bundle"); cmd = "init rails"; can_be_bare = false; } else if ($("#app-type").val() == "other") { @@ -28,9 +51,12 @@ function showInstallCommand() { var framework = $("#framework").val(); var create_command; if (cmd == "install") { - create_command = "$ compass install " + framework + " " + project_name; + create_command = "$ compass install " + framework; } else { - create_command = "$ compass " + cmd + " " + project_name; + create_command = "$ compass " + cmd; + } + if (!in_working_dir) { + create_command = create_command + " " + project_name; } if (framework != "compass" && framework != "bare" && cmd != "install") { create_command = create_command + " --using " + framework; @@ -46,14 +72,20 @@ function showInstallCommand() { } if ($("#options").val() == "customized") { $("#directories").show(); - create_command = create_command + - " --sass-dir \"" + $("#sassdir").val() + "\"" + - " --css-dir \"" + $("#cssdir").val() + "\"" + - " --javascripts-dir \"" + $("#jsdir").val() + "\"" + - " --images-dir \"" + $("#imagesdir").val() + "\""; + if ($("#sassdir").val() != "") + create_command += " --sass-dir \"" + $("#sassdir").val() + "\""; + if ($("#cssdir").val() != "") + create_command += " --css-dir \"" + $("#cssdir").val() + "\""; + if ($("#jsdir").val() != "") + create_command += " --javascripts-dir \"" + $("#jsdir").val() + "\""; + if ($("#imagesdir").val() != "") + create_command += " --images-dir \"" + $("#imagesdir").val() + "\""; } else { $("#directories").hide(); } + if (use_bundler) { + create_command = "$ bundle exec " + create_command.replace(/\$ /,''); + } commands.push(create_command); var instructions = "
" + commands.join("\n") + "
"; if (instructions.match(/</)) { diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index fb347471..5c6522a0 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -14,6 +14,92 @@ The Documentation for the [latest stable release](http://compass-style.org/docs/ The Documentation for the [latest preview release](http://beta.compass-style.org/) +0.12.rc.2 (03/11/2012) +---------------------- + +### Stylesheet Changes + +* Improved [hide-text mixin](/reference/compass/typography/text/replacement/#mixin-hide-text) for better performance and accessibility. +* Added [squish-text mixin](/reference/compass/typography/text/replacement/#mixin-squish-text) to hide text on inline elements. +* Compass css3 transitions module now correctly handled transitioning of + prefixed properties. + +### Misc Changes +* Fix the mime-type of embedded `woff` font files. Add support for Embedded OpenType fonts. +* New math functions are now available: `e()`, `log($number[, $base = e()])`, `sqrt($number)` + and `pow($number, $exponent)` + + +0.12.rc.1 (02/02/2012) +---------------------- + +Give warnings for users who upgrade without knowing about the compass-rails gem. + +0.12.rc.0 (01/31/2012) +---------------------- + +### Stylesheet Changes + +* Removed -ms prefix from box-sizing +* Added sprite_names sass function +* Added -ms prefix to transitions + +### Command Line + +* Added support for `--debug-info` and `--no-debug-info` to the compass compile command + +### Rails Integration + +Rails projects must now use the [`compass-rails`](https://github.com/compass/compass-rails) +gem to integrate with compass. Please read the [README](https://github.com/Compass/compass-rails/blob/master/README.md) for upgrade instructions. More information in this [blog post](/blog/2012/01/29/compass-and-rails-integration/). + +0.12.alpha.3 (12/23/2011) +------------------------- + +* The `$round-to-nearest-half-line` config variable was added. When + true, the vertical rhythm module will round line heights to the + nearest half-line to avoid awkwardly large gaps between lines of text. + Defaults to false. +* Added `reset-baseline` to the vertical rhythm module so you can force the baseline to reset. +* Merges in the stable changes between 0.11.5 and 0.11.6. + +0.12.alpha.2 (11/28/2011) +------------------------- + +* Bug fixes for Rails 2.x applications. + +0.12.alpha.1 (11/14/2011) +------------------------- + +* font-files helper: Stop requiring font type when the type can be guessed from URL +* inline-font-files: actually works now +* Upgrade CSS3 Pie to 1.0beta5 +* log sprite generation and removal to the console +* Added a new helper function `compass-env()` that returns the current compass environment (development, production) +* Added the ability to inline a sprite image by setting `$-inline:true` before you call `@import` +* Removed `-khtml` prefixes by default you can still enable them by setting `$experimental-support-for-khtml:true;` +* Improved rails 3.1 integration +* `true` and `false` are now valid sprite names +* Removed deprecated forms of the box-shadow, text-shadow, and transform + mixins. + +0.12.alpha.0 (8/30/2011) +------------------------ +* Support for the rails 3.1 asset pipeline +* Added support for diagonal, horizontal, and smart sprite layout +* Fixed a bug with spacing in horizontal layout +* Changed the descriptions of the sin, cos, and tan to be more descriptive +* Fixed trig functions via issue #498 +* Fixed the default `http_path` in rails +* Sprites can now have a `sprite_load_path` that is an array of directories that + contain source images for sprites handy for using sprites in extensions or gems +* Added a new set of configuration properties for generated images. + `generated_images_dir`, `generated_images_path`, `http_generated_images_dir`, + and `http_generated_images_path` can now be set to control where generated + images are written and how they are served. Added a corresponding + `generated-image-url()` helper function. These should rarely be needed and + will default to your corresponding image directories and paths. + 0.11.8 (02/26/2012) ------------------- diff --git a/doc-src/content/frameworks.haml b/doc-src/content/frameworks.haml index 22d8b3cc..2fec400d 100644 --- a/doc-src/content/frameworks.haml +++ b/doc-src/content/frameworks.haml @@ -39,7 +39,7 @@ crumb: Plugins and frameworks %a http://compass-style.org %td - You are currently vising the Compass docs. + You are currently viewing the Compass docs. %tr %td Blueprint %td 0.8.0 diff --git a/doc-src/content/get-involved/index.haml b/doc-src/content/get-involved/index.haml index 84998259..a7582fb4 100644 --- a/doc-src/content/get-involved/index.haml +++ b/doc-src/content/get-involved/index.haml @@ -19,7 +19,7 @@ layout: default 1. [**Contribute to Compass**](/help/tutorials/contributing). 2. [**Develop a Compass Extension**](/help/tutorials/extensions). - 3. [**Contribute to Sass Recipies**](http://chriseppstein.github.com/sass-recipes/). + 3. [**Contribute to Sass Recipes**](http://chriseppstein.github.com/sass-recipes/). 4. Publish your code somewhere and email a link to the [mailing list](http://groups.google.com/group/compass-users). ## Help Others diff --git a/doc-src/content/help/tutorials/configuration-reference.markdown b/doc-src/content/help/tutorials/configuration-reference.markdown index c818083d..b6c49a3f 100644 --- a/doc-src/content/help/tutorials/configuration-reference.markdown +++ b/doc-src/content/help/tutorials/configuration-reference.markdown @@ -143,7 +143,7 @@ later on. sass_dir String The directory where the sass stylesheets are kept. - It is relative to the project_path. Defaults to "src". + It is relative to the project_path. Defaults to "sass". @@ -170,11 +170,33 @@ later on. http_images_path - String + String The full http path to images on the web server. Defaults to http_path + "/" + images_dir. + + generated_images_dir + String + The directory where generated images are kept. + It is relative to the project_path. + Defaults to the value of images_dir. + + + + generated_images_path + String + The full path to where generated images are kept. + Defaults to the value of <project_path>/<generated_images_dir>. + + + + http_generated_images_path + String + The full http path to generated images on + the web server. Defaults to http_path + "/" + generated_images_dir. + + javascripts_dir String @@ -287,6 +309,13 @@ later on. Defaults to {:compression => Zlib::BEST_COMPRESSION}. See the chunky_png wiki for more information + + sprite_load_path + Array + + Defaults to [images_path] + + diff --git a/doc-src/content/help/tutorials/contributing.markdown b/doc-src/content/help/tutorials/contributing.markdown index 5894bea5..e58465b3 100644 --- a/doc-src/content/help/tutorials/contributing.markdown +++ b/doc-src/content/help/tutorials/contributing.markdown @@ -10,10 +10,10 @@ Contributing Stylesheets to Compass Thank you for your interest in contributing to Compass. Our goal is to make it as easy as we can for you to contribute changes to compass -- So if there's something here that -seems harder than it aught to be, please let us know. +seems harder than it ought to be, please let us know. If you find a bug **in this document**, you are bound to contribute a fix. Stop reading now -if you do not wish to abide by this rool. +if you do not wish to abide by this rule. **Step 1**: If you do not have a github account, create one. diff --git a/doc-src/content/help/tutorials/exclude_vendor_prefixes.markdown b/doc-src/content/help/tutorials/exclude_vendor_prefixes.markdown new file mode 100644 index 00000000..f7226348 --- /dev/null +++ b/doc-src/content/help/tutorials/exclude_vendor_prefixes.markdown @@ -0,0 +1,71 @@ +--- +title: Removing Vendor Prefixes from Compass Stylesheets +layout: tutorial +crumb: Removing Vendor Prefixes from Compass +classnames: + - tutorial +--- +# Removing Vendor Prefixes from Compass Stylesheets + +Compass makes it easy to code many of the CSS3 vendor prefixed properties, without having to type it all out by hand. + +## Easy Vendor Prefixes + +Let's say you wanted to add a border radius to an element like this: + + .round { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + } + +With Compass it's easier to use the `border-radius` mixin: + + .round { + @include border-radius(4px); + } + +That mixin will create all of the vendor prefixed CSS properties you need, with much less of a chance of a typo or inconsistent display. It will also take care of any browser specific implementations of the CSS property that don't match up to the W3C specification. + + .round { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + } + +## Problem + +The problem with that solution, as good as it is, is that all of those browser prefixes will cruft up your stylesheet quickly if you use a lot of them, and/or aren't using `@extend` to keep them to a minimum. + +Of particular note are the generated Opera `(-o-border-radius)` and Konquerer `(-khtml-border-radius)` properties, which are added to create support for those browsers. As great as those browsers may be, they often account for a very small minority of a website's traffic, traffic that may not compensate for the full weight of their support when using experimental CSS3 properties. + +## Solution + +Thankfully, Compass includes a selection of default boolean variables that you can override, allowing you to globally turn off the support for the various vendor prefixes: + + $experimental-support-for-mozilla : true !default; + $experimental-support-for-webkit : true !default; + $support-for-original-webkit-gradients : true !default; + $experimental-support-for-opera : true !default; + $experimental-support-for-microsoft : true !default; + $experimental-support-for-khtml : true !default; + +If you set any of the above variables to `false`, Compass will skip those prefixes when it processes your stylesheet. + +So to exclude Opera and Konquerer vendor prefixes from your CSS, add the following code just above your include of the CSS3 module in your base SCSS file: + + $experimental-support-for-opera:false; + $experimental-support-for-khtml:false; + @import "compass/css3"; + +The resultant output will be as follow: + + .round { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -ms-border-radius: 4px; + border-radius: 4px; + } diff --git a/doc-src/content/help/tutorials/extensions.markdown b/doc-src/content/help/tutorials/extensions.markdown index 791a3ed4..11d24a66 100644 --- a/doc-src/content/help/tutorials/extensions.markdown +++ b/doc-src/content/help/tutorials/extensions.markdown @@ -125,7 +125,7 @@ should attempt to adhere to unless there's a good reason not to do so. pieces for faster load times when they're not using everything. 3. Use partials (files starting with an underscore) for stylesheets that are meant to be imported. If you do not Sass will generate css - files for your libaries in some configurations. + files for your libraries in some configurations. 4. Provide a project template. If you do not, your project should only be providing widgets or page designs, etc. @@ -174,10 +174,13 @@ You may also see some real manifest files here: ### Manifest Declarations + **Easy Mode:** If you just have some basic files and nothing fancy going on, simply place this line in your manifest: discover :all +If the file is missing `discover :all` is the default + This will cause compass to find all the files in your template and use the files' extension to determine where they should go. Alternatively, you can request that compass only discover files of a certain type. For example, the following will only discover javascript and image assets, you could then declare other file types on your own. discover :javascripts diff --git a/doc-src/content/help/tutorials/integration.markdown b/doc-src/content/help/tutorials/integration.markdown index 4b0d8fd8..e9dfc1a8 100644 --- a/doc-src/content/help/tutorials/integration.markdown +++ b/doc-src/content/help/tutorials/integration.markdown @@ -9,6 +9,13 @@ classnames: ## Ruby on Rails +### Rails 3.1 +Just add compass to your Gemfile like so: + + gem 'compass' + +Also checkout this [gist](https://gist.github.com/1184843) + ### Rails 3 compass init rails /path/to/myrailsproject ### Rails 2.3 @@ -16,26 +23,26 @@ classnames: ## Sinatra + require 'compass' require 'sinatra' require 'haml' - require 'sass' - require 'compass' configure do - Compass.configuration do |config| - config.project_path = File.dirname(__FILE__) - config.sass_dir = 'views' - end - - set :haml, { :format => :html5 } - set :sass, Compass.sass_engine_options + set :haml, {:format => :html5, :escape_html => true} + set :scss, {:style => :compact, :debug_info => false} + Compass.add_project_configuration(File.join(Sinatra::Application.root, 'config', 'compass.rb')) end - get '/screen.css' do + get '/stylesheets/:name.css' do content_type 'text/css', :charset => 'utf-8' - sass :screen + scss(:"stylesheets/#{params[:name]}" ) end + get '/' do + haml :index + end + + If you keep your stylesheets in “views/stylesheets/” directory instead of just “views/”, remember to update sass_dir configuration accordingly. Check out this [sample compass-sinatra project](http://github.com/chriseppstein/compass-sinatra) to get up and running in no time! @@ -55,29 +62,31 @@ At the top of the Nanoc Rules file, load the Compass configuration, like this: require 'compass' - Compass.add_project_configuration 'compass/config.rb' # when using Compass 0.10 - Compass.configuration.parse 'compass/config.rb' # when using Compass < 0.10 + Compass.add_project_configuration 'compass.rb' # when using Compass > 0.10 + Compass.configuration.parse 'compass.rb' # when using Compass < 0.10 Your Compass configuration file (in compass/config.rb) could look like this (you may need to change the path to some directories depending on your directory structure): - http_path = "/" - project_path = "." - css_dir = "output/assets/style" - sass_dir = "content/assets/style" - images_dir = "output/assets/images" - - # when using SCSS: - sass_options = { - :syntax => :scss - } + http_path = "/" + project_path = File.expand_path(File.join(File.dirname(__FILE__), '..')) + css_dir = "output/stylesheets" + sass_dir = "content/stylesheets" + images_dir = "assets/images" + javascripts_dir = "assets/javascripts" + fonts_dir = "assets/fonts" + http_javascripts_dir = "javascripts" + http_stylesheets_dir = "stylesheets" + http_images_dir = "images" + http_fonts_dir = "fonts" To filter the stylesheets using Sass and Compass, call the sass filter with Sass engine options taken from Compass, like this: - filter :sass, Compass.sass_engine_options + compile '/stylesheets/*' do + filter :sass, sass_options.merge(:syntax => item[:extension].to_sym) + end ### Nanoc Projects using the formal approach -* [nanoc Bootstrap](http://github.com/adamstac/nanoc-bootstrap) - a base nanoc project with support for Haml, Sass, Compass, jQuery and more. -* [nanoc & Compass Example Project](http://github.com/ddfreyne/nanoc-bootstrap-compass) \ No newline at end of file +* [This Site](https://github.com/chriseppstein/compass/tree/master/doc-src) diff --git a/doc-src/content/help/tutorials/spriting.markdown b/doc-src/content/help/tutorials/spriting.markdown index 5d5b7c1e..235777ef 100644 --- a/doc-src/content/help/tutorials/spriting.markdown +++ b/doc-src/content/help/tutorials/spriting.markdown @@ -5,12 +5,16 @@ crumb: Spriting classnames: - tutorial --- + # Spriting with Compass Spriting has never been easier with Compass. You place the sprite images in a folder, import them into your stylesheet, and then you can use the sprite in your selectors in one of several convenient ways. +## Sprite Tutorial Contents +<%= sprite_tutorial_links(true) %> + ## Setup For this tutorial, let's imagine that in your project's image folder there are four icons: @@ -21,8 +25,11 @@ For this tutorial, let's imagine that in your project's image folder there are f * `images/icon/delete.png` Each is an icon that is 32px square. - + ## Basic Usage + +****Note**: The use of `icon` is only for this example, "icon" represents the folder name that contains your sprites. + The simplest way to use these icon sprites is to let compass give you a class for each sprite: @import "icon/*.png"; @@ -47,14 +54,28 @@ Let's go over what happened there. The import statement told compass to [generat stylesheet that is customized for your sprites](https://gist.github.com/729507). This stylesheet is [magic](#magic-imports), it is not written to disk, and it can be customized by setting configuration variables before you import it. See the section below on -[Customization Options](#customization-options). The goal of this stylesheet is to provide a +[Customization Options](customization-options). The goal of this stylesheet is to provide a simple naming convention for your sprites so that you they are easy to remember and use. You should never have to care what the is name of the generated sprite map, nor where a sprite is located within it. - + +## Nested Folders + +****Note**: The use of `orange` is only for this example, "icon" represents the folder name that contains your sprites. + +Sprites stored in a nested folder will use the last folder name in the path as the sprite name. + +Example: + + @import "themes/orange/*.png"; + @include all-orange-sprite; + + ## Selector Control +****Note**: The use of `icon` is only for this example, "icon" represents the folder name that contains your sprites. + If you want control over what selectors are generated, it is easy to do. In this example, this is done by using the magic `icon-sprite` mixin. Note that the mixin's name is dependent on the name of the folder in which you've placed your icons. @@ -81,9 +102,35 @@ And your stylesheet will compile to: .actions .save { background-position: 0 -96px; } .actions .delete { background-position: 0 0; } - + +## Sass Functions + +****Note**: The use of `icon` is only for this example, "icon" represents the folder name that contains your sprites. + +Getting the image dimensions of a sprite + +You can get a unit value by using the magical dimension functions `-sprite-height` and `-sprite-width` +If you are looking to just return the dimensions see the [docs](/reference/compass/utilities/sprites/base/#mixin-sprite-dimensions) + +Example: + + + @import "icon/*.png"; + $box-padding: 5px; + $height: icon-sprite-height(some_icon); + $width: icon-sprite-width(some_icon); + + .somediv { + height:$height + $box-padding; + width:$width + $box-padding; + } + + + ## Magic Imports +****Note**: The use of `icon` is only for this example, "icon" represents the folder name that contains your sprites. + As noted above, compass will magically create sprite stylesheets for you. Some people like magic, some people are scared by it, and others are curious about how the magic works. If you would like to avoid the magic, you can use compass to generate an import for you. On the @@ -101,103 +148,7 @@ might want to avoid it. For instance, if your sprite map has more than about 20 sprites, you may find that hand crafting the import will speed up compilation times. See the section on [performance considerations](#performance) for more details. - -## Magic Selectors - -If you want to add selectors for your sprites, it's easy todo by adding `_active` `_target` or `_hover` to the file name, In the example below we have a sprite directory that looks like: - -* `selectors/ten-by-ten.png` -* `selectors/ten-by-ten_hover.png` -* `selectors/ten-by-ten_active.png` -* `selectors/ten-by-ten_target.png` - -Now in our sass file we add: - - @import "selectors/*.png"; - - a { - @include selectors-sprite(ten-by-ten) - } - -And your stylesheet will compile to: - - .selectors-sprite, a { - background: url('/selectors-sedfef809e2.png') no-repeat; - } - - a { - background-position: 0 0; - } - a:hover, a.ten-by-ten_hover, a.ten-by-ten-hover { - background-position: 0 -20px; - } - a:target, a.ten-by-ten_target, a.ten-by-ten-target { - background-position: 0 -30px; - } - a:active, a.ten-by-ten_active, a.ten-by-ten-active { - background-position: 0 -10px; - } - -Alternatively you can use the `@include all-selectors-sprites;` after the import and get the following output: - - .selectors-sprite, .selectors-ten-by-ten { - background: url('/selectors-sedfef809e2.png') no-repeat; - } - - .selectors-ten-by-ten { - background-position: 0 0; - } - .selectors-ten-by-ten:hover, .selectors-ten-by-ten.ten-by-ten_hover, .selectors-ten-by-ten.ten-by-ten-hover { - background-position: 0 -20px; - } - .selectors-ten-by-ten:target, .selectors-ten-by-ten.ten-by-ten_target, .selectors-ten-by-ten.ten-by-ten-target { - background-position: 0 -30px; - } - .selectors-ten-by-ten:active, .selectors-ten-by-ten.ten-by-ten_active, .selectors-ten-by-ten.ten-by-ten-active { - background-position: 0 -10px; - } - - - - -## Customization Options - -### Options per Sprite Map - -When constructing the sprite map, the entire sprite map and it's associated stylesheet -can be configured in the following ways. Each option is specified by setting a [configuration -variable](/help/tutorials/configurable-variables/) before importing the sprite. The variables -are named according to the name of the folder containing the sprites. In the examples below -the sprites were contained within a folder called `icon`. - -* `$-spacing` -- The amount of transparent space, in pixels, around each sprite. - Defaults to `0px`. E.g. `$icon-spacing: 20px`. -* `$-repeat` -- Wether or not each sprite should repeat along the x axis. Defaults - to `no-repeat`. E.g. `$icon-repeat: repeat-x`. -* `$-position` -- The position of the sprite in the sprite map along the x-axis. Can - be specified in pixels or percentage of the sprite map's width. `100%` would cause the - sprite to be on the right-hand side of the sprite map. Defaults to `0px`. - E.g. `$icon-position: 100%`. -* `$-sprite-dimensions` -- Whether or not the dimensions of the sprite should be - included in each sprite's CSS output. Can be `true` or `false`. Defaults to `false`. -* `$-sprite-base-class` -- The base class for these sprites. Defaults to `.-sprite`. - E.g. `$icon-sprite-base-class: ".action-icon"` -* `$-clean-up` -- Whether or not to removed the old sprite file when a new one is created. Defaults to true - -### Options per Sprite - -When constructing the sprite map, each sprite can be configured in the following ways: - -* `$--spacing` -- The amount of transparent space, in pixels, around the sprite. Defaults - to the sprite map's spacing which defaults to `0px`. E.g. `$icon-new-spacing: 20px`. -* `$--repeat` -- Wether or not the sprite should repeat along the x axis. Defaults - to the sprite map's repeat which defaults to `no-repeat`. E.g. `$icon-new-repeat: repeat-x`. -* `$--position` -- The position of the sprite in the sprite map along the x-axis. Can - be specified in pixels or percentage of the sprite map's width. `100%` would cause the - sprite to be on the right-hand side of the sprite map. Defaults to the sprite map's - position value which defaults to `0px`. E.g. `$icon-new-position: 100%`. - - + ## Performance Considerations Reading PNG files and assembling new images and saving them to disk might have a non-trivial diff --git a/doc-src/content/help/tutorials/spriting/customization-options.markdown b/doc-src/content/help/tutorials/spriting/customization-options.markdown new file mode 100644 index 00000000..7a31d257 --- /dev/null +++ b/doc-src/content/help/tutorials/spriting/customization-options.markdown @@ -0,0 +1,45 @@ +--- +title: Sprite Customization +layout: tutorial +crumb: Customization +classnames: + - tutorial +--- +#Sprite Tutorial +<%= sprite_tutorial_links %> +## Customization Options + +### Options per Sprite Map + +When constructing the sprite map, the entire sprite map and it's associated stylesheet +can be configured in the following ways. Each option is specified by setting a [configuration +variable](/help/tutorials/configurable-variables/) before importing the sprite. The variables +are named according to the name of the folder containing the sprites. In the examples below +the sprites were contained within a folder called `icon`. + +* `$-spacing` -- The amount of transparent space, in pixels, around each sprite. + Defaults to `0px`. E.g. `$icon-spacing: 20px`. +* `$-repeat` -- Wether or not each sprite should repeat along the x axis. Defaults + to `no-repeat`. E.g. `$icon-repeat: repeat-x`. +* `$-position` -- The position of the sprite in the sprite map along the x-axis. Can + be specified in pixels or percentage of the sprite map's width. `100%` would cause the + sprite to be on the right-hand side of the sprite map. Defaults to `0px`. + E.g. `$icon-position: 100%`. +* `$-sprite-dimensions` -- Whether or not the dimensions of the sprite should be + included in each sprite's CSS output. Can be `true` or `false`. Defaults to `false`. +* `$-sprite-base-class` -- The base class for these sprites. Defaults to `.-sprite`. + E.g. `$icon-sprite-base-class: ".action-icon"` +* `$-clean-up` -- Whether or not to removed the old sprite file when a new one is created. Defaults to true + +### Options per Sprite + +When constructing the sprite map, each sprite can be configured in the following ways: + +* `$--spacing` -- The amount of transparent space, in pixels, around the sprite. Defaults + to the sprite map's spacing which defaults to `0px`. E.g. `$icon-new-spacing: 20px`. +* `$--repeat` -- Wether or not the sprite should repeat along the x axis. Defaults + to the sprite map's repeat which defaults to `no-repeat`. E.g. `$icon-new-repeat: repeat-x`. +* `$--position` -- The position of the sprite in the sprite map along the x-axis. Can + be specified in pixels or percentage of the sprite map's width. `100%` would cause the + sprite to be on the right-hand side of the sprite map. Defaults to the sprite map's + position value which defaults to `0px`. E.g. `$icon-new-position: 100%`. diff --git a/doc-src/content/help/tutorials/spriting/magic-selectors.markdown b/doc-src/content/help/tutorials/spriting/magic-selectors.markdown new file mode 100644 index 00000000..a0d4cb9b --- /dev/null +++ b/doc-src/content/help/tutorials/spriting/magic-selectors.markdown @@ -0,0 +1,74 @@ +--- +title: Sprite Magic Selectors +layout: tutorial +crumb: Magic Selectors +classnames: + - tutorial +--- +#Sprite Tutorial +<%= sprite_tutorial_links %> + +## Magic Selectors + +If you want to add selectors for your sprites, it's easy todo by adding `_active` `_target` or `_hover` to the file name, In the example below we have a sprite directory that looks like: + +* `selectors/ten-by-ten.png` +* `selectors/ten-by-ten_hover.png` +* `selectors/ten-by-ten_active.png` +* `selectors/ten-by-ten_target.png` + +Now in our sass file we add: + + @import "selectors/*.png"; + + a { + @include selectors-sprite(ten-by-ten) + } + +And your stylesheet will compile to: + + .selectors-sprite, a { + background: url('/selectors-sedfef809e2.png') no-repeat; + } + + a { + background-position: 0 0; + } + a:hover, a.ten-by-ten_hover, a.ten-by-ten-hover { + background-position: 0 -20px; + } + a:target, a.ten-by-ten_target, a.ten-by-ten-target { + background-position: 0 -30px; + } + a:active, a.ten-by-ten_active, a.ten-by-ten-active { + background-position: 0 -10px; + } + +Alternatively you can use the `@include all-selectors-sprites;` after the import and get the following output: + + .selectors-sprite, .selectors-ten-by-ten { + background: url('/selectors-sedfef809e2.png') no-repeat; + } + + .selectors-ten-by-ten { + background-position: 0 0; + } + .selectors-ten-by-ten:hover, .selectors-ten-by-ten.ten-by-ten_hover, .selectors-ten-by-ten.ten-by-ten-hover { + background-position: 0 -20px; + } + .selectors-ten-by-ten:target, .selectors-ten-by-ten.ten-by-ten_target, .selectors-ten-by-ten.ten-by-ten-target { + background-position: 0 -30px; + } + .selectors-ten-by-ten:active, .selectors-ten-by-ten.ten-by-ten_active, .selectors-ten-by-ten.ten-by-ten-active { + background-position: 0 -10px; + } + +## Disabling + To disable this feature set `$disable-magic-sprite-selectors` to true before calling the sprite mixin + + a { + $disable-magic-sprite-selectors:true; + @include selectors-sprite(ten-by-ten) + } + + diff --git a/doc-src/content/help/tutorials/spriting/sprite-layouts.markdown b/doc-src/content/help/tutorials/spriting/sprite-layouts.markdown new file mode 100644 index 00000000..0851f78d --- /dev/null +++ b/doc-src/content/help/tutorials/spriting/sprite-layouts.markdown @@ -0,0 +1,69 @@ +--- +title: Sprite layouts +layout: tutorial +crumb: Sprite layouts +classnames: + - tutorial +--- +# Sprite Tutorial +<%= sprite_tutorial_links %> + +## Sprite Layouts + +Example: + + $icon-layout:horizontal; + @import "icon/*.png"; + + $dropcap-layout:diagonal + @import "dropcap/*.png"; + +## Vertical + + @import "mysprite/*.png"; + +Example Output: + +![Vertical Example](/images/tutorials/sprites/layout/vert.png) +## Horizontal + + $mysprite-layout:horizontal; + @import "mysprite/*.png"; + +Example Output: + +![Horizontal Example](/images/tutorials/sprites/layout/horizontal.png) + +Notes: + + * Responds to the same configuration options that vertical has. + +## Diagonal + + $mysprite-layout:diagonal; + @import "mysprite/*.png"; + +Example Output: + +![Diagonal Example](/images/tutorials/sprites/layout/diagonal.png) + +Notes: + + * Configuration options do not effect the layout + * This is incredibly resource intensive on the browser + +## Smart + + $mysprite-layout:smart; + @import "mysprite/*.png"; + +Example Output: + +![Smart Example](/images/tutorials/sprites/layout/smart.png) + +Notes: + + * Configuration options do not effect the layout + * Most efficient use of browser memory + +Example icons from [Open Icon Library](http://openiconlibrary.sourceforge.net/) and are released under public domain \ No newline at end of file diff --git a/doc-src/content/help/tutorials/testing.markdown b/doc-src/content/help/tutorials/testing.markdown new file mode 100644 index 00000000..0761261f --- /dev/null +++ b/doc-src/content/help/tutorials/testing.markdown @@ -0,0 +1,24 @@ +--- +title: Testing Your Stylesheets +layout: tutorial +crumb: Testing +classnames: + - tutorial +--- + +# Test Unit + + require 'compass/test_case' + class StylesheetsTest < Compass::TestCase + def test_stylesheets + my_sass_files.each do |sass_file| + assert_compiles(sass_file) do |result| + assert_not_blank result + end + end + end + protected + def my_sass_files + Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "../..", "app/stylesheets/**/[^_]*.sass"))) + end + end \ No newline at end of file diff --git a/doc-src/content/index.haml b/doc-src/content/index.haml index 7d7d88d0..bc74afd6 100644 --- a/doc-src/content/index.haml +++ b/doc-src/content/index.haml @@ -12,7 +12,7 @@ layout: homepage %ol %li Experience cleaner markup without presentational classes. %li It’s chock full of the web’s best reusable patterns. - %li Developing a personal framework is simple. + %li It makes creating sprites a breeze. %li Compass mixins make CSS3 easy. %li Download and create extensions with ease. .sass diff --git a/doc-src/content/install.haml b/doc-src/content/install.haml index 440868aa..bde59961 100644 --- a/doc-src/content/install.haml +++ b/doc-src/content/install.haml @@ -30,6 +30,9 @@ body_id: install %option{:value => "rails"} rails %option{:value => "other"} other project + %span.creating + named + %input#project_name(placeholder="") with %select#framework %option{:value => "compass"} compass's @@ -48,14 +51,14 @@ body_id: install %option{:value => "customized"} customize my project's directory structure. %h4 Thanks. Now run the following steps in your terminal: diff --git a/doc-src/content/posts/2012-01-29-compass-and-rails-integration.markdown b/doc-src/content/posts/2012-01-29-compass-and-rails-integration.markdown new file mode 100644 index 00000000..8a60529d --- /dev/null +++ b/doc-src/content/posts/2012-01-29-compass-and-rails-integration.markdown @@ -0,0 +1,49 @@ +--- +title: "Compass/Rails Integration in v0.12" +description: "Starting in Compass v0.12 compass's rails integration is +done via a new project called compass-rails." +author: chris +--- + +The Compass v0.12 release is way behind schedule but it's finally getting +very close to release. The main goal of the v0.12 release has been to add +support for the rails asset pipeline and we hope that you'll agree that this +release achieves the very best integration with rails that compass has +ever provided. + +In v0.12, we've create a new gem called `compass-rails` to provide full +support for rails 2.3 and greater. Let me tell you, this was no small +feat. 2.3 lacks Railtie support and 3.1 introduced the asset pipeline. +Backflips were performed; blood, sweat, and tears were shed; Monkeys +were patched and Ducks were punched. + +The compass command line tool will now be aware of and compass +configuration settings you've made in your rails configuration files +and/or in the compass configuration file. You can use the approach that +best suites your workflow. + +While the asset pipeline is convenient, large applications with lots of +stylesheets and many imports can become sluggish in development mode. To +make things snappier, you can now run the compass watcher in a separate +terminal to begin compilation as soon as you save. In combination with +tools like [live-reload](https://github.com/mockko/livereload), you may +not even need to reload your webpage to see the result in your browser. + +Compass extensions and their starter files can be added to your rails +project following the extensions' existing installation instructions. +No special consideration is needed to support rails except to note +that the extension gem should be listed in the `:assets` group of your +Gemfile and you might need to use `bundle exec` to launch the compass +command line tool. + +Having a dedicated gem for integration provides a number of benefits. +First, it means that we can release rails integration fixes on a +separate release schedule from the main compass library. Second, it +solves a chicken & egg problem we had where the command-line tools +didn't know whether they were dealing with a rails project until it was +too late. Finally, it allowed us to clean up some of the Compass +internals. To be clear, this gem doesn't mean that Rails support is +deprecated or a second class citizen in any way. + +Huge thanks go to [Scott Davis](https://github.com/scottdavis) for his +hard work on the compass-rails gem. diff --git a/doc-src/content/posts/2012-02-01-compass-0-12-is-released.markdown b/doc-src/content/posts/2012-02-01-compass-0-12-is-released.markdown new file mode 100644 index 00000000..b16fd828 --- /dev/null +++ b/doc-src/content/posts/2012-02-01-compass-0-12-is-released.markdown @@ -0,0 +1,47 @@ +--- +title: "Compass v0.12 (Release Candidate) is Released" +description: "Compass 0.12: Flexible Sprites, Rails Integration" +author: chris +--- + +Compass 0.12 release candidate is out! Install it now: + + $ (sudo) gem install compass --pre + +This release is primarily to support the Rails Asset Pipeline which +required major changes to the Compass internals. If you use rails +with Compass please read the [blog post about the new compass-rails +gem][compass-rails]. + +In addition to the rails improvements this release contains many updates +to Compass Sprites: + +* **Sprite Layouts**: `vertical` (default), `horizontal`, `diagonal`, and `smart` + layouts are now available. Different layouts may allow you to use + sprites more easily with differing design requirements. The `smart` + layout will efficiently pack sprites of different sizes -- resulting + in smaller file sizes. To select a layout set the + `$-layout` variable to your desired layout name. +* **Sprite Load Path**: Sprite source files can now be stored in more locations than + just your images directory. To add sprite locations in your compass + configuration: `sprite_load_path << 'my/sprite/folder' +* **Sprite output location**: If you need to output sprites to a + location other than the images directory set `generated_images_dir`, + `generated_images_path`, `http_generated_images_dir`, and + `http_generated_images_path` in your compass configuration according + to your needs. You can refer to images in your generated images + directory using the `generated-image-url()` function. + +Additionally there are many new CSS3 improvements, bug fixes, and other +small enhancements that you can read about in the +[CHANGELOG](/CHANGELOG/). + +What's next for Compass? The Sass 3.2 release is coming soon and I'd +very much like the 0.13 release of compass to take advantage of the +great features that it offers. Additionally, we're working on an +extension registry where you can post your compass extensions and +discover new ones. Lastly, we'll be extracting blueprint to a +compass extension as that project seems to have stagnated. I'd say +we're getting pretty close to a 1.0 release! + +[compass-rails]: /blog/2012/01/29/compass-and-rails-integration/ diff --git a/doc-src/content/reference/compass/css3/box_shadow.haml b/doc-src/content/reference/compass/css3/box_shadow.haml index ff4079b9..4ac8e6e0 100644 --- a/doc-src/content/reference/compass/css3/box_shadow.haml +++ b/doc-src/content/reference/compass/css3/box_shadow.haml @@ -5,7 +5,6 @@ framework: compass stylesheet: compass/css3/_box-shadow.scss meta_description: Specify the box shadow for all browsers. layout: core -beta: true classnames: - reference - core @@ -13,4 +12,4 @@ classnames: --- - render 'reference' do %p - The box-shadow mixins are used to apply an inset or drop shadow to a block element. \ No newline at end of file + The box-shadow mixins are used to apply an inset or drop shadow to a block element. diff --git a/doc-src/content/reference/compass/css3/images.haml b/doc-src/content/reference/compass/css3/images.haml index 653dcdee..7361edad 100644 --- a/doc-src/content/reference/compass/css3/images.haml +++ b/doc-src/content/reference/compass/css3/images.haml @@ -5,7 +5,6 @@ framework: compass stylesheet: compass/css3/_images.scss meta_description: Specify linear gradients and radial gradients for many browsers. layout: core -beta: true classnames: - reference - core diff --git a/doc-src/content/reference/compass/css3/pie.haml b/doc-src/content/reference/compass/css3/pie.haml index 5f096262..e81a33ff 100644 --- a/doc-src/content/reference/compass/css3/pie.haml +++ b/doc-src/content/reference/compass/css3/pie.haml @@ -5,7 +5,6 @@ framework: compass stylesheet: compass/css3/_pie.scss meta_description: Compass integration with the css3pie tool. layout: core -beta: true classnames: - reference - core @@ -76,4 +75,4 @@ classnames: * CSS PIE is written by and copyright to: [Jason Johnston](http://twitter.com/lojjic) * Compass is using css3pie version 1.0-beta3. It can be upgraded by downloading a new behavior file and replacing the one that comes with compass. - \ No newline at end of file + diff --git a/doc-src/content/reference/compass/css3/text-shadow.haml b/doc-src/content/reference/compass/css3/text-shadow.haml index 6f614e55..3122d952 100644 --- a/doc-src/content/reference/compass/css3/text-shadow.haml +++ b/doc-src/content/reference/compass/css3/text-shadow.haml @@ -4,7 +4,6 @@ crumb: Text Shadow framework: compass stylesheet: compass/css3/_text-shadow.scss meta_description: Specify the text shadow for all browsers. -beta: true layout: core classnames: - reference @@ -13,4 +12,4 @@ classnames: --- - render 'reference' do %p - Provides a mixin for CSS text shadows. See CSS3 spec: text-shadow. \ No newline at end of file + Provides a mixin for CSS text shadows. See CSS3 spec: text-shadow. diff --git a/doc-src/content/reference/compass/css3/transform.haml b/doc-src/content/reference/compass/css3/transform.haml index ee53a316..b86b9a8e 100644 --- a/doc-src/content/reference/compass/css3/transform.haml +++ b/doc-src/content/reference/compass/css3/transform.haml @@ -5,7 +5,6 @@ framework: compass stylesheet: compass/css3/_transform.scss meta_description: Specify transformations for many browsers. layout: core -beta: true classnames: - reference - core diff --git a/doc-src/content/reference/compass/css3/user_interface.haml b/doc-src/content/reference/compass/css3/user_interface.haml new file mode 100644 index 00000000..ca20a8d3 --- /dev/null +++ b/doc-src/content/reference/compass/css3/user_interface.haml @@ -0,0 +1,15 @@ +--- +title: Compass User Interface +crumb: User Interface +framework: compass +stylesheet: compass/css3/_user-interface.scss +meta_description: Declare an element inline block for all browsers. +layout: core +classnames: + - reference + - core + - css3 +--- +- render 'reference' do + %p + Provides mixins for the CSS3 User Interface module. diff --git a/doc-src/content/reference/compass/helpers/math.haml b/doc-src/content/reference/compass/helpers/math.haml index aa5edb8c..3c0e26fe 100644 --- a/doc-src/content/reference/compass/helpers/math.haml +++ b/doc-src/content/reference/compass/helpers/math.haml @@ -38,8 +38,9 @@ documented_functions: sin($number) .details %p - Takes the sine of a number. If the number is unitless or has a unit of deg - then it will return a unitless result. Degrees will first be converted to radians. + Returns the sine of a number. If the number is unitless or has a unit of deg + then it will return a unitless result. Unless the number has a unit of deg it + will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. @@ -49,8 +50,9 @@ documented_functions: cos($number) .details %p - Takes the cosine of a number. If the number is unitless or has a unit of deg - then it will return a unitless result. Degrees will first be converted to radians. + Returns the cosine of a number. If the number is unitless or has a unit of deg + then it will return a unitless result. Unless the number has a unit of deg it + will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. @@ -60,8 +62,9 @@ documented_functions: tan($number) .details %p - Takes the tangent of a number. If the number is unitless or has a unit of deg - then it will return a unitless result. Degrees will first be converted to radians. + Returns the tangent of a number. If the number is unitless or has a unit of deg + then it will return a unitless result. Unless the number has a unit of deg it + will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. diff --git a/doc-src/content/reference/compass/helpers/urls.haml b/doc-src/content/reference/compass/helpers/urls.haml index cb12d935..06719575 100644 --- a/doc-src/content/reference/compass/helpers/urls.haml +++ b/doc-src/content/reference/compass/helpers/urls.haml @@ -12,6 +12,7 @@ documented_functions: - "stylesheet-url" - "font-url" - "image-url" + - "generated-image-url" --- %h1 Compass URL Helpers @@ -31,7 +32,7 @@ documented_functions: Generates a path to an asset found relative to the project's css directory. %br Passing a true value as the second argument will cause the only the path to be returned - instead of a `url()` function + instead of a url() function #font-url.helper %h3 @@ -42,7 +43,7 @@ documented_functions: Generates a path to an asset found relative to the project's font directory. %br Passing a true value as the second argument will cause the only the path to be returned - instead of a `url()` function + instead of a url() function #image-url.helper %h3 @@ -53,9 +54,27 @@ documented_functions: Generates a path to an asset found relative to the project's images directory. %p Passing a true value as the second argument will cause the only the path to be returned - instead of a `url()` function + instead of a url() function %p The third argument is used to control the cache buster on a per-use basis. - When set to `false` no cache buster will be used. When a string, that + When set to false no cache buster will be used. When a string, that value will be used as the cache buster. +#generated-image-url.helper + %h3 + %a(href="#generated-image-url") + generated-image-url($path, $cache-buster: false) + .details + %p + Generates a path to an image generated during compilation using the + generated_image related configuration properties. + %p + Most users will never call this helper directly, it is primarily provided + for use by plugins that need to generate paths to images they create. E.g. + The sprite-url() helper calls this helper. + %p + The second argument is used to control the cache buster on a per-use basis. + Defaults to false, meaning that no cache buster will be used. + When a string, that value will be used as the cache buster, when true + Compass will generate a cache-buster based on the image's modification time. + diff --git a/doc-src/content/stylesheets/core/_base-classes.sass b/doc-src/content/stylesheets/core/_base-classes.sass deleted file mode 100644 index c7cc0b66..00000000 --- a/doc-src/content/stylesheets/core/_base-classes.sass +++ /dev/null @@ -1,70 +0,0 @@ -$default-rounded-corner: 4 - -.group - +pie-clearfix - -.truncate - +ellipsis - -.border-box - +box-sizing(border-box) - -.round-corners-4 - +border-radius(4px) - -.round-corners-em - +border-radius(1em) - -=round-corners($num: $default-rounded-corner) - @extend .round-corners-#{$num} - -=round-top-corners($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-bottom-right-corner - @extend .clear-bottom-left-corner -=round-bottom-corners($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-right-corner - @extend .clear-top-left-corner -=round-left-corners($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-right-corner - @extend .clear-bottom-right-corner -=round-right-corners($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-left-corner - @extend .clear-bottom-left-corner - -=round-top-left-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-right-corner - @extend .clear-bottom-right-corner - @extend .clear-bottom-left-corner -=round-top-right-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-left-corner - @extend .clear-bottom-right-corner - @extend .clear-bottom-left-corner -=round-bottom-left-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-right-corner - @extend .clear-bottom-right-corner - @extend .clear-top-left-corner -=round-bottom-right-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-right-corner - @extend .clear-top-left-corner - @extend .clear-bottom-left-corner - -=square-top-left-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-left-corner -=square-top-right-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-top-right-corner -=square-bottom-left-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-bottom-left-corner -=square-bottom-right-corner($num: $default-rounded-corner) - +round-corners($num) - @extend .clear-bottom-right-corner \ No newline at end of file diff --git a/doc-src/content/stylesheets/core/_clearing-classes.sass b/doc-src/content/stylesheets/core/_clearing-classes.sass deleted file mode 100644 index 9a60d248..00000000 --- a/doc-src/content/stylesheets/core/_clearing-classes.sass +++ /dev/null @@ -1,17 +0,0 @@ -.clear-top-left-corner - +border-top-left-radius(0) -.clear-top-right-corner - +border-top-right-radius(0) -.clear-bottom-left-corner - +border-bottom-left-radius(0) -.clear-bottom-right-corner - +border-bottom-right-radius(0) - -.hide - display: none -.clear-box-shadow - +box-shadow(none) -.clear-border-radius - @extend .clear-rounded-corners -.clear-rounded-corners - +border-radius(0) diff --git a/doc-src/content/stylesheets/core/_extensions.scss b/doc-src/content/stylesheets/core/_extensions.scss deleted file mode 100644 index cd2fd5c4..00000000 --- a/doc-src/content/stylesheets/core/_extensions.scss +++ /dev/null @@ -1,10 +0,0 @@ -@mixin reset($reset-type: false){ - @if($reset-type){ - @if($reset-type == global){ - @include global-reset; - } - @if($reset-type == html5){ - @include reset-html5; - } - } -} diff --git a/doc-src/content/stylesheets/partials/_blog.scss b/doc-src/content/stylesheets/partials/_blog.scss deleted file mode 100644 index ac79d58d..00000000 --- a/doc-src/content/stylesheets/partials/_blog.scss +++ /dev/null @@ -1,6 +0,0 @@ -body#blog-archive { - .timestamp { - margin-right: 1em; - font-size: 12px; - } -} \ No newline at end of file diff --git a/doc-src/content/stylesheets/partials/_code.scss b/doc-src/content/stylesheets/partials/_code.scss deleted file mode 100644 index 710b75f3..00000000 --- a/doc-src/content/stylesheets/partials/_code.scss +++ /dev/null @@ -1,113 +0,0 @@ -//html.sass .mixin-source .scss, html.scss .mixin-source .sass { @extend .hide;} -.mixin-source, .example-source, .function-source { - position: relative; @extend .fixed-font; - .syntaxhighlighter, pre { - &.scss, &.sass, &.css, &.haml, &.html { display: none; } } } - -html.sass { .mixin-source, .example-source, .function-source { .syntaxhighlighter.sass { display: block; } } } -html.scss { .mixin-source, .example-source, .function-source { .syntaxhighlighter.scss { display: block; } } } -html.css .example-source .syntaxhighlighter.css { display: block; } -html.html .example-source .syntaxhighlighter.html { display: block; } -html.haml .example-source .syntaxhighlighter.haml { display: block; } - - - -.mixin-source, .function-source { display: none; } - -html.light .syntaxhighlighter, html.dark .syntaxhighlighter { - margin: 0 0 2px; - code { padding: 0; } - //font-size: 1.1em; - text-shadow: none; - .code-block { background: none; @extend .clear-box-shadow; } - table td.gutter { .line { &:first-child { padding-top: 10px !important; } &:last-child { padding-bottom: 10px !important; } } } - .toolbar { display: none; } - //a.help { font-size: 1.5em; @extend .pictos; color: #aaa; position: relative; right: 6px; top: 2px; } - } - -a[rel="github-source"] { - position: relative; - float: right; - top: 1.1em; -} - -pre { - margin: 1.5em 0; - overflow: auto; - .code-block:first-child { padding: .6em; display: block; } - .code-block:first-child { width: 100%; @include box-sizing(border-box); overflow: auto; } -} - -.code-block { @extend .round-corners-4; @extend .fixed-font; - display: inline-block; - font-size: .95em; - padding: 0 .4em; - line-height: 1.5em; -} - -.source-documentation { - @extend .round-corners-4; - padding: 10px 15px; - @include round-bottom-corners -} - -h3 { @include round-corners; - padding: 10px 15px; - margin: 20px 0 20px; - font-weight: bold; - position: relative; - a { text-decoration: none;} - code, .arg { font-weight: normal; } -} -h3.mixin, h3.function { @include round-top-corners; margin-bottom: 2px;} -.arg { - display: inline-block; - padding: 0 2px; - &[data-default-value] { - font-style: italic; - &:before { content: "[" ; } - &:after { content: "]" ; }} -} - -a[rel="view source"]{ float: right; padding: 9px 15px; margin-top: 20px; position: relative; z-index: 2; font-size: .8em; @include hover-link;} -h2 + a[rel="view source"]{ margin-top: 6px;} - -.syntaxhighlighter { - a, div, code, table, table td, table tr, table tbody, table thead, table caption, textarea { - background: none; border: 0; bottom: auto; float: none; height: auto; left: auto; line-height: 1.2em !important; - padding: 0; margin: 0; outline: 0; - overflow: visible; position: static; right: auto; - text-align: left; top: auto; vertical-align: baseline; - width: auto; - font: { weight: normal; style: normal; - size: 1em; - } - min: { height: inherit; } - } -} - -.syntaxhighlighter { width: 100%; margin: 1em 0 1em 0; position: relative; overflow: auto; font-size: 1em; - - // set up bold and italic - .bold { font-weight: bold; } - .italic { font-style: italic; } - .line { white-space: pre; } - - // main table and columns - table { width: 100%; - td.code { width: 100%; - .line { padding: 0 .6em; } } - td.gutter .line { text-align: right; padding: 0 0.8em 0 1em; } } // middle spacing between line numbers and lines - - // Styles for the toolbar - .toolbar { position: absolute; right: 1px; top: 1px; width: 11px; height: 11px; font-size: 10px; z-index: 10; - span.title { display: inline; } - a { display: block; text-align: center; text-decoration: none; padding-top: 1px; } } - .container { position: relative; } - textarea { @include stretch(0, .65em, 0, .65em); @extend .fixed-font; font-size: .95em; line-height: 1.3em !important;} -} -.syntaxhighlighter, pre .code-block:first-child, pre { - &::-webkit-scrollbar { height: 12px; } - &::-webkit-scrollbar-button { &:start:decrement, &:end:increment { display: block; width: 0; height: 0; } } - &::-webkit-scrollbar-thumb:horizontal { -webkit-border-radius: 5px; -webkit-background-clip: padding-box; } -} diff --git a/doc-src/content/stylesheets/partials/_example.scss b/doc-src/content/stylesheets/partials/_example.scss deleted file mode 100644 index 46c65ff0..00000000 --- a/doc-src/content/stylesheets/partials/_example.scss +++ /dev/null @@ -1,29 +0,0 @@ -html.light #demo, html.dark #demo { - color: #333; -} - -#demo { - @include round-corners; - @extend .group; - background: #fff; - margin-bottom: 1.2em; - padding: 40px; - code { - @include box-shadow(rgba(#000, .3) 0 1px 3px, rgba(#000, .15) 0 1px 0 0 inset); - background: #fff; - color: inherit; - } -} - -#how { - section { width: 49%; float: left; } - section + section { float: right; } - - .example-source { clear: both; } -} - -#reference { - float: right; - margin-top: 1em; -} - diff --git a/doc-src/content/stylesheets/partials/_home.scss b/doc-src/content/stylesheets/partials/_home.scss deleted file mode 100644 index e322c02e..00000000 --- a/doc-src/content/stylesheets/partials/_home.scss +++ /dev/null @@ -1,99 +0,0 @@ -body#home { - width: 810px; - #page { padding-top: 31px;} - h1#logo { - $logo: 'compass-logo.png'; - background: image-url($logo) no-repeat; - text-indent: -9999px; - overflow: hidden; - width: image-width($logo); - height: image-height($logo)/2; - padding: 0; - margin: 0 auto 18px; - } - #{headings()}{ @extend .heading-font; } - h2 { - text-align: center; - font-size: 30px; - padding-bottom: 15px; - margin-bottom: 30px; - line-height: 1.1em; - } - h3 { - text-align: center; - font-size: 25px; - margin-top: 32px; - } - h4 { font-size: 1.5em; } - .overview { - @extend .group; - .compass { width: 406px; float: left; - h4:before { content: "k"; } } - .sass { width: 275px; float: right; - h4:before { content: "2"; } } - div { - padding: 20px; - h4 { - padding-bottom: 12px; - margin-bottom: 12px; - &:before { - @extend .pictos; - color: #fb292d; - display: inline-block; - font-size: 1.2em; - padding-right: .3em; - } - } - } - ol { padding-left: 0; list-style: inside decimal; margin-bottom: 0; } - p { margin-bottom: 0; } - ol, p { line-height: 1.8em; font-size: .95em;} - } -} -ul#featured_sites { - @extend .group; - overflow: visible; - margin-top: 30px; - list-style: none; - padding: 0px; - li { - float: left; - text-shadow: none; - overflow: visible; - position: relative; - &:nth-child(3n+2){ margin: 0 7px; } - &:nth-child(1n+4){ margin-top: 7px; } - &:nth-child(3n+4){ clear: left; } - padding: 6px; - a { text-decoration: none; } - img { float: left; width: 240px; } - span { display: none;} - &:hover { z-index: 100; - padding: 3px 2px; - img { width: 248px; } - span { display: block; position: absolute; text-shadow: none;} - } - .url { - bottom: 2px; left: 2px; right: 2px; background: #000; background: rgba(#000, .8); z-index: 102; padding: 2.2em 10px 6px; - font-size: .8em; border-top: 1px solid rgba(#fff, .2); } - .title { bottom: 1.7em; left: 0; z-index: 103; text-decoration: none; padding: 0 11px; color: #fff; } - } -} -section.book, section.gui { - width: 48%; - float: left; - @extend .group; - h3 { margin-bottom: 1em; height: 2em; text-align: left; } -} -section.book { - margin-right: 2%; - img { float: left; margin-right: 1em; margin-bottom: 1em; } -} -section.gui { - text-align: center; - .note { - font-size: smaller; - } -} - -html.light body#home { h1#logo { background-position: bottom;} } \ No newline at end of file diff --git a/doc-src/content/stylesheets/partials/_install.scss b/doc-src/content/stylesheets/partials/_install.scss deleted file mode 100644 index 353a2df8..00000000 --- a/doc-src/content/stylesheets/partials/_install.scss +++ /dev/null @@ -1,10 +0,0 @@ -body#install { - #steps, p.madlib, p.note, h4 { margin-top: 1em; } - p.note { font-size: smaller; font-style: italic; } - p.warning { color: #c00; } - .customization { display: none; } - .customizable .customization { display: inline; } - blockquote { border-left: 2px solid #ccc; - text-indent: 0; padding-left: 0.5em; } - .customization input { width: 8em; } -} \ No newline at end of file diff --git a/doc-src/content/stylesheets/partials/_layout.scss b/doc-src/content/stylesheets/partials/_layout.scss deleted file mode 100644 index 5148ac89..00000000 --- a/doc-src/content/stylesheets/partials/_layout.scss +++ /dev/null @@ -1,21 +0,0 @@ -$min-width: 700px; -$side-nav-width: 160px; -$main-min-width: $min-width - $side-nav-width; - -body { - max-width: 1500px; - min-width: $min-width; - margin: 0 auto; - @extend .sans-font; - line-height: 1.45em; -} - -#wrap { @extend .group; padding: 0 20px 20px; } -#page { @extend .group; padding-bottom: 30px; } -footer { @extend .group; clear: both; padding-top: 20px;} -header { padding: 22px 0 0; position: relative; } -#page aside + article { margin-left: $side-nav-width + 22px; padding-left: 23px; } -aside { float: left; width: $side-nav-width; position: relative; z-index: 2;} - -body#home #page article { padding-left: 0;} -body.site, body#changelog, body.default { max-width: 1024px; } diff --git a/doc-src/content/stylesheets/partials/_main.scss b/doc-src/content/stylesheets/partials/_main.scss deleted file mode 100644 index 2fb7694b..00000000 --- a/doc-src/content/stylesheets/partials/_main.scss +++ /dev/null @@ -1,63 +0,0 @@ -body.get-involved h1 + p { font-size: 1.2em; line-height: 1.45em; } - -#page { - position: relative; - padding-top: 40px; - & > article { padding-top: 10px; font-size: 15px; - img { max-width: 100%; } } } - -#theme_pref { - a { display: block; font-size: 18px; width: .9em; position: relative; text-decoration: none; @extend .pictos; } } - -#docs_panel { - position: absolute; top: 0; right: 0; - width: 100%; - & > div { float: right; margin-left: 10px; @include round-bottom-corners; border: 1px solid; border-top: 0;} - a { text-decoration: none; } - #theme_pref { padding: 3px 12px 6px; a { position: relative; top: 2px;} } - #version { font-size: .75em; padding: 4px 0 5px; background: none; border: none; position: absolute; left: 0; a { @include hover-link; } } - -} - -#syntax_pref, .syntax_pref { padding: 4px 8px 5px; a { font-size: .9em; padding: 0px 6px 1px; display: inline-block; line-height: 1.45em;} } - -.syntax_pref { - float: left; @include round-top-corners; border: 1px solid; border-bottom: 0; - a { text-decoration: none; } -} - -footer { - .links { float: left; font-size: .9em; - img { vertical-align: middle; padding-right: 5px; position: relative; top: -2px;} - span { position: relative; top: -1px; } - ul { @include horizontal-list(15px); overflow: visible; - li { padding-top: 3px; } - li:last-child {border: 0; @include box-shadow(none); } } } -} -#page article h2 { - margin-top: 1.5em; -} -h2 a.help { - text-indent: -9999px; - display: inline-block; - position: relative; - text-decoration: none; - @include opacity(.3); - &:hover { @include opacity(.7); } - &:before { - @extend .pictos; - content: "?"; - text-indent: 0; - position: absolute; - top: 2px; - left: 0; - font-size: .85em; - } -} -hr { - height: 0px; - border: 0; - border-bottom-width: 4px; - margin: 3em 0; - background: transparent; -} diff --git a/doc-src/content/stylesheets/partials/_nav.scss b/doc-src/content/stylesheets/partials/_nav.scss deleted file mode 100644 index c1122aad..00000000 --- a/doc-src/content/stylesheets/partials/_nav.scss +++ /dev/null @@ -1,96 +0,0 @@ -.triangle-marker { - border-color: transparent transparent; - content: "\00a0"; - height: 0; width: 0; - position: absolute; - border-style: solid; } - -nav a { @include hover-link; } -nav .selected a:hover { text-decoration: none;} - -header { @extend .group; - font-size: 1.3em; @extend .heading-font; border-width: 4px;} -#main-nav { - display: inline-block; - padding-bottom: 10px; - ul { - @include horizontal-list(10px); - line-height: 2em; }} - -#sub-nav { - @extend .group; - padding: 8px 0; } - -#docs-nav, #module-nav { - display: inline-block; - float: left; - a { - padding: 2px 10px; - display: inline-block; }} - -#docs-nav { padding-right: 30px; - & + #module-nav { - padding-left: 20px; - }} - -#module-nav { - display: inline-block; - ul { @include horizontal-list(false); }} - -body.getting-started #module-nav li.getting-started, -body.tutorial #module-nav li.tutorials, -body.support #module-nav li.support, -#module-nav li.selected { - position: relative; - a { - text-decoration: none; - } - a:before{ @extend .triangle-marker; - border-width: 0 8px 8px; - z-index: 2; - bottom: -9px; - left: 50%; - margin-left: -8px; - border-bottom-color: #121212; - } - &:before { @extend .triangle-marker; - border-bottom-color: #414141; - border-width: 0 6px 6px; - z-index: 3; - bottom: -9px; - left: 50%; - margin-left: -6px; - } - &:after { @extend .triangle-marker; - border-bottom-color: #343434; - border-width: 0 5px 5px; - z-index: 3; - bottom: -10px; - left: 50%; - margin-left: -5px; - } -} - -#search-docs { - width: 170px; - float: right; - position: relative; - top: .3em; - //position: absolute; top: 29px; right: 0; - &:before { - content: "s"; - display: block; - @extend .pictos; - position: absolute; - left: 6px; - top: 4px; - font-size: .8em; - z-index: 20; - @include opacity(.8) - } - input { @extend .sans-font; @include round-corners; - @include box-sizing(border-box); - width: 170px; border: 0; margin: 0; padding: 5px 8px 5px 26px; - font-size: .8em; - float: right; - position: relative; } } diff --git a/doc-src/content/stylesheets/partials/_sidebar.scss b/doc-src/content/stylesheets/partials/_sidebar.scss deleted file mode 100644 index 9894ed92..00000000 --- a/doc-src/content/stylesheets/partials/_sidebar.scss +++ /dev/null @@ -1,31 +0,0 @@ -aside { - padding-top: 15px; - text-align: right; - padding-right: 22px; - h2, h3 { - text-align: left; - font-size: 1.3em; - line-height: 1.45em; - padding-bottom: .2em; - margin-bottom: .4em; - @extend .clear-border-radius; - } - h3 { - padding: 0 0 .5em; line-height: 1.1em; - } - a { - font-size: .85em; - } - ul ul a { - &.selected, &.selected:hover { - font-weight: bold; - text-decoration: underline; - } - } - .deprecated { - text-decoration: line-through; - } - .beta span:after { - content: " (\3B2)"; - } -} diff --git a/doc-src/content/stylesheets/partials/_theme.scss b/doc-src/content/stylesheets/partials/_theme.scss deleted file mode 100644 index e60b6270..00000000 --- a/doc-src/content/stylesheets/partials/_theme.scss +++ /dev/null @@ -1,275 +0,0 @@ -@mixin site-theme($theme, $page-bg, $text, $strong-text, $heading, $link, $code, $search, $nav-link, $main-nav, $main-nav-selected, $option-panel-border, $option-panel-bg){ - background: $page-bg; - body { background: $page-bg; color: $text; - a { color: $link; } } - - #page { @extend .horizontal-rule-#{$theme}; } - header { @extend .horizontal-rule-#{$theme}; border-width: 4px; } - - nav a { color: $nav-link; } - #main-nav a { color: $main-nav;} - - body#home #main-nav a[rel=home], - body#help #main-nav a[rel=help], - body.tutorial #main-nav a[rel=help], - body.reference #main-nav a[rel=documentation], - body#changelog #main-nav a[rel=documentation], - body.demo #main-nav a[rel=documentation], - body#get-involved #main-nav a[rel=get-involved]{ color: $main-nav-selected; } - - #search-docs input { - @extend .inset-panel-#{$theme}; color: $search; - &::-webkit-input-placeholder { color: $search; } } - #{headings()}{ color: $heading; - strong { color: $main-nav-selected; } - em { color: $code; } } - - #page > article h2 { @extend .horizontal-rule-top-#{$theme}; } - hr { @extend .horizontal-rule-#{$theme}; - border-bottom-width: 8px} - body#home h2 { @extend .horizontal-rule-#{$theme}; } - - #page aside + article { @extend .vertical-rule-left-#{$theme}; } - - aside { - h2 a { color: $strong-text; } - h2, h3 { @extend .horizontal-rule-#{$theme}; }} - - footer .links li { @extend .vertical-rule-#{$theme}; } - code { @extend .code-block-#{$theme}; color: $code; } - - #theme_pref { @extend .theme-switch-#{$theme}; } - #docs_panel div, .syntax_pref { background: $option-panel-bg; border-color: $option-panel-border; } - - body#home .overview div { @extend .inset-panel-#{$theme}; - h4 { @extend .horizontal-rule-#{$theme}; } } - #featured_sites li { @extend .inset-panel-#{$theme}; } - -} -@mixin docs-theme($theme, $heading, $code, $nav-link, $docs-nav-selected, $module-nav-selected){ - - #page > article { - h1 { @extend .horizontal-rule-#{$theme}; } - h2 { @extend .horizontal-rule-top-#{$theme}; } - h3 { @extend .heading-panel-#{$theme}; } - h1 + h2, hr + h2 { - @extend .clear-box-shadow; border-top: 0; - margin-top: 0;} - } - - #sub-nav { @extend .horizontal-rule-#{$theme}; } - #docs-nav { @extend .vertical-rule-#{$theme}; } - body.core a[rel=core], body.blueprint a[rel=blueprint]{ @extend .inset-panel-#{$theme}; color: $docs-nav-selected; @extend .round-corners-4;} - #main-nav a[rel=home] { @include replace-text-with-dimensions("compass-logo-small-#{$theme}.png"); display: inline-block; float: left; } - - #module-nav { - ul { overflow: visible; }} - body.getting-started #module-nav li.getting-started, - body.tutorial #module-nav li.tutorials, - body.support #module-nav li.support, - #module-nav li.selected { @extend .selected-marker-#{$theme}; - a { color: $module-nav-selected; } } - - a[rel=sass], a[rel=scss], a[rel=css], a[rel=html], a[rel=haml] { @extend .syntax-switch-#{$theme}; } - &.sass a[rel=sass], &.scss a[rel=scss], &.css a[rel=css], &.html a[rel=html], &.haml a[rel=haml] { color: $heading; color: rgba($heading, .7); @extend .round-corners-em; @extend .inset-panel-#{$theme}; } - - #version { color: rgba($heading, .3); a { color: rgba($nav-link, .7); } } - .mixin-source, .example-source, .function-source { @extend .mixin-panel-#{$theme}; - .container textarea { color: $code; } - } - h2 a.help { color: $heading;} - - .source-documentation { @extend .doc-panel-#{$theme}; } - - #demo { @extend .demo-#{$theme}; } - - .arg { color: $code; } - .arg[data-default-value] { color: rgba($code, .7); } - a[rel="view source"]{ color: rgba($heading, .5); &:hover{ color: rgba($heading, .8);} } - -} - -// Dark theme -.inset-panel-dark { - @include box-shadow(rgba(#fff, .1) 0 1px 0, rgba(#000, .8) 0 1px 7px 0px inset); - background: darken(#2f2f2f, 6); background-color: rgba(#000, .3); } - -.horizontal-rule-dark { - @include box-shadow(rgba(#fff, .07) 0 1px 0); - border-bottom: 1px solid #121212; } - -.horizontal-rule-top-dark { - @include box-shadow(rgba(#fff, .07) 0 1px 0 inset); - border-top: 1px solid #121212; } - -.vertical-rule-dark { - @include box-shadow(rgba(#fff, .07) 1px 0 0); - border-right: 1px solid #121212; } - -.vertical-rule-left-dark { - @include box-shadow(rgba(#fff, .07) 1px 0 0 inset); - border-left: 1px solid #121212; } - -.code-block-dark { @extend .code-block; @extend .inset-panel-dark; } - -.demo-dark { - @include box-shadow(rgba(#000, .5) 0 2px 10px inset, rgba(#fff, .3) 0 1px 2px 0px, rgba(#000, .8) 0 0 0 1px inset); } - -.heading-panel-dark { - background: darken(#2f2f2f, 6); - background: rgba(#000, .2); - @include box-shadow(rgba(#000, .2) 0 0 0 1px inset); - a:hover { color: #fff; - .arg { color: rgba(#fff, .6);} - } -} -.doc-panel-dark { - background: darken(#2f2f2f, 4); - background: rgba(#000, .1); - @include box-shadow(rgba(#000, .2) 0 0 0 1px inset); -} - -.syntax-switch-dark { - color: #000; text-shadow: rgba(#fff, .08) 0 1px 0; - &:hover { color: #fff; text-shadow: #000 0 1px 0; } } - -.theme-switch-dark { - cursor: pointer; - a { color: #000; color: rgba(#000, .8); text-shadow: rgba(#fff, .08) 0 1px 0; } - &:hover a { color: #eee; text-shadow: #000 0 1px 0; } } - -.selected-marker-dark { - a:before{ border-bottom-color: #121212; } - &:before { border-bottom-color: #414141; } - &:after { border-bottom-color: #323232; } -} -.mixin-panel-dark { - @extend .inset-panel-dark; - td.gutter { background: rgba(#fff, .05); .line { border-right: 2px solid rgba(#fff, .15); color: rgba(#fff, .5); }} - .container textarea { background: darken(#2f2f2f, 6); } -} - -@mixin dark-theme($docs: false) { - $page-bg: #2f2f2f; - - $text: #c6c6c6; - $heading: white; - $strong-text: #dbdbdb; - - $search: #6e6e6e; - - $code: #dadbb1; - $nav-link: #bfbfbf; - $link: saturate(lighten(#85AFC9, 4), 19); - - $main-nav: white; - $main-nav-selected: #fb292d; - $docs-nav-selected: $strong-text; - $module-nav-selected: $link; - - $option-panel-border: rgba(#000, .5); - $option-panel-bg: rgba(#fff, .06); - - @include site-theme(dark, $page-bg, $text, $strong-text, $heading, $link, $code, $search, $nav-link, $main-nav, $main-nav-selected, $option-panel-border, $option-panel-bg); - - @if($docs){ - @include docs-theme(dark, $heading, $code, $nav-link, $docs-nav-selected, $module-nav-selected); - .syntaxhighlighter, pre, pre .code-block:first-child { - &::-webkit-scrollbar-track-piece { -webkit-box-shadow: rgba(#000, .5) 0 0 3px 1px inset; background: rgba(#000, .2); } - } - .syntaxhighlighter, pre, pre .code-block:first-child { - &::-webkit-scrollbar-thumb:horizontal { background: -webkit(linear-gradient(rgba(#fff, .3), rgba(#fff, 0))) #000; -webkit-box-shadow: rgba(black, 0.8) 0px 0 0 1px inset; } - } - } -} - -// Light Theme -.inset-panel-light { - @include box-shadow(rgba(#fff, 1) 0 1px 0, rgba(#000, .5) 0 1px 3px 0px inset); - text-shadow: 0 1px 1px #fff; - background: darken(#fff, .04); background-color: rgba(#000, .04); } - -.horizontal-rule-light { - @include box-shadow(#fff 0 1px 0); - border-bottom: 1px solid #bbb; } - -.horizontal-rule-top-light { - @include box-shadow(#fff 0 1px 0 inset); - border-top: 1px solid #bbb; } - -.vertical-rule-light { - @include single-box-shadow(rgba(#fff, 1), 1px, 0, 0); - border-right: 1px solid #bbb; } - -.vertical-rule-left-light { - @include single-box-shadow(rgba(#fff, 1), 1px, 0, 0 inset); - border-left: 1px solid #bbb; } - -.code-block-light { @extend .code-block; @extend .inset-panel-light; background: rgba(#fff, .5); } - -.demo-light { @include box-shadow(rgba(#000, .3) 0 2px 10px inset, #fff 0 1px 2px 0px, rgba(#000, .05) 0 0 0 1px inset); } - -.syntax-switch-light { - color: rgba(#000, .3); text-shadow: rgba(#fff, .08) 0 1px 0; - &:hover { color: #000; text-shadow: #fff 0 1px 0; }} - -.theme-switch-light { - cursor: pointer; - a {color: rgba(#000, .2); text-shadow: rgba(#fff, 1) 0 1px 0;} - &:hover a { color: #000; } } - -.heading-panel-light { - background: rgba(#fff, .5); - @include box-shadow(rgba(#000, .13) 0 0 0 1px inset); - a:hover { color: #000; - .arg { color: rgba(#000, .6); } } -} - -.selected-marker-light { - a:before{ border-bottom-color: #bbbbbb; } - &:before { border-bottom-color: #fff; } - &:after { border-bottom-color: #e5e5e5; } -} - -.doc-panel-light { - background: rgba(#000, .03); - text-shadow: rgba(#fff, .9) 0 1px 1px; - @include box-shadow(rgba(#000, .15) 0 0 0 1px inset); -} - -.mixin-panel-light { - @extend .inset-panel-light; - background: rgba(#fff, .8); - td.gutter { background: rgba(#000, .08); .line { border-right: 2px solid rgba(#000, .2); color: rgba(#000, .4); } } - .container textarea { background: darken(#fff, .04); } -} - -@mixin light-theme($docs: false) { - $page-bg: #ececec; // image-url('bg-light.jpg'); - - $text: #111; - $heading: #222; - $strong-text: #000; - - $search: #666; - - $link: #307eb6; - $nav-link: #444; - $code: #222; - - $main-nav: #000; - $main-nav-selected: darken(#fb292d, 15); - $docs-nav-selected: $strong-text; - $module-nav-selected: $link; - - $option-panel-border: rgba(#000, .2); - $option-panel-bg: #fff; - - @include site-theme(light, $page-bg, $text, $strong-text, $heading, $link, $code, $search, $nav-link, $main-nav, $main-nav-selected, $option-panel-border, $option-panel-bg); - - @if($docs){ - @include docs-theme(light, $heading, $code, $nav-link, $docs-nav-selected, $module-nav-selected); - .syntaxhighlighter::-webkit-scrollbar-track-piece { -webkit-box-shadow: rgba(#000, .3) 0 0 3px 1px inset; background: rgba(#ddd, .8); } - .syntaxhighlighter::-webkit-scrollbar-thumb:horizontal { background: -webkit(linear-gradient(rgba(#000, 0) 40%, rgba(#000, .2))) #fff; -webkit-box-shadow: rgba(black, 0.2) 0px 0 0 1px inset; } - } -} diff --git a/doc-src/content/stylesheets/partials/_typography.scss b/doc-src/content/stylesheets/partials/_typography.scss deleted file mode 100644 index 3e70c53a..00000000 --- a/doc-src/content/stylesheets/partials/_typography.scss +++ /dev/null @@ -1,47 +0,0 @@ -@font-face { - font-family: "pictos-web"; - src: url('/otherfonts/pictos-web.eot'); - src: local("?"), url('/otherfonts/pictos-web.woff') format('woff'), url('/otherfonts/pictos-web.ttf') format('truetype'), url('/otherfonts/pictos-web.svg#webfontIyfZbseF') format('svg');} - -@include font-face("museosans-web", font-files("museosans-web.woff", woff, "museosans-web.ttf", truetype, "museosans-web.svg#webfontJHBEijmD", svg), 'museosans-web.eot'); - - -.sans-font { font-family: 'Lucida Grande', Arial, sans-serif; } -.heading-font { font-family: 'Museo Sans', "museosans-web", 'serif'; } -.pictos { font-family: pictos, pictos-web; font-weight: normal; font-style: normal;} -.fixed-font { font-family: menlo, monaco, "andale mono", "courier new", fixed;} - -#page { - line-height: 1.45em; - ol { list-style: outside decimal; padding-left: 2.5em; } - ol ol { list-style: outside lower-alpha; padding-left: 2.5em; } - ul, ol, dl { margin-bottom: 1.5em;} - p { margin-bottom: 1.2em;} - #{headings(1,2)}{ @extend .heading-font; line-height: 1.2em; } - h1 { font-size: 35px; margin-bottom: 15px; padding-bottom: 6px; } - h2 { font-size: 26px; margin: 1em 0 15px; padding-bottom: 6px; } - h3 { font-size: 18px; } - h4 { font-size: 18px; margin: .4em 0; } - ul { list-style: inside disc; } - dt { font-weight: bold; } -} -#page aside { - ul { list-style: none; margin-bottom: 1em;} - h2 { line-height: 1.3em; margin-top: 0; padding-top: 3px;} -} -em { font-style: italic; } -strong { font-weight: bold; } - -#page > article { - ul ul { padding-left: 1em; } - position: relative; - h2 { font-size: 26px; margin: .5em 0 .6em; - padding: 1em 0 6px;} - hr + h2 { padding-top: 0; } - hr + h3, h4, h5 { margin-top: 0; } -} - -dl.table dt, dl.table dd { display: inline-block; } -dg { display: block; margin-bottom: 1.5em; } - -.warning { color: #c00; } \ No newline at end of file diff --git a/doc-src/content/stylesheets/syntax/_shCore.scss b/doc-src/content/stylesheets/syntax/_shCore.scss deleted file mode 100644 index a67e4f90..00000000 --- a/doc-src/content/stylesheets/syntax/_shCore.scss +++ /dev/null @@ -1,216 +0,0 @@ -@mixin round_corners_custom($top, $right, $bottom, $left) { - -moz-border-radius: $top $right $bottom $left !important; - -webkit-border-radius: $top $right $bottom $left !important; -} - -@mixin round_corners($radius) { - @include round_corners_custom($radius, $radius, $radius, $radius); -} - -.syntaxhighlighter { - a, - div, - code, - table, - table td, - table tr, - table tbody, - table thead, - table caption, - textarea { - @include round_corners(0); - - background: none !important; - border: 0 !important; - bottom: auto !important; - float: none !important; - height: auto !important; - left: auto !important; - line-height: 1.1em !important; - margin: 0 !important; - outline: 0 !important; - overflow: visible !important; - padding: 0 !important; - position: static !important; - right: auto !important; - text-align: left !important; - top: auto !important; - vertical-align: baseline !important; - width: auto !important; - box-sizing: content-box !important; - font: { - family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; - weight: normal !important; - style: normal !important; - size: 1em !important; - } - min: { - // For IE8, FF & WebKit - height: inherit !important; - // For IE7 - height: auto !important; - } - } -} - -.syntaxhighlighter { - width: 100% !important; - margin: 1em 0 1em 0 !important; - - position: relative !important; - overflow: auto !important; - font-size: 1em !important; - - &.source { overflow: hidden !important; } - - // set up bold and italic - .bold { font-weight: bold !important; } - .italic { font-style: italic !important; } - - .line { white-space: pre !important; } - - // main table and columns - table { - width: 100% !important; - caption { - text-align: left !important; - padding: .5em 0 0.5em 1em !important; - } - - td.code { - width: 100% !important; - - .container { - position: relative !important; - - textarea { - box-sizing: border-box !important; - position: absolute !important; - left: 0 !important; - top: 0 !important; - width: 100% !important; - height: 100% !important; - border: none !important; - background: white !important; - padding-left: 1em !important; - overflow: hidden !important; - white-space: pre !important; - } - } - } - - // middle spacing between line numbers and lines - td.gutter .line { - text-align: right !important; - padding: 0 0.5em 0 1em !important; - } - - td.code .line { - padding: 0 1em !important; - } - } - - &.nogutter { - td.code { - .container textarea, .line { padding-left: 0em !important; } - } - } - - &.show { display: block !important; } - - // Adjust some properties when collapsed - &.collapsed { - table { display: none !important; } - - .toolbar { - padding: 0.1em 0.8em 0em 0.8em !important; - font-size: 1em !important; - position: static !important; - width: auto !important; - height: auto !important; - - span { - display: inline !important; - margin-right: 1em !important; - - a { - padding: 0 !important; - display: none !important; - &.expandSource { display: inline !important; } - } - } - } - } - - // Styles for the toolbar - .toolbar { - position: absolute !important; - right: 1px !important; - top: 1px !important; - width: 11px !important; - height: 11px !important; - font-size: 10px !important; - z-index: 10 !important; - - span.title { display: inline !important; } - - a { - display: block !important; - text-align: center !important; - text-decoration: none !important; - padding-top: 1px !important; - - &.expandSource { display: none !important; } - } - } - - &.ie { - font-size: .9em !important; - padding: 1px 0 1px 0 !important; - - .toolbar { - line-height: 8px !important; - a { - padding-top: 0px !important; - } - } - } - - // Print view. - // Colors are based on the default theme without background. - &.printing { - .line.alt1 .content, - .line.alt2 .content, - .line.highlighted .number, - .line.highlighted.alt1 .content, - .line.highlighted.alt2 .content { background: none !important; } - - // Gutter line numbers - .line { - .number { color: #bbbbbb !important; } - // Add border to the lines - .content { color: black !important; } - } - - // Toolbar when visible - .toolbar { display: none !important; } - a { text-decoration: none !important; } - .plain, .plain a { color: black !important; } - .comments, .comments a { color: #008200 !important; } - .string, .string a { color: blue !important; } - .keyword { - color: #006699 !important; - font-weight: bold !important; - } - .preprocessor { color: gray !important; } - .variable { color: #aa7700 !important; } - .value { color: #009900 !important; } - .functions { color: #ff1493 !important; } - .constants { color: #0066cc !important; } - .script { font-weight: bold !important; } - .color1, .color1 a { color: gray !important; } - .color2, .color2 a { color: #ff1493 !important; } - .color3, .color3 a { color: red !important; } - .break, .break a { color: black !important; } - } -} \ No newline at end of file diff --git a/doc-src/content/stylesheets/syntax/_shThemeRDark.scss b/doc-src/content/stylesheets/syntax/_shThemeRDark.scss deleted file mode 100644 index 83210ae6..00000000 --- a/doc-src/content/stylesheets/syntax/_shThemeRDark.scss +++ /dev/null @@ -1,113 +0,0 @@ - -// Dark Theme - -$background: none; - -$line_highlighted_background: #323E41; -$line_highlighted_number: #b9bdb6; - -$gutter_text: #afafaf; -$gutter_border_color: rgba(#fff, .15); - -$toolbar_collapsed_a: #5ba1cf; -$toolbar_collapsed_a_hover: #5ce638; -$toolbar_collapsed_background: #000; - -$toolbar_a: #fff; -$toolbar_a_hover: #e0e8ff; - -$code_plain: #dadbb1; -$code_comments: #878a85; -$code_string: #64b041; -$code_keyword: #6cc7eb; -$code_preprocessor: #cd5c57; -$code_variable: $code_keyword; -$code_value: #ffa0a0; -$code_functions: #3d95e6; -$code_constants: #e0e8ff; -$code_script: $code_keyword; -$code_script_background: none; -$code_color1: #b0b76b; -$code_color2: #98f77a; -$code_color3: #ffaa3e; -$code_color4: $code_plain; - -//@import "theme_template.scss"; - -// Interface elements. -html.dark .syntaxhighlighter { - // Actual syntax highlighter colors. - .plain, .plain a { color: $code_plain; } - .comments, .comments a { color: $code_comments; } - .string, .string a { color: $code_string; } - .keyword { color: $code_keyword; } - .preprocessor { color: $code_preprocessor; } - .variable { color: $code_variable; } - .value { color: $code_value; } - .functions { color: $code_functions; } - .constants { color: $code_constants; } - .script { - font-weight: bold; - color: $code_script; - background-color: $code_script_background; - } - .color1, .color1 a { color: $code_color1; } - .color2, .color2 a { color: $code_color2; } - .color3, .color3 a { color: $code_color3; } - .color4, .color4 a { color: $code_color4; } -} - -// Light Theme - -$background: none; - -$line_highlighted_background: #c3defe; -$line_highlighted_number: #fff; - -$gutter_text: #787878; -$gutter_border_color: #d4d0c8; - -$toolbar_collapsed_a: #3f5fbf; -$toolbar_collapsed_a_hover: #aa7700; -$toolbar_collapsed_background: #fff; - -$toolbar_a: #a0a0a0; -$toolbar_a_hover: red; - -$code_plain: black; -$code_comments: #3f5fbf; -$code_string: #4fa33f; -$code_keyword: #7f0055; -$code_preprocessor: #006699; -$code_variable: #aa7700; -$code_value: #4fa33f; -$code_functions: #b553ba; -$code_constants: #0066cc; -$code_color1: gray; -$code_color2: #ca6436; -$code_color3: red; -$code_color4: $code_plain; - -// Interface elements. -html.light .syntaxhighlighter { - // Actual syntax highlighter colors. - .plain, .plain a { color: $code_plain; } - .comments, .comments a { color: $code_comments; } - .string, .string a { color: $code_string; } - .keyword { color: $code_keyword; } - .preprocessor { color: $code_preprocessor; } - .variable { color: $code_variable; } - .value { color: $code_value; } - .functions { color: $code_functions; } - .constants { color: $code_constants; } - .script { - font-weight: bold; - color: $code_script; - background-color: $code_script_background; - } - .color1, .color1 a { color: $code_color1; } - .color2, .color2 a { color: $code_color2; } - .color3, .color3 a { color: $code_color3; } - .color4, .color4 a { color: $code_color4; } -} - diff --git a/doc-src/content/stylesheets/syntax/_syntax-theme.scss b/doc-src/content/stylesheets/syntax/_syntax-theme.scss deleted file mode 100644 index 1f423063..00000000 --- a/doc-src/content/stylesheets/syntax/_syntax-theme.scss +++ /dev/null @@ -1,8 +0,0 @@ -// Default Syntax Highlighter theme. -//@import "shCore.scss"; - -@import "shThemeRDark.scss"; - -/*.syntaxhighlighter { - .keyword { font-weight: bold !important; } -}*/ diff --git a/doc-src/content/stylesheets/syntax/_theme_template.scss b/doc-src/content/stylesheets/syntax/_theme_template.scss deleted file mode 100644 index c647cc12..00000000 --- a/doc-src/content/stylesheets/syntax/_theme_template.scss +++ /dev/null @@ -1,120 +0,0 @@ -$background: white !default; - -$line_alt1_background: $background !default; -$line_alt2_background: $background !default; - -$line_highlighted_background: #e0e0e0 !default; -$line_highlighted_number: black !default; - -$gutter_text: #afafaf !default; -$gutter_border_color: #6ce26c !default; -$gutter_border: 3px solid $gutter_border_color !default; - -$toolbar_collapsed_a: #00f !default; -$toolbar_collapsed_a_hover: #f00 !default; -$toolbar_collapsed_background: #fff !default; -$toolbar_collapsed_border: 1px solid $gutter_border_color !default; - -$toolbar_a: #fff !default; -$toolbar_a_hover: #000 !default; -$toolbar_background: $gutter_border_color !default; -$toolbar_border: none !default; - -$code_plain: black !default; -$code_comments: #008200 !default; -$code_string: blue !default; -$code_keyword: #006699 !default; -$code_preprocessor: gray !default; -$code_variable: #aa7700 !default; -$code_value: #009900 !default; -$code_functions: #ff1493 !default; -$code_constants: #0066cc !default; -$code_script: $code_keyword !default; -$code_script_background: none !default; -$code_color1: gray !default; -$code_color2: #ff1493 !default; -$code_color3: red !default; - -$caption_color: $code_plain !default; - -// Interface elements. -.syntaxhighlighter { - background-color: $background !important; - - // Highlighed line number - .line { - &.alt1 { background-color: $line_alt1_background !important; } - &.alt2 { background-color: $line_alt2_background !important; } - - // Highlighed line - &.highlighted { - &.alt1, &.alt2 { background-color: $line_highlighted_background !important; } - &.number { color: $line_highlighted_number !important; } - } - } - - table { - caption { - color: $caption_color !important; - } - } - - // Add border to the lines - .gutter { - color: $gutter_text !important; - .line { - border-right: $gutter_border !important; - - &.highlighted { - background-color: $gutter_border_color !important; - color: $background !important; - } - } - } - - &.printing .line .content { border: none !important; } - - &.collapsed { - overflow: visible !important; - - .toolbar { - color: $toolbar_collapsed_a !important; - background: $toolbar_collapsed_background !important; - border: $toolbar_collapsed_border !important; - - a { - color: $toolbar_collapsed_a !important; - &:hover { color: $toolbar_collapsed_a_hover !important; } - } - } - } - - .toolbar { - color: $toolbar_a !important; - background: $toolbar_background !important; - border: $toolbar_border !important; - a { - color: $toolbar_a !important; - &:hover { color: $toolbar_a_hover !important; } - } - } - - // Actual syntax highlighter colors. - .plain, .plain a { color: $code_plain !important; } - .comments, .comments a { color: $code_comments !important; } - .string, .string a { color: $code_string !important; } - .keyword { color: $code_keyword !important; } - .preprocessor { color: $code_preprocessor !important; } - .variable { color: $code_variable !important; } - .value { color: $code_value !important; } - .functions { color: $code_functions !important; } - .constants { color: $code_constants !important; } - .script { - font-weight: bold !important; - color: $code_script !important; - background-color: $code_script_background !important; - } - .color1, .color1 a { color: $code_color1 !important; } - .color2, .color2 a { color: $code_color2 !important; } - .color3, .color3 a { color: $code_color3 !important; } -} diff --git a/doc-src/lib/default.rb b/doc-src/lib/default.rb index 3320748c..dd315ade 100644 --- a/doc-src/lib/default.rb +++ b/doc-src/lib/default.rb @@ -1,6 +1,7 @@ # All files in the 'lib' directory will be loaded # before nanoc starts compiling. - +require 'erb' +require 'active_support/inflector' include Nanoc3::Helpers::LinkTo include Nanoc3::Helpers::Capturing include Nanoc3::Helpers::Rendering @@ -136,4 +137,17 @@ end def long_compass_version require 'compass/commands' Compass::Commands::PrintVersion.long_output_string -end \ No newline at end of file +end + + +def sprite_tutorial_links(index=false) + string = <<-ERB +<% unless index %> + * [Sprite Tutorial Index](/help/tutorials/spriting/) +<% end %> +<% Dir["./content/help/tutorials/spriting/**/*.markdown"].sort.each do |file| %> + * [<%= File.basename(file, '.markdown').gsub('-', ' ').titleize %>](/help/tutorials/spriting/<%= File.basename(file, '.markdown') %>) +<% end %> + ERB + ::ERB.new(string).result(binding) +end diff --git a/doc-src/lib/stylesheets/sass_extensions.rb b/doc-src/lib/stylesheets/sass_extensions.rb index a22ca076..67bafbd8 100644 --- a/doc-src/lib/stylesheets/sass_extensions.rb +++ b/doc-src/lib/stylesheets/sass_extensions.rb @@ -86,7 +86,9 @@ module Sass docstring.gsub(/@doc off(.*?)@doc on/m, '') end def docstring - value.gsub(PRE_COMMENT, '').gsub(POST_COMMENT, '') + v = value + v = v.join("\n") if v.respond_to?(:join) + v.gsub(PRE_COMMENT, '').gsub(POST_COMMENT, '') end def doc if value == "@doc off" diff --git a/examples/downloader.rb b/examples/downloader.rb index c8e841dc..8921dd23 100644 --- a/examples/downloader.rb +++ b/examples/downloader.rb @@ -9,8 +9,9 @@ def fetch(uri_str, limit = 10) url = URI.parse(uri_str) http = Net::HTTP.new(url.host, url.port) - http.open_timeout = 2 + http.open_timeout = 10 http.read_timeout = 30 + http.use_ssl = true response = http.start do |http| puts "getting #{url.path}" http.request_get(url.path) @@ -25,7 +26,7 @@ def fetch(uri_str, limit = 10) end def install_from_github(user, project, ext_name, branch = "master", working_directory = Dir.pwd) - download_link = "http://github.com/#{user}/#{project}/zipball/#{branch}" + download_link = "https://github.com/#{user}/#{project}/zipball/#{branch}" extdir = File.join(working_directory,'extensions') if !File.exists?("#{extdir}/#{ext_name}") diff --git a/examples/ninesixty/bootstrap.rb b/examples/ninesixty/bootstrap.rb index b2b52d70..0a976dfe 100644 --- a/examples/ninesixty/bootstrap.rb +++ b/examples/ninesixty/bootstrap.rb @@ -1,4 +1,4 @@ require File.join(File.dirname(__FILE__), '..', 'downloader') -install_from_github('chriseppstein', 'compass-960-plugin', 'ninesixty') +install_from_github('nextmat', 'compass-960-plugin', 'ninesixty') diff --git a/features/command_line.feature b/features/command_line.feature index 52aff150..f0ffbba3 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -77,16 +77,6 @@ Feature: Command Line Then an error message is printed out: A bare project cannot be created when a framework is specified. And the command exits with a non-zero error code - Scenario: Initializing a rails project - Given ruby supports fork - Given I'm in a newly created rails project: my_rails_project - When I initialize a project using: compass init rails --sass-dir app/stylesheets --css-dir public/stylesheets/compiled - Then a config file config/compass.rb is reported created - Then a config file config/compass.rb is created - And a sass file app/stylesheets/screen.scss is created - And a sass file app/stylesheets/print.scss is created - And a sass file app/stylesheets/ie.scss is created - Scenario: Compiling an existing project. Given I am using the existing project in test/fixtures/stylesheets/compass When I run: compass compile @@ -200,7 +190,7 @@ Feature: Command Line | tmp/box_shadow.css | | tmp/columns.css | | tmp/fonts.css | - | images/flag-s03c3b29b35.png | + | images/flag-s4798b5a210.png | And the following files are removed: | .sass-cache/ | | tmp/border_radius.css | @@ -208,7 +198,7 @@ Feature: Command Line | tmp/box_shadow.css | | tmp/columns.css | | tmp/fonts.css | - | images/flag-s03c3b29b35.png | + | images/flag-s4798b5a210.png | Scenario: Watching a project for changes Given ruby supports fork diff --git a/features/extensions.feature b/features/extensions.feature index 89b3857c..80730722 100644 --- a/features/extensions.feature +++ b/features/extensions.feature @@ -12,20 +12,11 @@ Feature: Extensions When I run: compass frameworks Then the list of frameworks includes "testing" - @listframeworks - Scenario: Extensions directory for rails projects - Given ruby supports fork - And I'm in a newly created rails project: my_rails_project - And the "my_rails_project/vendor/plugins/compass/extensions" directory exists - And and I have a fake extension at my_rails_project/vendor/plugins/compass/extensions/testing - When I run: compass frameworks - Then the list of frameworks includes "testing" - @listframeworks Scenario: Shared extensions directory - Given I am using the existing project in test/fixtures/stylesheets/compass - And the "~/.compass/extensions" directory exists + Given the "~/.compass/extensions" directory exists And and I have a fake extension at ~/.compass/extensions/testing + And I am using the existing project in test/fixtures/stylesheets/compass When I run: compass frameworks Then the list of frameworks includes "testing" diff --git a/features/rails_integration.feature b/features/rails_integration.feature deleted file mode 100644 index ec3df97c..00000000 --- a/features/rails_integration.feature +++ /dev/null @@ -1,32 +0,0 @@ -Feature: Rails Integration - In order to provide an integrated experience - As a Ruby on Rails user - I want to easily access the Compass functionality - - Scenario: Configure Compass from my Application - Given I'm in a rails3.1 application named 'exemplar' - When I edit 'config/application.rb' and save it with the following value: - """ - require File.expand_path('../boot', __FILE__) - require 'rails/all' - Bundler.require(:default, Rails.env) if defined?(Bundler) - module Exemplar - class Application < Rails::Application - config.encoding = "utf-8" - config.filter_parameters += [:password] - - config.compass.fonts_dir = "app/assets/fonts" - end - end - """ - And I run: compass config -p fonts_dir - Then the command should print out "app/assets/fonts" - Scenario: Rails gets access to the compass config file - Given I'm in a rails3.1 application named 'exemplar' - When I edit 'config/compass.rb' and save it with the following value: - """ - fonts_dir = "app/assets/fonts" - """ - And I run: ruby -I. -rconfig/environment -e 'puts Compass.configuration.fonts_dir' - Then the command should print out "app/assets/fonts" - diff --git a/features/step_definitions/command_line_steps.rb b/features/step_definitions/command_line_steps.rb index d8abc970..af6eb782 100644 --- a/features/step_definitions/command_line_steps.rb +++ b/features/step_definitions/command_line_steps.rb @@ -6,7 +6,6 @@ require 'compass/exec' include Compass::TestCaseHelper include Compass::CommandLineHelper include Compass::IoHelper -include Compass::RailsHelper Before do Compass.reset_configuration! @@ -41,16 +40,6 @@ Given %r{^I am in the parent directory$} do Dir.chdir ".." end -Given %r{^I'm in a newly created rails project: (.+)$} do |project_name| - @cleanup_directories << project_name - begin - generate_rails_app project_name - Dir.chdir project_name - rescue LoadError - pending "Missing Ruby-on-rails gems: sudo gem install rails" - end -end - Given /^I should clean up the directory: (\w+)$/ do |directory| @cleanup_directories << directory end @@ -135,13 +124,14 @@ end Then "the following files are reported removed:" do |table| table.rows.each do |css_file| - Then %Q{a css file #{css_file.first} is reported removed} + #need to find a better way but this works for now + step %Q{a css file #{css_file.first} is reported removed} end end Then "the following files are removed:" do |table| table.rows.each do |css_file| - Then %Q{a css file #{css_file.first} is removed} + step %Q{a css file #{css_file.first} is removed} end end @@ -257,7 +247,7 @@ end Then /^I should see the following "([^"]+)" commands:$/ do |kind, table| - Then %Q{I should be shown a list of "#{kind}" commands} + step %Q{I should be shown a list of "#{kind}" commands} commands = @last_command_list.map{|c| c =~ /^\s+\* ([^ ]+)\s+- [A-Z].+$/; [$1]} table.diff!(commands) diff --git a/features/step_definitions/extension_steps.rb b/features/step_definitions/extension_steps.rb index 2423e482..dcf4ca50 100644 --- a/features/step_definitions/extension_steps.rb +++ b/features/step_definitions/extension_steps.rb @@ -1,8 +1,10 @@ Given /^the "([^\"]*)" directory exists$/ do |directory| + directory.gsub!('~', ENV["HOME"]) if directory.include?('~/') FileUtils.mkdir_p directory end Given /^and I have a fake extension at (.*)$/ do |directory| + directory.gsub!('~', ENV["HOME"]) if directory.include?('~/') FileUtils.mkdir_p File.join(directory, 'stylesheets') FileUtils.mkdir_p File.join(directory, 'templates/project') open(File.join(directory, 'templates/project/manifest.rb'),"w") do |f| diff --git a/frameworks/compass/stylesheets/compass/_support.scss b/frameworks/compass/stylesheets/compass/_support.scss index 6891b52a..61b935a6 100644 --- a/frameworks/compass/stylesheets/compass/_support.scss +++ b/frameworks/compass/stylesheets/compass/_support.scss @@ -27,7 +27,7 @@ $experimental-support-for-opera : true !default; // Support for microsoft in experimental css3 properties (-ms). $experimental-support-for-microsoft : true !default; // Support for khtml in experimental css3 properties (-khtml). -$experimental-support-for-khtml : true !default; +$experimental-support-for-khtml : false !default; // Support for svg in experimental css3 properties. // Setting this to true might add significant size to your // generated stylesheets. diff --git a/frameworks/compass/stylesheets/compass/css3/_border-radius.scss b/frameworks/compass/stylesheets/compass/css3/_border-radius.scss index 4870b1e9..d367a97c 100644 --- a/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +++ b/frameworks/compass/stylesheets/compass/css3/_border-radius.scss @@ -17,6 +17,7 @@ $default-border-radius: 5px !default; // .crazy { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)} // // Which generates: +// // .simple { // -webkit-border-radius: 4px 4px; // -moz-border-radius: 4px / 4px; diff --git a/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss b/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss index fca9b2f6..ea47dc97 100644 --- a/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +++ b/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss @@ -40,30 +40,13 @@ $default-box-shadow-inset : false !default; $shadow-9 : false, $shadow-10: false ) { - // This has to be on a single line due to a bug in the scss parser: https://github.com/nex3/sass/issues/issue/26 - $legacy: (type-of($shadow-1) == color and type-of(if($shadow-2, $shadow-2, 0)) == number and type-of(if($shadow-3, $shadow-3, 0)) == number and type-of(if($shadow-4, $shadow-4, 0)) == number and type-of(if($shadow-5, $shadow-5, 0)) == number and ($shadow-6 == inset or type-of($shadow-6) == bool) and ($shadow-2 or $shadow-3 or $shadow-4 or $shadow-5 or $shadow-6)); - @if $legacy { - @warn "Passing separate arguments for a single shadow to box-shadow is deprecated. " + - "Pass the values as a single space-separated list, or use the single-box-shadow mixin. " + - "See http://beta.compass-style.org/help/tutorials/upgrading/antares/ for more info."; - @include single-box-shadow( - if($shadow-1, $shadow-1, $default-box-shadow-color), - if($shadow-2, $shadow-2, $default-box-shadow-h-offset), - if($shadow-3, $shadow-3, $default-box-shadow-v-offset), - if($shadow-4, $shadow-4, $default-box-shadow-blur), - if($shadow-5, $shadow-5, $default-box-shadow-spread), - if($shadow-6, $shadow-6, $default-box-shadow-inset) - ); - } - @else { - @if $shadow-1 == default { - $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color)); - } - $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10); - @include experimental(box-shadow, $shadow, - -moz, -webkit, -o, not -ms, not -khtml, official - ); + @if $shadow-1 == default { + $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color)); } + $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10); + @include experimental(box-shadow, $shadow, + -moz, -webkit, not -o, not -ms, not -khtml, official + ); } // Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3. @@ -90,4 +73,4 @@ $default-box-shadow-inset : false !default; @if $inset { $full: inset $full; } @include box-shadow($full); } -} \ No newline at end of file +} diff --git a/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss b/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss index 5f480ac2..93ff8ac0 100644 --- a/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +++ b/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss @@ -8,6 +8,6 @@ @mixin box-sizing($bs) { $bs: unquote($bs); @include experimental(box-sizing, $bs, - -moz, -webkit, not -o, -ms, not -khtml, official + -moz, -webkit, not -o, not -ms, not -khtml, official ); } diff --git a/frameworks/compass/stylesheets/compass/css3/_font-face.scss b/frameworks/compass/stylesheets/compass/css3/_font-face.scss index ce3eafe6..bd3db340 100644 --- a/frameworks/compass/stylesheets/compass/css3/_font-face.scss +++ b/frameworks/compass/stylesheets/compass/css3/_font-face.scss @@ -6,6 +6,8 @@ // * $font-files is required using font-files('relative/location', 'format'). // for best results use this order: woff, opentype/truetype, svg // * $eot is required by IE, and is a relative location of the eot file. +// * $weight shows if the font is bold, defaults to normal +// * $style defaults to normal, might be also italic // * For android 2.2 Compatiblity, please ensure that your web page has // a meta viewport tag. // * To support iOS < 4.2, an SVG file must be provided @@ -13,13 +15,20 @@ // If you need to generate other formats check out the Font Squirrel // [font generator](http://www.fontsquirrel.com/fontface/generator) // -// Example: -// -// @include font-face("this name", font-files("this.woff", woff, "this.otf", opentype), "this.eot") + +// In order to refer to a specific style of the font in your stylesheets as +// e.g. "font-style: italic;", you may add a couple of @font-face includes +// containing the respective font files for each style and specying +// respective the $style parameter. + +// Order of the includes matters, and it is: normal, bold, italic, bold+italic. + @mixin font-face( $name, $font-files, - $eot: false + $eot: false, + $weight: false, + $style: false ) { $iefont: unquote("#{$eot}?#iefix"); @font-face { @@ -28,6 +37,12 @@ src: font-url($eot); $font-files: font-url($iefont) unquote("format('eot')"), $font-files; } - src: $font-files; + src: $font-files; + @if $weight { + font-weight: $weight; + } + @if $style { + font-style: $style; + } } } diff --git a/frameworks/compass/stylesheets/compass/css3/_shared.scss b/frameworks/compass/stylesheets/compass/css3/_shared.scss index e1a7628a..1f55cb55 100644 --- a/frameworks/compass/stylesheets/compass/css3/_shared.scss +++ b/frameworks/compass/stylesheets/compass/css3/_shared.scss @@ -12,11 +12,11 @@ $khtml : $experimental-support-for-khtml, $official : true ) { - @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; } @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; } - @if $o and $experimental-support-for-opera { -o-#{$property} : $value; } - @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; } @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; } + @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; } + @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; } + @if $o and $experimental-support-for-opera { -o-#{$property} : $value; } @if $official { #{$property} : $value; } } @@ -29,10 +29,10 @@ $khtml : $experimental-support-for-khtml, $official : true ) { - @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; } @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; } - @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; } - @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; } @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; } + @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; } + @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; } + @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; } @if $official { #{$property} : #{$value}; } } diff --git a/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss b/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss index 97ee2c4c..b221f1cf 100644 --- a/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +++ b/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss @@ -23,26 +23,12 @@ $default-text-shadow-blur: 1px !default; $shadow-9 : false, $shadow-10: false ) { - // This has to be on a single line due to a bug in the scss parser: https://github.com/nex3/sass/issues/issue/26 - $legacy: type-of($shadow-1) == color and type-of(if($shadow-2, $shadow-2, 0)) == number and type-of(if($shadow-3, $shadow-3, 0)) == number and type-of(if($shadow-4, $shadow-4, 0)) == number and ($shadow-2 or $shadow-3 or $shadow-4) and not($shadow-5 or $shadow-6 or $shadow-7 or $shadow-8 or $shadow-9 or $shadow-10); - @if $legacy { - @warn "Passing separate arguments for a single shadow to text-shadow is deprecated. " + - "Pass the values as a single space-separated list, or use the single-text-shadow mixin. " + - "See http://beta.compass-style.org/help/tutorials/upgrading/antares/ for more info."; - @include single-text-shadow( - $shadow-1, - if($shadow-2, $shadow-2, $default-text-shadow-h-offset), - if($shadow-3, $shadow-3, $default-text-shadow-v-offset), - if($shadow-4, $shadow-4, $default-text-shadow-blur) - ); - } @else { - @if $shadow-1 == default { - $shadow-1: $default-text-shadow-color $default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur; - } - text-shadow: compact($shadow-1, $shadow-2, $shadow-3, - $shadow-4, $shadow-5, $shadow-6, - $shadow-7, $shadow-8, $shadow-9, $shadow-10); + @if $shadow-1 == default { + $shadow-1: $default-text-shadow-color $default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur; } + text-shadow: compact($shadow-1, $shadow-2, $shadow-3, + $shadow-4, $shadow-5, $shadow-6, + $shadow-7, $shadow-8, $shadow-9, $shadow-10); } // Provides a single cross-browser CSS text shadow. @@ -57,6 +43,6 @@ $default-text-shadow-blur: 1px !default; @if $color == none { text-shadow: none; } @else { - text-shadow: $color $hoff $voff $blur; + text-shadow: $color $hoff $voff $blur; } } diff --git a/frameworks/compass/stylesheets/compass/css3/_transform.scss b/frameworks/compass/stylesheets/compass/css3/_transform.scss index ceb18271..93cc9d96 100644 --- a/frameworks/compass/stylesheets/compass/css3/_transform.scss +++ b/frameworks/compass/stylesheets/compass/css3/_transform.scss @@ -2,14 +2,14 @@ // @doc off // Note ---------------------------------------------------------------------- -// Safari is the only browser that currently supports 3D transforms. -// Because of that it can be important to control whether a given 2D transform -// uses the full range of experimental browser prefixes, or only the 3D list. +// Safari, Chrome, and Firefox all support 3D transforms. However, +// only in the most recent builds. You should also provide fallback 2d support for +// Opera and IE. IE10 is slated to have 3d enabled, but is currently unreleased. // To make that easy, all 2D transforms include an browser-targeting toggle ($only3d) // to switch between the two support lists. The toggle defaults to 'false' (2D), // and also accepts 'true' (3D). Currently the lists are as follows: // 2D: Mozilla, Webkit, Opera, Official -// 3D: Webkit, Official **(Only Safari Supports 3D perspective)** +// 3D: Webkit, Firefox. // Available Transforms ------------------------------------------------------ // - Scale (2d and 3d) diff --git a/frameworks/compass/stylesheets/compass/css3/_transition.scss b/frameworks/compass/stylesheets/compass/css3/_transition.scss index 2cab9fd5..f220d512 100644 --- a/frameworks/compass/stylesheets/compass/css3/_transition.scss +++ b/frameworks/compass/stylesheets/compass/css3/_transition.scss @@ -23,15 +23,16 @@ $default-transition-function: false !default; $default-transition-delay: false !default; +$transitionable-prefixed-values: transform, transform-origin !default; + // One or more properties to transition // // * for multiple, use a comma-delimited list // * also accepts "all" or "none" @mixin transition-property($properties: $default-transition-property) { - @include experimental(transition-property, unquote($properties), - -moz, -webkit, -o, not -ms, not -khtml, official - ); + @if type-of($properties) == string { $properties: unquote($properties); } + @include build-prefix-values(transition-property, $properties); } // One or more durations in seconds @@ -42,7 +43,7 @@ $default-transition-delay: false !default; @mixin transition-duration($duration: $default-transition-duration) { @if type-of($duration) == string { $duration: unquote($duration); } @include experimental(transition-duration, $duration, - -moz, -webkit, -o, not -ms, not -khtml, official + -moz, -webkit, -o, -ms, not -khtml, official ); } @@ -54,7 +55,7 @@ $default-transition-delay: false !default; @mixin transition-timing-function($function: $default-transition-function) { @include experimental(transition-timing-function, unquote($function), - -moz, -webkit, -o, not -ms, not -khtml, official + -moz, -webkit, -o, -ms, not -khtml, official ); } @@ -66,22 +67,19 @@ $default-transition-delay: false !default; @mixin transition-delay($delay: $default-transition-delay) { @if type-of($delay) == string { $delay: unquote($delay); } @include experimental(transition-delay, $delay, - -moz, -webkit, -o, not -ms, not -khtml, official + -moz, -webkit, -o, -ms, not -khtml, official ); } // Transition all-in-one shorthand @mixin single-transition( - $properties: $default-transition-property, + $property: $default-transition-property, $duration: $default-transition-duration, $function: $default-transition-function, $delay: $default-transition-delay ) { - @include transition-property($properties); - @include transition-duration($duration); - @if $function { @include transition-timing-function($function); } - @if $delay { @include transition-delay($delay); } + @include build-prefix-values(transition, compact($property $duration $function, false), $delay); } @mixin transition( @@ -96,24 +94,61 @@ $default-transition-delay: false !default; $transition-9 : false, $transition-10: false ) { - $legacy: (type-of($transition-1) == string and type-of(if($transition-2, $transition-2, 0)) == number and type-of(if($transition-3, $transition-3, '')) == string and type-of(if($transition-4, $transition-4, 0)) == number and ($transition-2 or $transition-3 or $transition-4)); - @if $legacy { - @warn "Passing separate arguments for a single transition to transition is deprecated. " + - "Pass the values as a single space-separated list, or use the single-transition mixin."; - @include single-transition( - if($transition-1, $transition-1, $default-transition-property), - if($transition-2, $transition-2, $default-transition-duration), - if($transition-3, $transition-3, $default-transition-function), - if($transition-4, $transition-4, $default-transition-delay) - ); - } - @else { - @if $transition-1 == default { - $transition-1 : -compass-space-list(compact($default-transition-property, $default-transition-duration, $default-transition-function, $default-transition-delay)); - } - $transition : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10); - @include experimental(transition, $transition, - -moz, -webkit, -o, not -ms, not -khtml, official - ); + @if $transition-1 == default { + $transition-1 : (compact($default-transition-property, $default-transition-duration, $default-transition-function, $default-transition-delay)); } + + $transition : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10); + @include build-prefix-values(transition, $transition); +} + +@mixin build-prefix-values($property, $values, $delay: false) { + $raw-values: ($values); + $index: compact(false); + + $webkit-value: compact(false); + $moz-value: compact(false); + $ms-value: compact(false); + $o-value: compact(false); + + @each $value in $raw-values { + $value: compact(join($value, false)); + $match: false; + + @each $prefixed-value in $transitionable-prefixed-values { + @if index($value, $prefixed-value) { + $index: index($value, $prefixed-value); + $match: true; + } + } + + @if $match { + $value-prefix: nth($value, $index); + $value-suffix: compact(false); + + @for $i from 2 through length($value) { + $value-suffix: append($value-suffix, nth($value, $i), space); + } + + $non-webkit-suffix: compact(append($value-suffix, $delay, space)); + + $webkit-value: append($webkit-value, compact(join(-webkit-#{$value-prefix}, $value-suffix)), comma); + $moz-value: append($moz-value, compact(join(-moz-#{$value-prefix}, $non-webkit-suffix)), comma); + $ms-value: append($ms-value, compact(join(-ms-#{$value-prefix}, $non-webkit-suffix)), comma); + $o-value: append($o-value, compact(join(-o-#{$value-prefix}, $non-webkit-suffix)), comma); + } @else { + $non-webkit-value: compact(append($value, $delay, space)); + + $webkit-value: append($webkit-value, $value, comma); + $moz-value: append($moz-value, $non-webkit-value, comma); + $ms-value: append($ms-value, $non-webkit-value, comma); + $o-value: append($o-value, $non-webkit-value, comma); + } + } + + @if $experimental-support-for-webkit { -webkit-#{$property} : $webkit-value; @if $delay { -webkit-#{$property}-delay : $delay; } } + @if $experimental-support-for-mozilla { -moz-#{$property} : $moz-value; } + @if $experimental-support-for-microsoft { -ms-#{$property} : $ms-value; } + @if $experimental-support-for-opera { -o-#{$property} : $o-value; } + #{$property} : compact($values $delay); } diff --git a/frameworks/compass/stylesheets/compass/css3/_user-interface.scss b/frameworks/compass/stylesheets/compass/css3/_user-interface.scss index 7dbd3414..e78b2fe0 100644 --- a/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +++ b/frameworks/compass/stylesheets/compass/css3/_user-interface.scss @@ -1,19 +1,17 @@ -@import "shared"; - // User Interface ------------------------------------------------------------ // This file can be expanded to handle all the user interface properties as // they become available in browsers: // http://www.w3.org/TR/2000/WD-css3-userint-20000216 +@import "shared"; + -// User Select --------------------------------------------------------------- // This property controls the selection model and granularity of an element. // // @param $select // [ none | text | toggle | element | elements | all | inherit ] - @mixin user-select($select) { $select: unquote($select); @include experimental(user-select, $select, -moz, -webkit, not -o, not -ms, -khtml, official ); -} \ No newline at end of file +} diff --git a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss index 7fce4e37..9d7009cc 100644 --- a/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +++ b/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss @@ -15,9 +15,14 @@ $ie-font-ratio: 16px / 100%; // Set to false if you want to use absolute pixes in sizing your typography. $relative-font-sizing: true !default; +// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function +// to round the line height to the nearest half line height instead of the +// nearest integral line height to avoid large spacing between lines. +$round-to-nearest-half-line: false !default; + // Ensure there is at least this many pixels // of vertical padding above and below the text. -$min-line-padding: 2px; +$min-line-padding: 2px !default; // $base-font-size but in your output unit of choice. // Defaults to 1em when `$relative-font-sizing` @@ -59,6 +64,11 @@ $base-half-leader: $base-leader / 2; } } +// resets the baseline to 1 leading unit +@mixin reset-baseline { + @include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size)); +} + // Show a background image that can be used to debug your alignments. // include the $img argument if you would rather use your own image than the // Compass default gradient image. @@ -103,9 +113,11 @@ $base-half-leader: $base-leader / 2; } @function lines-for-font-size($font-size) { - $lines: ceil($font-size / $base-line-height); + $lines: if($round-to-nearest-half-line, + ceil(2 * $font-size / $base-line-height) / 2, + ceil($font-size / $base-line-height)); @if $lines * $base-line-height - $font-size < $min-line-padding * 2 { - $lines: $lines + 1; + $lines: $lines + if($round-to-nearest-half-line, 0.5, 1); } @return $lines; } diff --git a/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss b/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss index 041f1053..1f589893 100644 --- a/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss +++ b/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss @@ -26,9 +26,17 @@ // Hides text in an element so you can see the background. @mixin hide-text { - $approximate_em_value: 12px / 1em; - $wider_than_any_screen: -9999em; - text-indent: $wider_than_any_screen * $approximate_em_value; + // slightly wider than the box prevents issues with inline-block elements + text-indent: 110%; + white-space: nowrap; overflow: hidden; - text-align: left; +} + +// Hides text in an element by squishing the text into oblivion. +// Use this if you need to hide text contained in an inline element +// but still have it read by a screen reader. +@mixin squish-text { + font: 0/0 serif; + text-shadow: none; + color: transparent; } diff --git a/frameworks/compass/stylesheets/compass/utilities/_sprites.scss b/frameworks/compass/stylesheets/compass/utilities/_sprites.scss index 981afaaf..00668048 100644 --- a/frameworks/compass/stylesheets/compass/utilities/_sprites.scss +++ b/frameworks/compass/stylesheets/compass/utilities/_sprites.scss @@ -1 +1,2 @@ +@import "sprites/base"; @import "sprites/sprite-img"; diff --git a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss index c346e181..1b268a84 100644 --- a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +++ b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss @@ -30,18 +30,18 @@ $disable-magic-sprite-selectors:false !default; @include sprite-dimensions($map, $sprite); } @if not $disable-magic-sprite-selectors { - @include sprite-selectors($map, $sprite, $sprite); + @include sprite-selectors($map, $sprite, $sprite, $offset-x, $offset-y); } } // Include the selectors for the `$sprite` given the `$map` and the // `$full-sprite-name` // @private -@mixin sprite-selectors($map, $sprite-name, $full-sprite-name) { +@mixin sprite-selectors($map, $sprite-name, $full-sprite-name, $offset-x: 0, $offset-y: 0) { @each $selector in $sprite-selectors { @if sprite_has_selector($map, $sprite-name, $selector) { &:#{$selector}, &.#{$full-sprite-name}_#{$selector}, &.#{$full-sprite-name}-#{$selector} { - @include sprite-background-position($map, "#{$sprite-name}_#{$selector}"); + @include sprite-background-position($map, "#{$sprite-name}_#{$selector}", $offset-x, $offset-y); } } } @@ -53,13 +53,13 @@ $disable-magic-sprite-selectors:false !default; // If a base class is provided, then each class will extend it. // // If `$dimensions` is `true`, the sprite dimensions will specified. -@mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map)) { +@mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map), $offset-x: 0, $offset-y: 0) { @each $sprite-name in $sprite-names { @if sprite_does_not_have_parent($map, $sprite-name) { $full-sprite-name: "#{$prefix}-#{$sprite-name}"; .#{$full-sprite-name} { @if $base-class { @extend #{$base-class}; } - @include sprite($map, $sprite-name, $dimensions); + @include sprite($map, $sprite-name, $dimensions, $offset-x, $offset-y); } } } diff --git a/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss b/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss index b14536be..ff90c00a 100644 --- a/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss +++ b/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss @@ -28,29 +28,52 @@ $sprite-image-default-height: $sprite-default-size !default; // To reduce duplication use a sprite-bg mixin for common properties and a sprite-select mixin for positioning. @mixin sprite-img($img, $col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { @include sprite-background($img, $width, $height); - @include sprite-position($col, $row, $width, $height, $margin); } + @include sprite-position($col, $row, $width, $height, $margin); +} // Sets rules common for all sprites, assumes you want a square, but allows a rectangular region. @mixin sprite-background($img, $width: $sprite-default-size, $height: $width) { - @include sprite-background-rectangle($img, $width, $height); } + @include sprite-background-rectangle($img, $width, $height); +} // Sets rules common for all sprites, assumes a rectangular region. @mixin sprite-background-rectangle($img, $width: $sprite-image-default-width, $height: $sprite-image-default-height) { background: image-url($img) no-repeat; width: $width; height: $height; - overflow: hidden; } + overflow: hidden; +} // Allows horizontal sprite positioning optimized for a single row of sprites. @mixin sprite-column($col, $width: $sprite-image-default-width, $margin: $sprite-default-margin) { - @include sprite-position($col, 1, $width, 0px, $margin); } + @include sprite-position($col, 1, $width, 0px, $margin); +} // Allows vertical sprite positioning optimized for a single column of sprites. @mixin sprite-row($row, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { - @include sprite-position(1, $row, 0px, $height, $margin); } + @include sprite-position(1, $row, 0px, $height, $margin); +} // Allows vertical and horizontal sprite positioning from a grid of equal dimensioned sprites. @mixin sprite-position($col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { $x: ($col - 1) * -$width - ($col - 1) * $margin; $y: ($row - 1) * -$height - ($row - 1) * $margin; - background-position: $x $y; } + background-position: $x $y; +} + + + +// Similar to 'sprite-replace-text-with-dimensions' but does not autmaticly set the demensions +@mixin sprite-replace-text ($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) { + @include hide-text; + @include sprite($map, $sprite, $dimensions, $offset-x, $offset-y); + background-image: $map; + background-repeat: no-repeat; +} + +// Similar to 'replace-text-with-dimensions' but with sprites +// To use, create your sprite and then pass it in the `$map` param +// The name of the image in the sprite folder should be `$img-name` +@mixin sprite-replace-text-with-dimensions ($map, $sprite, $offset-x: 0, $offset-y: 0){ + @include sprite-replace-text ($map, $sprite, true, $offset-x, $offset-y); +} \ No newline at end of file diff --git a/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss b/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss index 8dd3a714..4da78e24 100644 --- a/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +++ b/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss @@ -3,11 +3,13 @@ background-color: $header-color; &.even, &:nth-child(2n) { background-color: $header-color - $dark-intersection; } } - tr.odd { - td { - background-color: $odd-row-color; - &.even, &:nth-child(2n) { - background-color: $odd-row-color - $dark-intersection; } } } + tr { + &.odd, &:nth-child(2n+1) { + td { + background-color: $odd-row-color; + &.even, &:nth-child(2n) { + background-color: $odd-row-color - $dark-intersection; } } } + } tr.even { td { background-color: $even-row-color; diff --git a/lib/compass.rb b/lib/compass.rb index 2d097fcb..97ec92b7 100644 --- a/lib/compass.rb +++ b/lib/compass.rb @@ -17,7 +17,7 @@ module Compass def shared_extension_paths @shared_extension_paths ||= begin if ENV["HOME"] && File.directory?(ENV["HOME"]) - [File.expand_path("~/.compass/extensions")] + [File.join(ENV["HOME"], ".compass", "extensions")] else [] end @@ -30,3 +30,6 @@ end %w(configuration frameworks app_integration actions compiler).each do |lib| require "compass/#{lib}" end + +# for rails upgrade warnings in 0.12 +require 'compass/app_integration/rails' diff --git a/lib/compass/actions.rb b/lib/compass/actions.rb index 4e924f1b..78a6fcf4 100644 --- a/lib/compass/actions.rb +++ b/lib/compass/actions.rb @@ -65,6 +65,7 @@ module Compass end def remove(file_name) + file_name ||= '' if File.directory?(file_name) FileUtils.rm_rf file_name log_action :remove, basename(file_name)+"/", options @@ -106,6 +107,5 @@ module Compass logger.record(action, file, options[:extra].to_s) end end - end end diff --git a/lib/compass/app_integration.rb b/lib/compass/app_integration.rb index bede6075..2439984d 100644 --- a/lib/compass/app_integration.rb +++ b/lib/compass/app_integration.rb @@ -1,24 +1,39 @@ -%w(stand_alone rails merb).each do |lib| - require "compass/app_integration/#{lib}" -end +require "compass/app_integration/stand_alone" module Compass module AppIntegration module Helpers - def lookup(project_type) - eval "Compass::AppIntegration::#{camelize(project_type)}" - rescue NameError - raise Compass::Error, "No application integration exists for #{project_type}" + #attr_accessor :project_types + DEAFULT_PROJECT_TYPES = { + :stand_alone => "Compass::AppIntegration::StandAlone" + } + + def init + @project_types ||= DEAFULT_PROJECT_TYPES.dup end - protected + def project_types + @project_types + end - # Stolen from ActiveSupport - def camelize(s) - s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } + def default? + @project_types.keys === DEAFULT_PROJECT_TYPES.keys + end + + def lookup(type) + unless @project_types[type].nil? + eval @project_types[type] + else + raise Compass::Error, "No application integration exists for #{type}" + end + end + + def register(type, klass) + @project_types[type] = klass end end extend Helpers + init end end diff --git a/lib/compass/app_integration/merb.rb b/lib/compass/app_integration/merb.rb deleted file mode 100644 index 546ac987..00000000 --- a/lib/compass/app_integration/merb.rb +++ /dev/null @@ -1 +0,0 @@ -require 'compass/app_integration/merb/runtime' if defined?(Merb::Plugins) diff --git a/lib/compass/app_integration/merb/runtime.rb b/lib/compass/app_integration/merb/runtime.rb deleted file mode 100644 index 883c4de7..00000000 --- a/lib/compass/app_integration/merb/runtime.rb +++ /dev/null @@ -1,63 +0,0 @@ -# To configure Merb to use compass do the following: -# -# Add dependencies to config/dependencies.rb -# -# dependency "haml", ">=2.2.0" -# dependency "merb-haml", merb_gems_version -# dependency "chriseppstein-compass", :require_as => 'compass' -# -# -# To use a different sass stylesheets locations as is recommended by compass -# add this configuration to your configuration block: -# -# Merb::BootLoader.before_app_loads do -# Merb::Plugins.config[:compass] = { -# :stylesheets => "app/stylesheets", -# :compiled_stylesheets => "public/stylesheets/compiled" -# } -# end -# -module Compass - def self.setup_template_location - # default the compass configuration if they didn't set it up yet. - Merb::Plugins.config[:compass] ||= {} - - # default sass stylesheet location unless configured to something else - Merb::Plugins.config[:compass][:stylesheets] ||= Merb.dir_for(:stylesheet) / "sass" - - # default sass css location unless configured to something else - Merb::Plugins.config[:compass][:compiled_stylesheets] ||= Merb.dir_for(:stylesheet) - - #define the template hash for the project stylesheets as well as the framework stylesheets. - template_location = { - Merb::Plugins.config[:compass][:stylesheets] => Merb::Plugins.config[:compass][:compiled_stylesheets] - } - Compass::Frameworks::ALL.each do |framework| - template_location[framework.stylesheets_directory] = Merb::Plugins.config[:compass][:compiled_stylesheets] - end - - # merge existing template locations if present - if Merb::Plugins.config[:sass][:template_location].is_a?(Hash) - template_location.merge!(Merb::Plugins.config[:sass][:template_location]) - Merb::Plugins.config[:sass][:template_location] = template_location - end - - #configure Sass to know about all these sass locations. - Sass::Plugin.options[:template_location] = template_location - end -end - -Merb::BootLoader.after_app_loads do - #set up sass if haml load didn't do it -- this happens when using a non-default stylesheet location. - unless defined?(Sass::Plugin) - require "sass/plugin" - if Merb::Plugins.config[:sass] - Sass::Plugin.options = Merb::Plugins.config[:sass] - # support old (deprecatd Merb::Config[:sass] option) - elsif Merb::Config[:sass] - Sass::Plugin.options = Merb::Config[:sass] - end - end - - Compass.setup_template_location -end diff --git a/lib/compass/app_integration/rails.rb b/lib/compass/app_integration/rails.rb index 06bc7764..9b64f4be 100644 --- a/lib/compass/app_integration/rails.rb +++ b/lib/compass/app_integration/rails.rb @@ -1,66 +1,18 @@ -%w(configuration_defaults installer).each do |lib| - require "compass/app_integration/rails/#{lib}" -end - -require 'compass/app_integration/rails/runtime' if defined?(ActionController::Base) - - module Compass module AppIntegration module Rails - extend self - - def booted! - Compass::AppIntegration::Rails.const_set(:BOOTED, true) + def initialize! + Compass::Util.compass_warn("WARNING: Please remove the call to Compass::AppIntegration::Rails.initialize! from #{caller[0].sub(/:.*$/,'')};\nWARNING: This is done automatically now. If this is default compass initializer you can just remove the file.") end - - def booted? - defined?(Compass::AppIntegration::Rails::BOOTED) && Compass::AppIntegration::Rails::BOOTED - end - - def installer(*args) - Installer.new(*args) - end - - def configuration - Compass::Configuration::Data.new('rails'). - extend(ConfigurationDefaults) - end - - def env - env_production? ? :production : :development - end - - def env_production? - if defined?(::Rails) && ::Rails.respond_to?(:env) - ::Rails.env.production? - elsif defined?(RAILS_ENV) - RAILS_ENV == "production" - end - end - def root - if defined?(::Rails) && ::Rails.respond_to?(:root) - ::Rails.root - elsif defined?(RAILS_ROOT) - RAILS_ROOT - end + Compass::Util.compass_warn("WARNING: Please remove the call to Compass::AppIntegration::Rails.root from #{caller[0].sub(/:.*$/,'')};\nWARNING: This is done automatically now. If this is default compass initializer you can just remove the file.") + ::Rails.root end - - def initialize!(config = nil) - if booted? - Compass::Util.compass_warn("Warning: Compass was booted twice. Compass has a Railtie now; please remove your intializer.") - else - booted! - end - config ||= Compass.detect_configuration_file(root) - Compass.add_project_configuration(config, :project_type => :rails) - Compass.discover_extensions! - Compass.configure_sass_plugin! - Compass.handle_configuration_change! + def env + Compass::Util.compass_warn("WARNING: Please remove the call to Compass::AppIntegration::Rails.env from #{caller[0].sub(/:.*$/,'')};\nWARNING: This is done automatically now. If this is default compass initializer you can just remove the file.") + ::Rails.env end end end end - diff --git a/lib/compass/app_integration/rails/actionpack2/action_controller.rb b/lib/compass/app_integration/rails/actionpack2/action_controller.rb deleted file mode 100644 index d3a4b9e9..00000000 --- a/lib/compass/app_integration/rails/actionpack2/action_controller.rb +++ /dev/null @@ -1,15 +0,0 @@ -# :stopdoc: -module ActionController - class Base - def process_with_compass(*args) - Sass::Plugin.rails_controller = self - begin - process_without_compass(*args) - ensure - Sass::Plugin.rails_controller = nil - end - end - alias_method_chain :process, :compass - end -end -# :startdoc: \ No newline at end of file diff --git a/lib/compass/app_integration/rails/actionpack2/sass_plugin.rb b/lib/compass/app_integration/rails/actionpack2/sass_plugin.rb deleted file mode 100644 index 8e0cba78..00000000 --- a/lib/compass/app_integration/rails/actionpack2/sass_plugin.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Sass::Plugin - class << self - attr_accessor :rails_controller - end -end \ No newline at end of file diff --git a/lib/compass/app_integration/rails/actionpack2/urls.rb b/lib/compass/app_integration/rails/actionpack2/urls.rb deleted file mode 100644 index 9780f952..00000000 --- a/lib/compass/app_integration/rails/actionpack2/urls.rb +++ /dev/null @@ -1,18 +0,0 @@ -module Compass::SassExtensions::Functions::Urls - def image_url_with_rails_integration(path, only_path = Sass::Script::Bool.new(false), cache_buster = Sass::Script::Bool.new(true)) - if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request - begin - if only_path.to_bool - Sass::Script::String.new image_path(path.value) - else - Sass::Script::String.new "url(#{image_path(path.value)})" - end - ensure - @controller = nil - end - else - image_url_without_rails_integration(path, only_path, cache_buster) - end - end - alias_method_chain :image_url, :rails_integration -end \ No newline at end of file diff --git a/lib/compass/app_integration/rails/actionpack3/railtie.rb b/lib/compass/app_integration/rails/actionpack3/railtie.rb deleted file mode 100644 index a3fc5498..00000000 --- a/lib/compass/app_integration/rails/actionpack3/railtie.rb +++ /dev/null @@ -1,46 +0,0 @@ -require 'compass' -require 'rails' - -class Rails::Railtie::Configuration - # Adds compass configuration accessor to the application configuration. - # - # If a configuration file for compass exists, it will be read in and - # the project's configuration values will already be set on the config - # object. - # - # For example: - # - # module MyApp - # class Application < Rails::Application - # config.compass.line_comments = !Rails.env.production? - # config.compass.fonts_dir = "app/assets/fonts" - # end - # end - # - # It is suggested that you create a compass configuration file if you - # want a quicker boot time when using the compass command line tool. - # - # For more information on available configuration options see: - # http://compass-style.org/help/tutorials/configuration-reference/ - def compass - @compass ||= begin - data = if (config_file = Compass.detect_configuration_file) && (config_data = Compass.configuration_for(config_file)) - config_data - else - Compass::Configuration::Data.new("project") - end - data.project_type = :rails # Forcing this makes sure all the rails defaults will be loaded. - data - end - end -end - -module Compass - class Railtie < Rails::Railtie - initializer "compass.initialize_rails" do |app| - # Configure compass for use within rails, and provide the project configuration - # that came via the rails boot process. - Compass::AppIntegration::Rails.initialize!(app.config.compass) - end - end -end \ No newline at end of file diff --git a/lib/compass/app_integration/rails/configuration_defaults.rb b/lib/compass/app_integration/rails/configuration_defaults.rb deleted file mode 100644 index fbab17e2..00000000 --- a/lib/compass/app_integration/rails/configuration_defaults.rb +++ /dev/null @@ -1,77 +0,0 @@ -module Compass - module AppIntegration - module Rails - module ConfigurationDefaults - - def project_type_without_default - :rails - end - - def default_sass_dir - if Sass::Util.ap_geq?('3.1.0.beta') - File.join("app", "assets", "stylesheets") - else - File.join("app", "stylesheets") - end - end - - def default_css_dir - File.join("public", "stylesheets") - end - - def default_images_dir - File.join("public", "images") - end - - def default_fonts_dir - File.join("public", "fonts") - end - - def default_javascripts_dir - if Sass::Util.ap_geq?('3.1.0.beta') - File.join("app", "assets", "javascripts") - else - File.join("public", "javascripts") - end - end - - def default_http_images_path - "#{top_level.http_path}images" - end - - def default_http_javascripts_path - "#{top_level.http_path}javascripts" - end - - def default_http_fonts_path - "#{top_level.http_path}fonts" - end - - def default_http_stylesheets_path - "#{top_level.http_path}stylesheets" - end - - def default_extensions_dir - File.join("vendor", "plugins", "compass_extensions") - end - - def default_cache_dir - File.join("tmp", "sass-cache") - end - - def default_project_path - project_path = Compass::AppIntegration::Rails.root - end - - def default_http_path - "/" # XXX Where is/was this stored in the Rails config? - end - - def default_environment - Compass::AppIntegration::Rails.env - end - - end - end - end -end diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb deleted file mode 100644 index e4f3db92..00000000 --- a/lib/compass/app_integration/rails/installer.rb +++ /dev/null @@ -1,182 +0,0 @@ -module Compass - module Installers - class Base - end - class ManifestInstaller < Base - end - end - - module AppIntegration - module Rails - class Installer < Compass::Installers::ManifestInstaller - - def completed_configuration - config = {} - config[:sass_dir] = prompt_sass_dir unless sass_dir_without_default - config[:css_dir] = prompt_css_dir unless css_dir_without_default - config unless config.empty? - end - - def write_configuration_files(config_file = nil) - config_file ||= targetize('config/compass.rb') - unless File.exists?(config_file) - directory File.dirname(config_file) - write_file config_file, config_contents - end - unless rails3? - directory File.dirname(targetize('config/initializers/compass.rb')) - write_file targetize('config/initializers/compass.rb'), initializer_contents - end - end - - def rails3? - File.exists?(targetize('config/application.rb')) - end - - def prepare - write_configuration_files - end - - def gem_config_instructions - if rails3? - %Q{Add the following to your Gemfile:\n\n gem "compass", ">= #{Compass::VERSION}"} - else - %Q{Add the following to your environment.rb:\n\n config.gem "compass", :version => ">= #{Compass::VERSION}"} - end - end - - def finalize(options = {}) - if options[:create] - puts <<-NEXTSTEPS - -Congratulations! Your rails project has been configured to use Compass. -Just a couple more things left to do. - -#{gem_config_instructions} - -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 - unless options[:prepare] - if manifest.has_stylesheet? - puts "\nNow add these lines to the head of your layout(s):\n\n" - puts stylesheet_links - end - end - end - - def hamlize? - # XXX Is there a better way to detect haml in a particular rails project? - require 'haml' - true - rescue LoadError - false - end - - def install_location_for_html(to, options) - separate("public/#{pattern_name_as_dir}#{to}") - end - - def prompt_sass_dir - if rails3? - nil - else - recommended_location = separate('app/stylesheets') - default_location = separate('public/stylesheets/sass') - print %Q{Compass recommends that you keep your stylesheets in #{recommended_location} - instead of the Sass default location of #{default_location}. - Is this OK? (Y/n) } - answer = $stdin.gets.downcase[0] - answer == ?n ? default_location : recommended_location - end - end - - def prompt_css_dir - if rails3? - nil - else - recommended_location = separate("public/stylesheets/compiled") - default_location = separate("public/stylesheets") - puts - print %Q{Compass recommends that you keep your compiled css in #{recommended_location}/ - instead the Sass default of #{default_location}/. - However, if you're exclusively using Sass, then #{default_location}/ is recommended. - Emit compiled stylesheets to #{recommended_location}/? (Y/n) } - answer = $stdin.gets - answer = answer.downcase[0] - answer == ?n ? default_location : recommended_location - end - end - - def config_contents - project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil - ("# This configuration file works with both the Compass command line tool and within Rails.\n" + - Compass.configuration.serialize) - ensure - Compass.configuration.project_path = project_path - end - - def initializer_contents - %Q{require 'compass' - |require 'compass/app_integration/rails' - |Compass::AppIntegration::Rails.initialize! - |}.gsub(/^\s+\|/,'') - end - - def stylesheet_prefix - if css_dir.length >= 19 - "#{css_dir[19..-1]}/" - else - nil - end - end - - def stylesheet_links - if hamlize? - haml_stylesheet_links - else - html_stylesheet_links - end - end - - def haml_stylesheet_links - html = "%head\n" - manifest.each_stylesheet do |stylesheet| - # Skip partials. - next if File.basename(stylesheet.from)[0..0] == "_" - ss_line = " = stylesheet_link_tag '#{stylesheet_prefix}#{stylesheet.to.sub(/\.s[ac]ss$/,'.css')}'" - if stylesheet.options[:media] - ss_line += ", :media => '#{stylesheet.options[:media]}'" - end - if stylesheet.options[:condition] - ss_line = " /[if #{stylesheet.options[:condition]}]\n " + ss_line - end - html << ss_line + "\n" - end - html - end - def html_stylesheet_links - html = "\n" - manifest.each_stylesheet do |stylesheet| - # Skip partials. - next if File.basename(stylesheet.from)[0..0] == "_" - ss_line = "<%= stylesheet_link_tag '#{stylesheet_prefix}#{stylesheet.to.sub(/\.s[ac]ss$/,'.css')}'" - if stylesheet.options[:media] - ss_line += ", :media => '#{stylesheet.options[:media]}'" - end - ss_line += " %>" - if stylesheet.options[:condition] - ss_line = "" - end - html << " #{ss_line}\n" - end - html << "" - html - end - end - end - end -end diff --git a/lib/compass/app_integration/rails/runtime.rb b/lib/compass/app_integration/rails/runtime.rb deleted file mode 100644 index d2765ef0..00000000 --- a/lib/compass/app_integration/rails/runtime.rb +++ /dev/null @@ -1,27 +0,0 @@ -unless defined?(Compass::RAILS_LOADED) - Compass::RAILS_LOADED = true - begin - require 'action_pack/version' - if ActionPack::VERSION::MAJOR >= 3 - # TODO figure something out so image_path works with rails integration - %w(railtie).each do |lib| - require "compass/app_integration/rails/actionpack3/#{lib}" - end - else - %w(action_controller sass_plugin urls).each do |lib| - require "compass/app_integration/rails/actionpack2/#{lib}" - end - end - rescue LoadError => e - $stderr.puts "Compass could not access the rails environment." - rescue NameError => e - $stderr.puts "Compass could not access the rails environment." - end - - # Wierd that this has to be re-included to pick up sub-modules. Ruby bug? - class Sass::Script::Functions::EvaluationContext - include Sass::Script::Functions - private - include ActionView::Helpers::AssetTagHelper - end -end diff --git a/lib/compass/app_integration/rails/templates/compass-install-rails.rb b/lib/compass/app_integration/rails/templates/compass-install-rails.rb deleted file mode 100644 index aa2b8ce8..00000000 --- a/lib/compass/app_integration/rails/templates/compass-install-rails.rb +++ /dev/null @@ -1,78 +0,0 @@ -# ================================================================= -# Compass Ruby on Rails Installer (template) v.1.0 -# written by Derek Perez (derek@derekperez.com) -# ----------------------------------------------------------------- -# NOTE: This installer is designed to work as a Rails template, -# and can only be used with Rails 2.3+. -# ----------------------------------------------------------------- -# Copyright (c) 2009 Derek Perez -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# ================================================================= - -# Determine if we use sudo, defaults to true unless we are -# on win32, cygwin, or mingw32 or they ask us not to -def sudo_is_an_option? - return false if RUBY_PLATFORM =~ /(win|w)32$/ # true if win32, cygwin or mingw32 - return false if ENV['NO_SUDO'] =~ /true/i - return true -end - -puts "===================================================" -puts "Welcome to the Compass Installer for Ruby on Rails!" -puts "===================================================" -puts - -# css framework prompt -css_framework = ask("What CSS Framework install do you want to use with Compass?") - -# sass storage prompt -sass_dir = ask("Where would you like to keep your sass files within your project? (default: 'app/stylesheets')") -sass_dir = "app/stylesheets" if Compass::Util.blank?(sass_dir) - -# compiled css storage prompt -css_dir = ask("Where would you like Compass to store your compiled css files? (default: 'public/stylesheets/compiled')") -css_dir = "public/stylesheets/compiled" if Compass::Util.blank?(css_dir) - -# use sudo for gem commands? -use_sudo = nil -if sudo_is_an_option? # dont give them the option if they are on a system that can't use sudo (aka windows) - use_sudo = yes?("Use sudo for the gem commands? (the default for your system is #{sudo_is_an_option? ? 'yes' : 'no'})") -end -use_sudo = sudo_is_an_option? if Compass::Util.blank?(use_sudo) - -# define dependencies -gem "haml", :version => ">=3.0.0" -gem "compass", :version => ">= 0.10.0" - -# install and unpack -rake "gems:install GEM=haml --trace", :sudo => use_sudo -rake "gems:install GEM=compass --trace", :sudo => use_sudo -rake "gems:unpack GEM=compass --trace" - -# build out compass command -compass_command = "compass init rails . --css-dir=#{css_dir} --sass-dir=#{sass_dir} " -compass_command << "--using #{css_framework} " unless Compass::Util.blank?(css_framework) - -# integrate it! -run "haml --rails ." -run compass_command diff --git a/lib/compass/commands/clean_project.rb b/lib/compass/commands/clean_project.rb index e6792326..7a082380 100644 --- a/lib/compass/commands/clean_project.rb +++ b/lib/compass/commands/clean_project.rb @@ -30,7 +30,7 @@ module Compass def perform compiler = new_compiler_instance compiler.clean! - Compass::SpriteImporter.find_all_sprite_map_files(Compass.configuration.images_path).each do |sprite| + Compass::SpriteImporter.find_all_sprite_map_files(Compass.configuration.generated_images_path).each do |sprite| remove sprite end end diff --git a/lib/compass/commands/project_structure.rb b/lib/compass/commands/project_structure.rb new file mode 100644 index 00000000..8fdc887a --- /dev/null +++ b/lib/compass/commands/project_structure.rb @@ -0,0 +1,93 @@ +require 'compass/commands/project_base' +require 'compass/commands/update_project' + +module Compass + module Commands + module StructureOptionsParser + def set_options(opts) + opts.banner = %Q{ + Usage: compass structure [path/to/project] [options] + + Description: + Display the import structure of your stylesheets. + + Options: + }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") + + super + end + end + class ProjectStats < UpdateProject + + register :structure + + def initialize(working_path, options) + super + assert_project_directory_exists! + end + + def perform + @compiler = new_compiler_instance + (options[:sass_files] || sorted_sass_files).each do |sass_file| + print_tree(Compass.projectize(sass_file)) + end + end + + def print_tree(file, depth = 0, importer = @compiler.importer) + puts ((depth > 0 ? "| " : " ") * depth) + "+- " + Compass.deprojectize(file) + @compiler.staleness_checker.send(:compute_dependencies, file, importer).each do |(dep, dep_importer)| + print_tree(dep, depth + 1, dep_importer)# unless Compass.deprojectize(dep)[0...1] == "/" + end + end + + def sorted_sass_files + sass_files = @compiler.sass_files + sass_files.map! do |s| + filename = Compass.deprojectize(s, File.join(Compass.configuration.project_path, Compass.configuration.sass_dir)) + [s, File.dirname(filename), File.basename(filename)] + end + sass_files = sass_files.sort_by do |s,d,f| + File.join(d, f[0] == ?_ ? f[1..-1] : f) + end + sass_files.map!{|s,d,f| s} + end + + class << self + + def option_parser(arguments) + parser = Compass::Exec::CommandOptionParser.new(arguments) + parser.extend(Compass::Exec::GlobalOptionsParser) + parser.extend(Compass::Exec::ProjectOptionsParser) + parser.extend(StructureOptionsParser) + end + + def usage + option_parser([]).to_s + end + + def description(command) + "Report statistics about your stylesheets" + end + + def primary; false; end + + def parse!(arguments) + parser = option_parser(arguments) + parser.parse! + parse_arguments!(parser, arguments) + parser.options + end + + def parse_arguments!(parser, arguments) + if arguments.size > 0 + parser.options[:project_name] = arguments.shift if File.directory?(arguments.first) + parser.options[:sass_files] = arguments + end + end + + end + + end + end +end + diff --git a/lib/compass/commands/sprite.rb b/lib/compass/commands/sprite.rb index b93705ed..08b4afda 100644 --- a/lib/compass/commands/sprite.rb +++ b/lib/compass/commands/sprite.rb @@ -39,10 +39,11 @@ module Compass def perform relative_uri = options[:uri].gsub(/^#{Compass.configuration.images_dir}\//, '') - sprites = Compass::SpriteImporter.new(:uri => relative_uri, :options => Compass.sass_engine_options) - options[:output_file] ||= File.join(Compass.configuration.sass_path, "sprites", "_#{sprites.name}.#{Compass.configuration.preferred_syntax}") + name = Compass::SpriteImporter.sprite_name(relative_uri) + sprites = Compass::SpriteImporter.new + options[:output_file] ||= File.join(Compass.configuration.sass_path, "sprites", "_#{name}.#{Compass.configuration.preferred_syntax}") options[:skip_overrides] ||= false - contents = sprites.content_for_images(options[:skip_overrides]) + contents = Compass::SpriteImporter.content_for_images(relative_uri, name, options[:skip_overrides]) if options[:output_file][-4..-1] != "scss" contents = Sass::Engine.new(contents, Compass.sass_engine_options.merge(:syntax => :scss)).to_tree.to_sass end diff --git a/lib/compass/commands/update_project.rb b/lib/compass/commands/update_project.rb index 3edd6074..0d8f5505 100644 --- a/lib/compass/commands/update_project.rb +++ b/lib/compass/commands/update_project.rb @@ -17,6 +17,14 @@ module Compass opts.on("--time", "Display compilation times.") do self.options[:time] = true end + + opts.on("--debug-info", "Turns on sass's debuging information") do + self.options[:debug_info]= true + end + + opts.on("--no-debug-info", "Turns on sass's debuging information") do + self.options[:debug_info]= false + end super end end @@ -56,6 +64,9 @@ module Compass compiler_opts.merge!(options) compiler_opts[:sass_files] = explicit_sass_files compiler_opts[:cache_location] = determine_cache_location + if options.include?(:debug_info) && options[:debug_info] + compiler_opts[:sass][:debug_info] = options.delete(:debug_info) + end compiler_opts end diff --git a/lib/compass/commands/watch_project.rb b/lib/compass/commands/watch_project.rb index bb6e9c4b..554ffd27 100644 --- a/lib/compass/commands/watch_project.rb +++ b/lib/compass/commands/watch_project.rb @@ -81,6 +81,7 @@ module Compass action = FSSM::Backends::Default.to_s == "FSSM::Backends::Polling" ? "polling" : "watching" puts ">>> Compass is #{action} for changes. Press Ctrl-C to Stop." + $stdout.flush begin FSSM.monitor do |monitor| @@ -100,14 +101,17 @@ module Compass path.glob glob path.update do |base, relative| puts ">>> Change detected to: #{relative}" + $stdout.flush callback.call(base, relative) end path.create do |base, relative| puts ">>> New file detected: #{relative}" + $stdout.flush callback.call(base, relative) end path.delete do |base, relative| puts ">>> File Removed: #{relative}" + $stdout.flush callback.call(base, relative) end end @@ -139,6 +143,7 @@ module Compass if file = compiler.out_of_date? begin puts ">>> Change detected at "+Time.now.strftime("%T")+" to: #{relative || compiler.relative_stylesheet_name(file)}" + $stdout.flush compiler.run GC.start rescue StandardError => e diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index f5dcbe12..7292171b 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -12,9 +12,13 @@ module Compass sass_opts = options.delete(:sass) || {} self.options = options self.sass_options = options.dup + self.sass_options.delete(:quiet) self.sass_options.update(sass_opts) self.sass_options[:cache_location] ||= determine_cache_location self.sass_options[:importer] = self.importer = Sass::Importers::Filesystem.new(from) + self.sass_options[:compass] ||= {} + self.sass_options[:compass][:logger] = self.logger + self.sass_options[:compass][:environment] = Compass.configuration.environment self.staleness_checker = Sass::Plugin::StalenessChecker.new(sass_options) end @@ -33,7 +37,7 @@ module Compass def stylesheet_name(sass_file) if sass_file.index(from) == 0 - sass_file[(from.length + 1)..-6] + sass_file[(from.length + 1)..-6].sub(/\.css$/,'') else raise Compass::Error, "You must compile individual stylesheets from the project directory." end @@ -138,7 +142,7 @@ module Compass end duration = options[:time] ? "(#{(css_content.__duration * 1000).round / 1000.0}s)" : "" write_file(css_filename, css_content, options.merge(:force => true, :extra => duration)) - Compass.configuration.run_callback(:stylesheet_saved, css_filename) + Compass.configuration.run_stylesheet_saved(css_filename) end def should_compile?(sass_filename, css_filename) @@ -156,10 +160,12 @@ module Compass # formatted to display in the browser (in development mode) # if there's an error. def handle_exception(sass_filename, css_filename, e) - formatted_error = "(Line #{e.sass_line}: #{e.message})" + exception_file = basename(e.sass_filename) file = basename(sass_filename) + exception_file = nil if exception_file == file + formatted_error = "(Line #{e.sass_line}#{ " of #{exception_file}" if exception_file}: #{e.message})" logger.record :error, file, formatted_error - Compass.configuration.run_callback(:stylesheet_error, sass_filename, formatted_error) + Compass.configuration.run_stylesheet_error(sass_filename, formatted_error) write_file css_filename, error_contents(e, sass_filename), options.merge(:force => true) end diff --git a/lib/compass/configuration.rb b/lib/compass/configuration.rb index d8efb812..79b3b3f2 100644 --- a/lib/compass/configuration.rb +++ b/lib/compass/configuration.rb @@ -20,6 +20,7 @@ module Compass attributes_for_directory(:css, :stylesheets), attributes_for_directory(:sass, nil), attributes_for_directory(:images), + attributes_for_directory(:generated_images), attributes_for_directory(:javascripts), attributes_for_directory(:fonts), attributes_for_directory(:extensions, nil), @@ -42,6 +43,12 @@ module Compass :chunky_png_options ].flatten + ARRAY_ATTRIBUTES = [ + :sprite_load_path, + :required_libraries, + :loaded_frameworks, + :framework_path + ] # Registers a new configuration property. # Extensions can use this to add new configuration options to compass. # diff --git a/lib/compass/configuration/comments.rb b/lib/compass/configuration/comments.rb index 2fede24d..dcf168d1 100644 --- a/lib/compass/configuration/comments.rb +++ b/lib/compass/configuration/comments.rb @@ -4,7 +4,11 @@ module Compass module Comments def comment_for_http_path - "# Set this to the root of your project when deployed:\n" + unless top_level.http_path_without_default + "# Set this to the root of your project when deployed:\nhttp_path = #{top_level.http_path.to_s.inspect}\n" + else + "" + end end def comment_for_relative_assets diff --git a/lib/compass/configuration/data.rb b/lib/compass/configuration/data.rb index ddc2de3a..30c5e7c2 100644 --- a/lib/compass/configuration/data.rb +++ b/lib/compass/configuration/data.rb @@ -18,17 +18,50 @@ module Compass class Data attr_reader :name + extend Sass::Callbacks + include Compass::Configuration::Inheritance include Compass::Configuration::Serialization include Compass::Configuration::Adapters extend Compass::Configuration::Paths + # on_sprite_saved + # yields the filename + # usage: on_sprite_saved {|filename| do_something(filename) } + define_callback :sprite_saved + chained_method :run_sprite_saved + + # on_sprite_generated + # yields 'ChunkyPNG::Image' + # usage: on_sprite_generated {|sprite_data| do_something(sprite_data) } + define_callback :sprite_generated + chained_method :run_sprite_generated + + # on_sprite_removed + # yields the filename + # usage: on_sprite_removed {|filename| do_something(filename) } + define_callback :sprite_removed + chained_method :run_sprite_removed + + # on_stylesheet_saved + # yields the filename + # usage: on_stylesheet_saved {|filename| do_something(filename) } + define_callback :stylesheet_saved + chained_method :run_stylesheet_saved + + # on_stylesheet_error + # yields the filename & message + # usage: on_stylesheet_error {|filename, message| do_something(filename, message) } + define_callback :stylesheet_error + chained_method :run_stylesheet_error + inherited_accessor *ATTRIBUTES - inherited_accessor :required_libraries, :loaded_frameworks, :framework_path #XXX we should make these arrays add up cumulatively. strip_trailing_separator *ATTRIBUTES.select{|a| a.to_s =~ /dir|path/} + inherited_array *ARRAY_ATTRIBUTES + def initialize(name, attr_hash = nil) raise "I need a name!" unless name @name = name @@ -59,7 +92,9 @@ module Compass # The block will be passed the root-relative url of the asset. # When called without a block, returns the block that was previously set. def asset_host(&block) + @set_attributes ||= {} if block_given? + @set_attributes[:asset_host] = true @asset_host = block else if @asset_host @@ -84,16 +119,19 @@ module Compass # # asset_cache_buster :none def asset_cache_buster(simple = nil, &block) + @set_attributes ||= {} if block_given? + @set_attributes[:asset_cache_buster] = true @asset_cache_buster = block elsif !simple.nil? if simple == :none + @set_attributes[:asset_cache_buster] = true @asset_cache_buster = Proc.new {|_,_| nil} else raise ArgumentError, "Unexpected argument: #{simple.inspect}" end else - if @asset_cache_buster + if set?(:asset_cache_buster) @asset_cache_buster elsif inherited_data.respond_to?(:asset_cache_buster) inherited_data.asset_cache_buster @@ -138,20 +176,10 @@ module Compass relative_assets || http_images_path == :relative end - def run_callback(event, *args) - begin - send(:"run_#{event}", *args) - rescue NoMethodError => e - unless e.message =~ /run_#{event}/ - raise - end - end - end - private def assert_valid_keys!(attr_hash) - illegal_attrs = attr_hash.keys - ATTRIBUTES + illegal_attrs = attr_hash.keys - ATTRIBUTES - ARRAY_ATTRIBUTES if illegal_attrs.size == 1 raise Error, "#{illegal_attrs.first.inspect} is not a valid configuration attribute." elsif illegal_attrs.size > 0 diff --git a/lib/compass/configuration/defaults.rb b/lib/compass/configuration/defaults.rb index 236ce672..2d6046c1 100644 --- a/lib/compass/configuration/defaults.rb +++ b/lib/compass/configuration/defaults.rb @@ -10,7 +10,7 @@ module Compass :stand_alone end - def http_path_without_default + def default_http_path "/" end @@ -60,6 +60,14 @@ module Compass end end + def default_generated_images_path + if (pp = top_level.project_path) && (dir = top_level.generated_images_dir) + Compass.projectize(dir, pp) + else + top_level.images_path + end + end + def default_javascripts_path if (pp = top_level.project_path) && (dir = top_level.javascripts_dir) Compass.projectize(dir, pp) @@ -84,10 +92,21 @@ module Compass end end + def default_generated_images_dir + top_level.images_dir + end + + def default_http_generated_images_dir + top_level.http_images_dir + end def default_http_images_dir top_level.images_dir end + + def default_sprite_load_path + [top_level.images_path] + end def default_http_images_path http_root_relative top_level.http_images_dir @@ -101,6 +120,10 @@ module Compass http_root_relative top_level.http_stylesheets_dir end + def default_http_generated_images_path + http_root_relative top_level.http_generated_images_dir + end + def default_http_fonts_dir if fd = top_level.fonts_dir_without_default fd diff --git a/lib/compass/configuration/file_data.rb b/lib/compass/configuration/file_data.rb index af628752..49c432d6 100644 --- a/lib/compass/configuration/file_data.rb +++ b/lib/compass/configuration/file_data.rb @@ -1,28 +1,6 @@ module Compass module Configuration class FileData < Data - extend Sass::Callbacks - - # on_sprite_generated - # yields the filename - # usage: on_sprite_save {|filename| do_somethign(filename) } - define_callback :sprite_saved - - # on_sprite_generated - # yields 'ChunkyPNG::Image' - # usage: on_sprite_generated {|sprite_data| do_something(sprite_data) } - define_callback :sprite_generated - - # on_stylesheet_saved - # yields the filename - # usage: on_stylesheet_saved {|filename| do_something(filename) } - define_callback :stylesheet_saved - - # on_stylesheet_error - # yields the filename & message - # usage: on_stylesheet_error {|filename, message| do_something(filename, message) } - define_callback :stylesheet_error - def self.new_from_file(config_file, defaults = nil) data = new(config_file) data.with_defaults(defaults) do diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index ebe27e04..9ef97694 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -68,16 +68,18 @@ module Compass end unless @callbacks_loaded on_saved = Proc.new do |sass_file, css_file| - Compass.configuration.run_callback(:stylesheet_saved, css_file) + Compass.configuration.run_stylesheet_saved(css_file) end if Sass::Plugin.respond_to?(:on_updated_stylesheet) Sass::Plugin.on_updated_stylesheet(&on_saved) else Sass::Plugin.on_updating_stylesheet(&on_saved) end + Sass::Plugin.on_compilation_error do |e, filename, css| - Compass.configuration.run_callback(:stylesheet_error, filename, e.message) + Compass.configuration.run_stylesheet_error(filename, e.message) end + @callbacks_loaded = true end end @@ -90,8 +92,9 @@ module Compass def add_project_configuration(*args) options = args.last.is_a?(Hash) ? args.pop : {} configuration_file_path = args.shift || detect_configuration_file + raise ArgumentError, "Too many arguments" if args.any? - if data = configuration_for(configuration_file_path, nil, configuration_for(options[:defaults])) + if AppIntegration.default? && data = configuration_for(configuration_file_path, nil, configuration_for(options[:defaults])) if data.raw_project_type add_configuration(data.raw_project_type.to_sym) elsif options[:project_type] @@ -99,10 +102,9 @@ module Compass else add_configuration(:stand_alone) end - add_configuration(data) else - add_configuration(options[:project_type] || configuration.project_type_without_default || (yield if block_given?) || :stand_alone) + add_configuration(options[:project_type] || configuration.project_type_without_default || (yield if block_given?) || :stand_alone) end end diff --git a/lib/compass/configuration/inheritance.rb b/lib/compass/configuration/inheritance.rb index da12b5bc..bbc62253 100644 --- a/lib/compass/configuration/inheritance.rb +++ b/lib/compass/configuration/inheritance.rb @@ -61,6 +61,114 @@ module Compass inherited_writer(*attributes) end + class ArrayProxy + def initialize(data, attr) + @data, @attr = data, attr + end + def to_ary + @data.send(:"read_inherited_#{@attr}_array") + end + def to_a + to_ary + end + def <<(v) + @data.send(:"add_to_#{@attr}", v) + end + def >>(v) + @data.send(:"remove_from_#{@attr}", v) + end + def serialize_to_config(prop) + if v = @data.raw(prop) + "#{prop} = #{v.inspect}" + else + s = "" + if added = @data.instance_variable_get("@added_to_#{@attr}") + added.each do |a| + s << "#{prop} << #{a.inspect}\n" + end + end + if removed = @data.instance_variable_get("@removed_from_#{@attr}") + removed.each do |r| + s << "#{prop} >> #{r.inspect}\n" + end + end + if s[-1..-1] == "\n" + s[0..-2] + else + s + end + end + end + def method_missing(m, *args, &block) + a = to_ary + if a.respond_to?(m) + a.send(m,*args, &block) + else + super + end + end + end + + def inherited_array(*attributes) + inherited_reader(*attributes) + inherited_writer(*attributes) + attributes.each do |attr| + line = __LINE__ + 1 + class_eval %Q{ + def #{attr} # def sprite_load_paths + ArrayProxy.new(self, #{attr.inspect}) # ArrayProxy.new(self, :sprite_load_paths) + end # end + def #{attr}=(value) # def sprite_load_paths=(value) + @set_attributes ||= {} # @set_attributes ||= {} + @set_attributes[#{attr.inspect}] = true # @set_attributes[:sprite_load_paths] = true + @#{attr} = Array(value) # @sprite_load_paths = Array(value) + @added_to_#{attr} = [] # @added_to_sprite_load_paths = [] + @removed_from_#{attr} = [] # @removed_from_sprite_load_paths = [] + end # end + def read_inherited_#{attr}_array # def read_inherited_sprite_load_paths_array + if #{attr}_set? # if sprite_load_paths_set? + @#{attr} # Array(@#{attr}) + else # else + value = if inherited_data # value = Array(read(:sprite_load_paths)) + Array(inherited_data.#{attr}) + else + Array(read(#{attr.inspect})) + end + value -= Array(@removed_from_#{attr}) # value -= Array(@removed_from_sprite_load_paths) + Array(@added_to_#{attr}) + value # Array(@added_to_sprite_load_paths) + value + end # end + end # end + def add_to_#{attr}(v) # def add_to_sprite_load_paths(v) + if #{attr}_set? # if sprite_load_paths_set? + raw_#{attr} << v # raw_sprite_load_paths << v + else # else + (@added_to_#{attr} ||= []) << v # (@added_to_sprite_load_paths ||= []) << v + end # end + end # end + def remove_from_#{attr}(v) # def remove_from_sprite_load_paths(v) + if #{attr}_set? # if sprite_load_paths_set? + raw_#{attr}.reject!{|e| e == v} # raw_sprite_load_path.reject!{|e| e == v}s + else # else + (@removed_from_#{attr} ||= []) << v # (@removed_from_sprite_load_paths ||= []) << v + end # end + end # end + }, __FILE__, line + end + end + + def chained_method(method) + line = __LINE__ + 1 + class_eval %Q{ + alias_method :_chained_#{method}, method + def #{method}(*args, &block) + _chained_#{method}(*args, &block) + if inherited_data + inherited_data.#{method}(*args, &block) + end + end + }, __FILE__, line + end + end @@ -124,6 +232,8 @@ module Compass def read_without_default(attribute) if set?(attribute) send("raw_#{attribute}") + elsif inherited_data.nil? + nil elsif inherited_data.respond_to?("#{attribute}_without_default") inherited_data.send("#{attribute}_without_default") elsif inherited_data.respond_to?(attribute) @@ -131,6 +241,12 @@ module Compass end end + # Reads the raw value that was set on this object. + # you generally should call raw_() instead. + def raw(attribute) + instance_variable_get("@#{attribute}") + end + # Read a value that is either inherited or set on this instance, if we get to the bottom-most configuration instance, # we ask for the default starting at the top level. def read(attribute) diff --git a/lib/compass/configuration/serialization.rb b/lib/compass/configuration/serialization.rb index ff41ecc2..b7a9bfcf 100644 --- a/lib/compass/configuration/serialization.rb +++ b/lib/compass/configuration/serialization.rb @@ -16,17 +16,24 @@ module Compass end end + def get_binding + binding + end def parse_string(contents, filename) - bind = binding + bind = get_binding eval(contents, bind, filename) - ATTRIBUTES.each do |prop| - value = eval(prop.to_s, bind) rescue nil - value = value.to_s if value.is_a?(Pathname) - self.send("#{prop}=", value) unless value.nil? + local_vars_set = eval("local_variables", bind) + local_vars_set.each do |local_var| + if (ATTRIBUTES+ARRAY_ATTRIBUTES).include?(local_var.to_sym) + value = eval(local_var.to_s, bind) + value = value.to_s if value.is_a?(Pathname) + self.send("#{local_var}=", value) + end end if @added_import_paths self.additional_import_paths ||= [] self.additional_import_paths += @added_import_paths + self.additional_import_paths.uniq! end issue_deprecation_warnings end @@ -44,7 +51,7 @@ module Compass end contents << "# Require any additional compass plugins here.\n" contents << "\n" if (required_libraries || []).any? - ATTRIBUTES.each do |prop| + (ATTRIBUTES + ARRAY_ATTRIBUTES).each do |prop| value = send("#{prop}_without_default") if value.is_a?(Proc) $stderr.puts "WARNING: #{prop} is code and cannot be written to a file. You'll need to copy it yourself." @@ -63,7 +70,11 @@ module Compass end def serialize_property(prop, value) - %Q(#{prop} = #{value.inspect}\n) + if value.respond_to?(:serialize_to_config) + value.serialize_to_config(prop) + "\n" + else + %Q(#{prop} = #{value.inspect}\n) + end end def issue_deprecation_warnings diff --git a/lib/compass/errors.rb b/lib/compass/errors.rb index 96695e34..de2ec60f 100644 --- a/lib/compass/errors.rb +++ b/lib/compass/errors.rb @@ -7,4 +7,5 @@ module Compass class MissingDependency < Error end + class SpriteException < Error; end end diff --git a/lib/compass/installers/manifest.rb b/lib/compass/installers/manifest.rb index b5faf022..6e4f0cfb 100644 --- a/lib/compass/installers/manifest.rb +++ b/lib/compass/installers/manifest.rb @@ -49,7 +49,7 @@ module Compass type :stylesheet, :plural => :stylesheets, :extensions => %w(scss sass) type :image, :plural => :images, :extensions => %w(png gif jpg jpeg tiff gif) type :javascript, :plural => :javascripts, :extensions => %w(js) - type :font, :plural => :fonts, :extensions => %w(otf woff ttf) + type :font, :plural => :fonts, :extensions => %w(eot otf woff ttf) type :html, :plural => :html, :extensions => %w(html haml) type :file, :plural => :files type :directory, :plural => :directories @@ -141,11 +141,16 @@ module Compass # evaluated in a Manifest instance context def parse(manifest_file) with_manifest(manifest_file) do - open(manifest_file) do |f| - eval(f.read, instance_binding, manifest_file) - end - end - end + if File.exists?(manifest_file) + open(manifest_file) do |f| + eval(f.read, instance_binding, manifest_file) + end + else + eval("discover :all", instance_binding, manifest_file) + end + end + end + def instance_binding binding diff --git a/lib/compass/sass_extensions/functions.rb b/lib/compass/sass_extensions/functions.rb index de4aff08..6f45e410 100644 --- a/lib/compass/sass_extensions/functions.rb +++ b/lib/compass/sass_extensions/functions.rb @@ -2,9 +2,10 @@ module Compass::SassExtensions::Functions end %w( - selectors enumerate urls display + selectors enumerate urls display inline_image image_size constants gradient_support - font_files lists colors math sprites cross_browser_support + font_files lists colors math + sprites env cross_browser_support ).each do |func| require "compass/sass_extensions/functions/#{func}" end @@ -24,6 +25,7 @@ module Sass::Script::Functions include Compass::SassExtensions::Functions::Math include Compass::SassExtensions::Functions::Sprites include Compass::SassExtensions::Functions::CrossBrowserSupport + include Compass::SassExtensions::Functions::Env end # Wierd that this has to be re-included to pick up sub-modules. Ruby bug? diff --git a/lib/compass/sass_extensions/functions/display.rb b/lib/compass/sass_extensions/functions/display.rb index 48f95ec9..104fea5e 100644 --- a/lib/compass/sass_extensions/functions/display.rb +++ b/lib/compass/sass_extensions/functions/display.rb @@ -7,6 +7,7 @@ module Compass::SassExtensions::Functions::Display datalist dfn em embed font i img input keygen kbd label mark meter output progress q rp rt ruby s samp select small span strike strong sub sup textarea time tt u var video wbr}, + :"inline-block" => %w{img}, :table => %w{table}, :"list-item" => %w{li}, :"table-row-group" => %w{tbody}, diff --git a/lib/compass/sass_extensions/functions/env.rb b/lib/compass/sass_extensions/functions/env.rb new file mode 100644 index 00000000..ae9cd66d --- /dev/null +++ b/lib/compass/sass_extensions/functions/env.rb @@ -0,0 +1,5 @@ +module Compass::SassExtensions::Functions::Env + def compass_env + Sass::Script::String.new((options[:compass][:environment] || "development").to_s) + end +end diff --git a/lib/compass/sass_extensions/functions/font_files.rb b/lib/compass/sass_extensions/functions/font_files.rb index c18ce05a..f7f72d27 100644 --- a/lib/compass/sass_extensions/functions/font_files.rb +++ b/lib/compass/sass_extensions/functions/font_files.rb @@ -1,10 +1,39 @@ module Compass::SassExtensions::Functions::FontFiles + FONT_TYPES = { + :woff => 'woff', + :otf => 'opentype', + :opentype => 'opentype', + :ttf => 'truetype', + :truetype => 'truetype', + :svg => 'svg' + } + def font_files(*args) - raise Sass::SyntaxError, "An even number of arguments must be passed to font_files()" unless args.size % 2 == 0 files = [] - while args.size > 0 - files << "#{font_url(args.shift)} format('#{args.shift}')" + args_length = args.length + skip_next = false + + args.each_with_index do |arg, index| + if skip_next + skip_next = false + next + end + + type = (args_length > (index + 1)) ? args[index + 1].value.to_sym : :wrong + + if FONT_TYPES.key? type + skip_next = true + else + type = arg.to_s.split('.').last.gsub('"', '').to_sym + end + + if FONT_TYPES.key? type + files << "#{font_url(arg)} format('#{FONT_TYPES[type]}')" + else + raise Sass::SyntaxError, "Could not determine font type for #{arg}" + end end + Sass::Script::String.new(files.join(", ")) end end diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index 175d3dba..97bf85c3 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -1,21 +1,19 @@ module Compass::SassExtensions::Functions::ImageSize # Returns the width of the image relative to the images directory def image_width(image_file) - image_path = real_path(image_file) - width = ImageProperties.new(image_path).size.first + width, _ = image_dimensions(image_file) Sass::Script::Number.new(width,["px"]) end - + # Returns the height of the image relative to the images directory def image_height(image_file) - image_path = real_path(image_file) - height = ImageProperties.new(image_path).size.last + _, height = image_dimensions(image_file) Sass::Script::Number.new(height, ["px"]) end class ImageProperties def initialize(file) - @file = file + @file = (file.respond_to?(:to_path) ? file.to_path : file) @file_type = File.extname(@file)[1..-1] end @@ -45,13 +43,26 @@ module Compass::SassExtensions::Functions::ImageSize end private + + def image_dimensions(image_file) + options[:compass] ||= {} + options[:compass][:image_dimensions] ||= {} + options[:compass][:image_dimensions][image_file.value] = ImageProperties.new(image_path_for_size(image_file.value)).size + end + + def image_path_for_size(image_file) + if File.exists?(image_file) + return image_file + end + real_path(image_file) + end + def real_path(image_file) - path = image_file.value # Compute the real path to the image on the file stystem if the images_dir is set. if Compass.configuration.images_path - File.join(Compass.configuration.images_path, path) + File.join(Compass.configuration.images_path, image_file) else - File.join(Compass.configuration.project_path, path) + File.join(Compass.configuration.project_path, image_file) end end diff --git a/lib/compass/sass_extensions/functions/inline_image.rb b/lib/compass/sass_extensions/functions/inline_image.rb index 2c59f765..5259f113 100644 --- a/lib/compass/sass_extensions/functions/inline_image.rb +++ b/lib/compass/sass_extensions/functions/inline_image.rb @@ -12,7 +12,7 @@ module Compass::SassExtensions::Functions::InlineImage while args.size > 0 path = args.shift.value real_path = File.join(Compass.configuration.fonts_path, path) - url = "url('data:#{compute_mime_type(path)};base64,#{data(real_path)}')" + url = inline_image_string(data(real_path), compute_mime_type(path)) files << "#{url} format('#{args.shift}')" end Sass::Script::String.new(files.join(", ")) @@ -39,10 +39,12 @@ private 'image/svg+xml' when /\.otf$/i 'font/opentype' + when /\.eot$/i + 'application/vnd.ms-fontobject' when /\.ttf$/i 'font/truetype' when /\.woff$/i - 'font/woff' + 'application/x-font-woff' when /\.off$/i 'font/openfont' when /\.([a-zA-Z]+)$/ diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb index d746ed28..b8e97d4c 100644 --- a/lib/compass/sass_extensions/functions/sprites.rb +++ b/lib/compass/sass_extensions/functions/sprites.rb @@ -10,6 +10,30 @@ module Compass::SassExtensions::Functions::Sprites end end + #Returns a list of all sprite names + def sprite_names(map) + Sass::Script::List.new(map.sprite_names.map { |f| Sass::Script::String.new(f) }, ' ') + end + Sass::Script::Functions.declare :sprite_names, [:map] + + # Returns the system path of the sprite file + def sprite_path(map) + Sass::Script::String.new(map.name_and_hash) + end + Sass::Script::Functions.declare :sprite_path, [:map] + + # Returns the sprite file as an inline image + # @include "icon/*.png"; + # #{$icon-sprite-base-class} { + # background-image: inline-sprite($icon-sprites); + # } + def inline_sprite(map) + verify_map(map, "sprite-url") + map.generate + inline_image(sprite_path(map)) + end + Sass::Script::Functions.declare :inline_sprite, [:map] + # Creates a Compass::SassExtensions::Sprites::SpriteMap object. A sprite map, when used in a property is the same # as calling sprite-url. So the following background properties are equivalent: # @@ -22,7 +46,7 @@ module Compass::SassExtensions::Functions::Sprites def sprite_map(glob, kwargs = {}) kwargs.extend VariableReader Compass::SassExtensions::Sprites::SpriteMap.from_uri(glob, self, kwargs) - end + end Sass::Script::Functions.declare :sprite_map, [:glob], :var_kwargs => true # Returns the image and background position for use in a single shorthand property: @@ -34,7 +58,7 @@ module Compass::SassExtensions::Functions::Sprites # # background: url('/images/icons.png?12345678') 0 -24px no-repeat; def sprite(map, sprite, offset_x = ZERO, offset_y = ZERO) - sprite = convert_sprite_name(sprite) + sprite = convert_sprite_name(sprite) verify_map(map) unless sprite.is_a?(Sass::Script::String) raise Sass::SyntaxError, %Q(The second argument to sprite() must be a sprite name. See http://beta.compass-style.org/help/tutorials/spriting/ for more information.) @@ -61,14 +85,14 @@ module Compass::SassExtensions::Functions::Sprites verify_map(map, "sprite") verify_sprite(sprite) if image = map.image_for(sprite.value) - Sass::Script::String.new(image.relative_file) + Sass::Script::String.new(image.file) else missing_image!(map, sprite) end end Sass::Script::Functions.declare :sprite_file, [:map, :sprite] - # Returns voolean if sprite has a parent + # Returns boolean if sprite has a parent def sprite_does_not_have_parent(map, sprite) sprite = convert_sprite_name(sprite) verify_map map @@ -96,9 +120,7 @@ module Compass::SassExtensions::Functions::Sprites def sprite_url(map) verify_map(map, "sprite-url") map.generate - image_url(Sass::Script::String.new("#{map.path}-s#{map.uniqueness_hash}.png"), - Sass::Script::Bool.new(false), - Sass::Script::Bool.new(false)) + generated_image_url(Sass::Script::String.new("#{map.path}-s#{map.uniqueness_hash}.png")) end Sass::Script::Functions.declare :sprite_url, [:map] @@ -122,6 +144,8 @@ module Compass::SassExtensions::Functions::Sprites # # background-position: 3px -36px; def sprite_position(map, sprite = nil, offset_x = ZERO, offset_y = ZERO) + assert_type offset_x, :Number + assert_type offset_y, :Number sprite = convert_sprite_name(sprite) verify_map(map, "sprite-position") unless sprite && sprite.is_a?(Sass::Script::String) @@ -147,16 +171,20 @@ module Compass::SassExtensions::Functions::Sprites Sass::Script::Functions.declare :sprite_position, [:map, :sprite, :offset_x, :offset_y] def sprite_image(*args) - raise Sass::SyntaxError, %Q(The sprite-image() function has been replaced by sprite(). See http://beta.compass-style.org/help/tutorials/spriting/ for more information.) + raise Sass::SyntaxError, %Q(The sprite-image() function has been replaced by sprite(). See http://compass-style.org/help/tutorials/spriting/ for more information.) end protected def convert_sprite_name(sprite) - if sprite.is_a?(Sass::Script::Color) - return Sass::Script::String.new(Sass::Script::Color::HTML4_COLORS_REVERSE[sprite.rgb]) + case sprite + when Sass::Script::Color + Sass::Script::String.new(Sass::Script::Color::HTML4_COLORS_REVERSE[sprite.rgb]) + when Sass::Script::Bool + Sass::Script::String.new(sprite.to_s) + else + sprite end - sprite end def verify_map(map, error = "sprite") diff --git a/lib/compass/sass_extensions/functions/urls.rb b/lib/compass/sass_extensions/functions/urls.rb index 50ffab52..f72cdeb0 100644 --- a/lib/compass/sass_extensions/functions/urls.rb +++ b/lib/compass/sass_extensions/functions/urls.rb @@ -1,112 +1,203 @@ module Compass::SassExtensions::Functions::Urls - def stylesheet_url(path, only_path = Sass::Script::Bool.new(false)) - # Compute the path to the stylesheet, either root relative or stylesheet relative - # or nil if the http_images_path is not set in the configuration. - http_stylesheets_path = if relative? - compute_relative_path(Compass.configuration.css_path) - elsif Compass.configuration.http_stylesheets_path - Compass.configuration.http_stylesheets_path - else - Compass.configuration.http_root_relative(Compass.configuration.css_dir) - end - path = "#{http_stylesheets_path}/#{path.value}" - if only_path.to_bool - Sass::Script::String.new(clean_path(path)) - else - clean_url(path) - end + def self.has?(base, instance_method) + Sass::Util.has?(:instance_method, base, instance_method) end - Sass::Script::Functions.declare :stylesheet_url, [:path] - Sass::Script::Functions.declare :stylesheet_url, [:path, :only_path] - def font_url(path, only_path = Sass::Script::Bool.new(false)) - path = path.value # get to the string value of the literal. - - # Short curcuit if they have provided an absolute url. - if absolute_path?(path) - return Sass::Script::String.new("url(#{path})") - end - - # Compute the path to the font file, either root relative or stylesheet relative - # or nil if the http_fonts_path cannot be determined from the configuration. - http_fonts_path = if relative? - compute_relative_path(Compass.configuration.fonts_path) - else - Compass.configuration.http_fonts_path - end - - path = "#{http_fonts_path}/#{path}" - - if only_path.to_bool - Sass::Script::String.new(clean_path(path)) - else - clean_url(path) - end + def self.included(base) + base.send(:include, StylesheetUrl) unless has?(base, :stylesheet_url) + base.send(:include, FontUrl) unless has?(base, :font_url) + base.send(:include, ImageUrl) unless has?(base, :image_url) + base.send(:include, GeneratedImageUrl) unless has?(base, :generated_image_url) end - Sass::Script::Functions.declare :font_url, [:path] - Sass::Script::Functions.declare :font_url, [:path, :only_path] - def image_url(path, only_path = Sass::Script::Bool.new(false), cache_buster = Sass::Script::Bool.new(true)) - path = path.value # get to the string value of the literal. - - if path =~ %r{^#{Regexp.escape(Compass.configuration.http_images_path)}/(.*)} - # Treat root relative urls (without a protocol) like normal if they start with - # the images path. - path = $1 - elsif absolute_path?(path) - # Short curcuit if they have provided an absolute url. - return Sass::Script::String.new("url(#{path})") - end - - # Compute the path to the image, either root relative or stylesheet relative - # or nil if the http_images_path is not set in the configuration. - http_images_path = if relative? - compute_relative_path(Compass.configuration.images_path) - elsif Compass.configuration.http_images_path - Compass.configuration.http_images_path - else - Compass.configuration.http_root_relative(Compass.configuration.images_dir) - end - - # Compute the real path to the image on the file stystem if the images_dir is set. - real_path = if Compass.configuration.images_dir - File.join(Compass.configuration.project_path, Compass.configuration.images_dir, path) - end - - # prepend the path to the image if there's one - if http_images_path - http_images_path = "#{http_images_path}/" unless http_images_path[-1..-1] == "/" - path = "#{http_images_path}#{path}" - end - - # Compute the asset host unless in relative mode. - asset_host = if !relative? && Compass.configuration.asset_host - Compass.configuration.asset_host.call(path) - end - - # Compute and append the cache buster if there is one. - if cache_buster.to_bool - if cache_buster.is_a?(Sass::Script::String) - path += "?#{cache_buster.value}" - else - path = cache_busted_path(path, real_path) + module StylesheetUrl + def self.included(base) + if base.respond_to?(:declare) + base.declare :stylesheet_url, [:path] + base.declare :stylesheet_url, [:path, :only_path] end end + def stylesheet_url(path, only_path = Sass::Script::Bool.new(false)) + # Compute the path to the stylesheet, either root relative or stylesheet relative + # or nil if the http_images_path is not set in the configuration. + http_stylesheets_path = if relative? + compute_relative_path(Compass.configuration.css_path) + elsif Compass.configuration.http_stylesheets_path + Compass.configuration.http_stylesheets_path + else + Compass.configuration.http_root_relative(Compass.configuration.css_dir) + end - # prepend the asset host if there is one. - path = "#{asset_host}#{'/' unless path[0..0] == "/"}#{path}" if asset_host + path = "#{http_stylesheets_path}/#{path.value}" + if only_path.to_bool + Sass::Script::String.new(clean_path(path)) + else + clean_url(path) + end + end + end + + module FontUrl + def self.included(base) + if base.respond_to?(:declare) + base.declare :font_url, [:path] + base.declare :font_url, [:path, :only_path] + end + end + def font_url(path, only_path = Sass::Script::Bool.new(false)) + path = path.value # get to the string value of the literal. + + # Short curcuit if they have provided an absolute url. + if absolute_path?(path) + return Sass::Script::String.new("url(#{path})") + end + + # Compute the path to the font file, either root relative or stylesheet relative + # or nil if the http_fonts_path cannot be determined from the configuration. + http_fonts_path = if relative? + compute_relative_path(Compass.configuration.fonts_path) + else + Compass.configuration.http_fonts_path + end + + path = "#{http_fonts_path}/#{path}" + + if only_path.to_bool + Sass::Script::String.new(clean_path(path)) + else + clean_url(path) + end + end + end + + module ImageUrl + def self.included(base) + if base.respond_to?(:declare) + base.declare :image_url, [:path] + base.declare :image_url, [:path, :only_path] + base.declare :image_url, [:path, :only_path, :cache_buster] + end + end + def image_url(path, only_path = Sass::Script::Bool.new(false), cache_buster = Sass::Script::Bool.new(true)) + path = path.value # get to the string value of the literal. + + if path =~ %r{^#{Regexp.escape(Compass.configuration.http_images_path)}/(.*)} + # Treat root relative urls (without a protocol) like normal if they start with + # the images path. + path = $1 + elsif absolute_path?(path) + # Short curcuit if they have provided an absolute url. + return Sass::Script::String.new("url(#{path})") + end + + # Compute the path to the image, either root relative or stylesheet relative + # or nil if the http_images_path is not set in the configuration. + http_images_path = if relative? + compute_relative_path(Compass.configuration.images_path) + elsif Compass.configuration.http_images_path + Compass.configuration.http_images_path + else + Compass.configuration.http_root_relative(Compass.configuration.images_dir) + end + + # Compute the real path to the image on the file stystem if the images_dir is set. + real_path = if Compass.configuration.images_dir + File.join(Compass.configuration.project_path, Compass.configuration.images_dir, path) + end + + # prepend the path to the image if there's one + if http_images_path + http_images_path = "#{http_images_path}/" unless http_images_path[-1..-1] == "/" + path = "#{http_images_path}#{path}" + end + + # Compute the asset host unless in relative mode. + asset_host = if !relative? && Compass.configuration.asset_host + Compass.configuration.asset_host.call(path) + end + + # Compute and append the cache buster if there is one. + if cache_buster.to_bool + if cache_buster.is_a?(Sass::Script::String) + path += "?#{cache_buster.value}" + else + path = cache_busted_path(path, real_path) + end + end + + # prepend the asset host if there is one. + path = "#{asset_host}#{'/' unless path[0..0] == "/"}#{path}" if asset_host + + if only_path.to_bool + Sass::Script::String.new(clean_path(path)) + else + clean_url(path) + end + end + end + + module GeneratedImageUrl + def self.included(base) + if base.respond_to?(:declare) + base.declare :generated_image_url, [:path] + base.declare :generated_image_url, [:path, :cache_buster] + end + end + def generated_image_url(path, cache_buster = Sass::Script::Bool.new(false)) + path = path.value # get to the string value of the literal. + + if path =~ %r{^#{Regexp.escape(Compass.configuration.http_generated_images_path)}/(.*)} + # Treat root relative urls (without a protocol) like normal if they start with + # the generated_images path. + path = $1 + elsif absolute_path?(path) + # Short curcuit if they have provided an absolute url. + return Sass::Script::String.new("url(#{path})") + end + + # Compute the path to the image, either root relative or stylesheet relative + # or nil if the http_generated_images_path is not set in the configuration. + http_generated_images_path = if relative? + compute_relative_path(Compass.configuration.generated_images_path) + elsif Compass.configuration.http_generated_images_path + Compass.configuration.http_generated_images_path + else + Compass.configuration.http_root_relative(Compass.configuration.generated_images_dir) + end + + # Compute the real path to the image on the file stystem if the generated_images_dir is set. + real_path = if Compass.configuration.generated_images_dir + File.join(Compass.configuration.project_path, Compass.configuration.generated_images_dir, path) + end + + # prepend the path to the image if there's one + if http_generated_images_path + http_generated_images_path = "#{http_generated_images_path}/" unless http_generated_images_path[-1..-1] == "/" + path = "#{http_generated_images_path}#{path}" + end + + # Compute the asset host unless in relative mode. + asset_host = if !relative? && Compass.configuration.asset_host + Compass.configuration.asset_host.call(path) + end + + # Compute and append the cache buster if there is one. + if cache_buster.to_bool + if cache_buster.is_a?(Sass::Script::String) + path += "?#{cache_buster.value}" + else + path = cache_busted_path(path, real_path) + end + end + + # prepend the asset host if there is one. + path = "#{asset_host}#{'/' unless path[0..0] == "/"}#{path}" if asset_host - if only_path.to_bool - Sass::Script::String.new(clean_path(path)) - else clean_url(path) end end - Sass::Script::Functions.declare :image_url, [:path] - Sass::Script::Functions.declare :image_url, [:path, :only_path] - Sass::Script::Functions.declare :image_url, [:path, :only_path, :cache_buster] private diff --git a/lib/compass/sass_extensions/sprites.rb b/lib/compass/sass_extensions/sprites.rb index ab35d84e..277bfa94 100644 --- a/lib/compass/sass_extensions/sprites.rb +++ b/lib/compass/sass_extensions/sprites.rb @@ -8,7 +8,10 @@ module Compass end end +require 'compass/sass_extensions/sprites/image_row' +require 'compass/sass_extensions/sprites/row_fitter' require 'compass/sass_extensions/sprites/image' +require 'compass/sass_extensions/sprites/layout_methods' require 'compass/sass_extensions/sprites/sprite_methods' require 'compass/sass_extensions/sprites/image_methods' require 'compass/sass_extensions/sprites/sprite_map' diff --git a/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb b/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb index 99bca823..19c210c7 100644 --- a/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +++ b/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb @@ -13,19 +13,7 @@ module Compass @canvas = ChunkyPNG::Image.new(width, height, ChunkyPNG::Color::TRANSPARENT) images.each do |image| input_png = ChunkyPNG::Image.from_file(image.file) - if image.repeat == "no-repeat" - canvas.replace! input_png, image.left, image.top - else - x = image.left - (image.left / image.width).ceil * image.width - while x < width do - begin - canvas.replace! input_png, x, image.top - x += image.width - rescue ChunkyPNG::OutOfBounds - break; - end - end - end + canvas.replace! input_png, image.left, image.top end end diff --git a/lib/compass/sass_extensions/sprites/image.rb b/lib/compass/sass_extensions/sprites/image.rb index 3a3e57cf..4ee6a186 100644 --- a/lib/compass/sass_extensions/sprites/image.rb +++ b/lib/compass/sass_extensions/sprites/image.rb @@ -6,6 +6,11 @@ module Compass TARGET = %r{[_-]target$} HOVER = %r{[_-]hover$} PARENT = %r{(.+)[-_](.+)$} + + REPEAT_X = 'repeat-x' + NO_REPEAT = 'no-repeat' + + VALID_REPEATS = [REPEAT_X, NO_REPEAT] attr_reader :relative_file, :options, :base attr_accessor :top, :left @@ -17,7 +22,16 @@ module Compass # The Full path to the image def file - File.join(Compass.configuration.images_path, relative_file) + @file ||= find_file + end + + def find_file + Compass.configuration.sprite_load_path.compact.each do |path| + f = File.join(path, relative_file) + if File.exists?(f) + return f + end + end end # Width of the image @@ -25,6 +39,10 @@ module Compass dimensions.first end + def size + @size ||= File.size(file) + end + # Height of the image def height dimensions.last @@ -35,29 +53,43 @@ module Compass File.basename(relative_file, '.png') end - # Value of $#{name}-repeat or $repeat - def repeat - [ "#{name}-repeat", "repeat" ].each { |which| - if var = options.get_var(which) - return var.value - end - } - "no-repeat" + def get_var_file(var) + options.get_var "#{base.name}_#{name}_#{var}" end - # Value of $#{name}-position or $position defaults o 0px + # Value of $#{name}-repeat or $repeat + def repeat + @repeat ||= begin + rep = (get_var_file("repeat") || options.get_var("repeat") || Sass::Script::String.new(NO_REPEAT)).value + unless VALID_REPEATS.include? rep + raise SpriteException, "Invalid option for repeat \"#{rep}\" - valid options are #{VALID_REPEATS.join(', ')}" + end + + rep + end + end + + def repeat_x? + repeat == REPEAT_X + end + + def no_repeat? + repeat == NO_REPEAT + end + + # Value of $#{name}-position or $position defaults to 0px def position - options.get_var("#{name}-position") || options.get_var("position") || Sass::Script::Number.new(0, ["px"]) + @position||= get_var_file("position") || options.get_var("position") || Sass::Script::Number.new(0, ["px"]) end # Offset within the sprite def offset - (position.unitless? || position.unit_str == "px") ? position.value : 0 + @offset ||= (position.unitless? || position.unit_str == "px") ? position.value : 0 end - + # Spacing between this image and the next def spacing - (options.get_var("#{name}-spacing") || options.get_var("spacing") || Sass::Script::Number.new(0)).value + @spacing ||= (get_var_file("spacing") || options.get_var("spacing") || Sass::Script::Number.new(0, ['px'])).value end # MD5 hash of this file diff --git a/lib/compass/sass_extensions/sprites/image_row.rb b/lib/compass/sass_extensions/sprites/image_row.rb new file mode 100644 index 00000000..51ae0d73 --- /dev/null +++ b/lib/compass/sass_extensions/sprites/image_row.rb @@ -0,0 +1,47 @@ +require 'forwardable' + +module Compass + module SassExtensions + module Sprites + class ImageRow + extend Forwardable + + attr_reader :images, :max_width + def_delegators :@images, :last, :delete, :empty?, :length + + def initialize(max_width) + @images = [] + @max_width = max_width + end + + def add(image) + return false if !will_fit?(image) + @images << image + true + end + + alias :<< :add + + def height + images.map(&:height).max + end + + def width + images.map(&:width).max + end + + def total_width + images.inject(0) {|sum, img| sum + img.width } + end + + def efficiency + 1 - (total_width.to_f / max_width.to_f) + end + + def will_fit?(image) + (total_width + image.width) <= max_width + end + end + end + end +end \ No newline at end of file diff --git a/lib/compass/sass_extensions/sprites/layout_methods.rb b/lib/compass/sass_extensions/sprites/layout_methods.rb new file mode 100644 index 00000000..b2728056 --- /dev/null +++ b/lib/compass/sass_extensions/sprites/layout_methods.rb @@ -0,0 +1,159 @@ +module Compass + module SassExtensions + module Sprites + module LayoutMethods + HORIZONTAL = 'horizontal' + DIAGONAL = 'diagonal' + SMART = 'smart' + VERTICAL = 'vertical' + + def smart? + layout == SMART + end + + def horizontal? + layout == HORIZONTAL + end + + def diagonal? + layout == DIAGONAL + end + + def vertical? + layout == VERTICAL + end + + def layout + @layout ||= @kwargs.get_var('layout').value + end + + # Calculates the overal image dimensions + # collects image sizes and input parameters for each sprite + def compute_image_positions! + case layout + when SMART + calculate_smart_positions + when DIAGONAL + calculate_diagonal_dimensions + calculate_diagonal_positions + when HORIZONTAL + @height = height_for_horizontal_layout + calculate_horizontal_positions + @width = width_for_horizontal_layout + else + @images.sort! do |a,b| + if (b.size <=> a.size) === 0 + a.name <=> b.name + else + b.size <=> a.size + end + end + + @width = width_for_vertical_layout + calulate_vertical_postions + @height = height_for_vertical_layout + if @images.any?(&:repeat_x?) + calculate_repeat_extra_width! + tile_images_that_repeat + end + end + end + + def tile_images_that_repeat + @images.map {|img| img if img.repeat_x?}.compact.each do |image| + x = image.left - (image.left / image.width).ceil * image.width + while x < @width do + begin + img = image.dup + img.top = image.top + img.left = x.to_i + @images << img + x += image.width + end + end + end + end + + def calculate_repeat_extra_width! + require 'rational' #for ruby 1.8.7 + m = @images.inject(1) {|m,img| img.repeat_x? ? m.lcm(img.width) : m} + remainder = @width % m + @width += (m - remainder) unless remainder.zero? + end + + def calculate_smart_positions + fitter = ::Compass::SassExtensions::Sprites::RowFitter.new(@images) + current_y = 0 + fitter.fit!.each do |row| + current_x = 0 + row.images.each_with_index do |image, index| + image.left = current_x + image.top = current_y + current_x += image.width + end + current_y += row.height + end + @width = fitter.width + @height = fitter.height + end + + + def calculate_diagonal_dimensions + @width = @images.inject(0) {|sum, img| sum + img.width} + @height = @images.inject(0) {|sum, img| sum + img.height} + end + + def calculate_diagonal_positions + previous = nil + @images.each_with_index do |image, index| + if previous.nil? + previous = image + image.top = @height - image.height + image.left = 0 + next + end + image.top = previous.top - image.height + image.left = previous.left + previous.width + previous = image + end + end + + def calculate_horizontal_positions + @images.each_with_index do |image, index| + image.top = image.position.unit_str == '%' ? (@height - image.height) * (image.position.value / 100.0) : image.position.value + next if index == 0 + last_image = @images[index-1] + image.left = last_image.left + last_image.width + [image.spacing, last_image.spacing].max + end + end + + def calulate_vertical_postions + @images.each_with_index do |image, index| + image.left = (image.position.unit_str == "%" ? (@width - image.width) * (image.position.value / 100.0) : image.position.value).to_i + next if index == 0 + last_image = @images[index-1] + image.top = last_image.top + last_image.height + [image.spacing, last_image.spacing].max + end + end + + def height_for_vertical_layout + last = @images.last + last.top + last.height + end + + def height_for_horizontal_layout + @height = @images.map {|image| image.height + image.offset}.max + end + + def width_for_horizontal_layout + @images.inject(0) { |sum, image| sum += (image.width + image.spacing) } + end + + def width_for_vertical_layout + @images.map { |image| image.width + image.offset }.max + end + end + end + end +end + \ No newline at end of file diff --git a/lib/compass/sass_extensions/sprites/row_fitter.rb b/lib/compass/sass_extensions/sprites/row_fitter.rb new file mode 100644 index 00000000..834c57fa --- /dev/null +++ b/lib/compass/sass_extensions/sprites/row_fitter.rb @@ -0,0 +1,92 @@ +require 'forwardable' + +module Compass + module SassExtensions + module Sprites + class RowFitter + extend Forwardable + + attr_reader :images, :rows + def_delegators :rows, :[] + + def initialize(images) + @images = images.sort do |a,b| + if a.height == b.height + b.width <=> a.width + else + a.height <=> b.height + end + end + @rows = [] + end + + def fit!(style = :scan) + send("#{style}_fit") + @rows + end + + def width + @width ||= @images.collect(&:width).max + end + + def height + @height ||= @rows.inject(0) {|sum, row| sum += row.height} + end + + def efficiency + @rows.inject(0) { |sum, row| sum += row.efficiency } ** @rows.length + end + + private + def new_row(image = nil) + row = Compass::SassExtensions::Sprites::ImageRow.new(width) + row.add(image) if image + row + end + + def fast_fit + row = new_row + @images.each do |image| + if !row.add(image) + @rows << row + row = new_row(image) + end + end + + @rows << row + end + + def scan_fit + fast_fit + + moved_images = [] + + begin + removed = false + + catch :done do + @rows.each do |row| + (@rows - [ row ]).each do |other_row| + other_row.images.each do |image| + if !moved_images.include?(image) + if row.will_fit?(image) + other_row.delete(image) + row << image + + @rows.delete(other_row) if other_row.empty? + removed = true + + moved_images << image + throw :done + end + end + end + end + end + end + end while removed + end + end + end + end +end \ No newline at end of file diff --git a/lib/compass/sass_extensions/sprites/sprite_map.rb b/lib/compass/sass_extensions/sprites/sprite_map.rb index 546dd1d1..8390faea 100644 --- a/lib/compass/sass_extensions/sprites/sprite_map.rb +++ b/lib/compass/sass_extensions/sprites/sprite_map.rb @@ -7,16 +7,29 @@ module Compass include SpriteMethods include ImageMethods + include LayoutMethods # Initialize a new sprite object from a relative file path # the path is relative to the images_path confguration option def self.from_uri(uri, context, kwargs) - importer = ::Compass::SpriteImporter.new(:uri => uri.value, :options => {}) - sprites = importer.files.map do |sprite| - sprite.gsub(Compass.configuration.images_path+"/", "") + uri = uri.value + path, name = Compass::SpriteImporter.path_and_name(uri) + files = Compass::SpriteImporter.files(uri) + sprites = files.map do |sprite| + relative_name(sprite) + end + new(sprites, path, name, context, kwargs) + end + + def self.relative_name(sprite) + sprite = File.expand_path(sprite) + Compass.configuration.sprite_load_path.each do |path| + path = File.expand_path(path) + if sprite.include?(path) + return sprite.gsub("#{path}/", "") + end end - new(sprites, importer.path, importer.name, context, kwargs) end def initialize(sprites, path, name, context, kwargs) @@ -25,6 +38,7 @@ module Compass @name = name @kwargs = kwargs @kwargs['cleanup'] ||= Sass::Script::Bool.new(true) + @kwargs['layout'] ||= Sass::Script::String.new('vertical') @images = nil @width = nil @height = nil @@ -35,7 +49,14 @@ module Compass end def inspect - to_s + puts 'images' + @images.each do |img| + puts img.file + end + puts "options" + @kwargs.each do |k,v| + puts "#{k}:#{v}" + end end def to_s(kwargs = self.kwargs) diff --git a/lib/compass/sass_extensions/sprites/sprite_methods.rb b/lib/compass/sass_extensions/sprites/sprite_methods.rb index 2fabcd06..7cfae1dd 100644 --- a/lib/compass/sass_extensions/sprites/sprite_methods.rb +++ b/lib/compass/sass_extensions/sprites/sprite_methods.rb @@ -5,7 +5,7 @@ module Compass # Changing this string will invalidate all previously generated sprite images. # We should do so only when the packing algorithm changes - SPRITE_VERSION = "1" + SPRITE_VERSION = "2" # Calculates the overal image dimensions # collects image sizes and input parameters for each sprite @@ -14,7 +14,6 @@ module Compass @width = 0 init_images compute_image_positions! - @height = @images.last.top + @images.last.height init_engine end @@ -28,20 +27,7 @@ module Compass # Creates the Sprite::Image objects for each image and calculates the width def init_images @images = image_names.collect do |relative_file| - image = Compass::SassExtensions::Sprites::Image.new(self, relative_file, kwargs) - @width = [ @width, image.width + image.offset ].max - image - end - end - - # Calculates the overal image dimensions - # collects image sizes and input parameters for each sprite - def compute_image_positions! - @images.each_with_index do |image, index| - image.left = image.position.unit_str == "%" ? (@width - image.width) * (image.position.value / 100) : image.position.value - next if index == 0 - last_image = @images[index-1] - image.top = last_image.top + last_image.height + [image.spacing, last_image.spacing].max + Image.new(self, relative_file, kwargs) end end @@ -53,10 +39,18 @@ module Compass end end end + + def name_and_hash + "#{path}-s#{uniqueness_hash}.png" + end # The on-the-disk filename of the sprite def filename - File.join(Compass.configuration.images_path, "#{path}-s#{uniqueness_hash}.png") + File.join(Compass.configuration.generated_images_path, name_and_hash) + end + + def relativize(path) + Pathname.new(path).relative_path_from(Pathname.new(Dir.pwd)).to_s rescue path end # Generate a sprite image if necessary @@ -66,20 +60,24 @@ module Compass cleanup_old_sprites end engine.construct_sprite - Compass.configuration.run_callback(:sprite_generated, engine.canvas) + Compass.configuration.run_sprite_generated(engine.canvas) save! + else + log :unchanged, filename end end def cleanup_old_sprites Dir[File.join(Compass.configuration.images_path, "#{path}-s*.png")].each do |file| + log :remove, file FileUtils.rm file + Compass.configuration.run_sprite_removed(file) end end # Does this sprite need to be generated def generation_required? - !File.exists?(filename) || outdated? + !File.exists?(filename) || outdated? || options[:force] end # Returns the uniqueness hash for this sprite object @@ -88,6 +86,7 @@ module Compass sum = Digest::MD5.new sum << SPRITE_VERSION sum << path + sum << layout images.each do |image| [:relative_file, :height, :width, :repeat, :spacing, :position, :digest].each do |attr| sum << image.send(attr).to_s @@ -100,8 +99,11 @@ module Compass # Saves the sprite engine def save! + FileUtils.mkdir_p(File.dirname(filename)) saved = engine.save(filename) - Compass.configuration.run_callback(:sprite_saved, filename) + log :create, filename + Compass.configuration.run_sprite_saved(filename) + @mtime = nil if saved saved end @@ -113,7 +115,7 @@ module Compass # Checks whether this sprite is outdated def outdated? if File.exists?(filename) - return @images.map(&:mtime).any? { |imtime| imtime.to_i > self.mtime.to_i } + return @images.any? {|image| image.mtime.to_i > self.mtime.to_i } end true end @@ -128,6 +130,11 @@ module Compass [width, height] end + def log(action, filename, *extra) + if options[:compass] && options[:compass][:logger] && !options[:quiet] + options[:compass][:logger].record(action, relativize(filename), *extra) + end + end end end end diff --git a/lib/compass/sprite_importer.rb b/lib/compass/sprite_importer.rb index 3dd1bd3e..c1b9cdc0 100644 --- a/lib/compass/sprite_importer.rb +++ b/lib/compass/sprite_importer.rb @@ -1,40 +1,33 @@ +require 'erb' +require 'compass/sprite_importer/binding' module Compass class SpriteImporter < Sass::Importers::Base - attr_accessor :uri, :options VAILD_FILE_NAME = /\A#{Sass::SCSS::RX::IDENT}\Z/ SPRITE_IMPORTER_REGEX = %r{((.+/)?([^\*.]+))/(.+?)\.png} VALID_EXTENSIONS = ['.png'] + + TEMPLATE_FOLDER = File.join(File.expand_path('../', __FILE__), 'sprite_importer') + CONTENT_TEMPLATE_FILE = File.join(TEMPLATE_FOLDER, 'content.erb') + CONTENT_TEMPLATE = ERB.new(File.read(CONTENT_TEMPLATE_FILE)) + + # finds all sprite files def self.find_all_sprite_map_files(path) hex = "[0-9a-f]" - glob = "*-{,s}#{hex*10}{#{VALID_EXTENSIONS.join(",")}}" + glob = "*-s#{hex*10}{#{VALID_EXTENSIONS.join(",")}}" Dir.glob(File.join(path, "**", glob)) end - - def self.load(uri, options) - klass = Compass::SpriteImporter.new - klass.uri, klass.options = uri, options - klass - end - - def initialize(options ={}) - @uri, @options = '', {} - options.each do |key, value| - send("#{key}=", value) - end - end def find(uri, options) - @uri, @options = uri, options if uri =~ SPRITE_IMPORTER_REGEX - return sass_engine + return self.class.sass_engine(uri, self.class.sprite_name(uri), self, options) end + nil end def find_relative(uri, base, options) - @uri, @options = uri, options - find(File.join(base, uri), options) + nil end def to_s @@ -50,45 +43,50 @@ module Compass end def mtime(uri, options) - @uri, @options = uri, options - files.sort.inject(Time.at(0)) do |max_time, file| + self.class.files(uri).sort.inject(Time.at(0)) do |max_time, file| (t = File.mtime(file)) > max_time ? t : max_time end end def key(uri, options={}) - @uri, @options = uri, options - [self.class.name + ":" + File.dirname(File.expand_path(uri)), File.basename(uri)] + [self.class.name + ":sprite:" + File.dirname(File.expand_path(uri)), File.basename(uri)] end def self.path_and_name(uri) if uri =~ SPRITE_IMPORTER_REGEX [$1, $3] else - raise Compass::Error "invalid sprite path" + raise Compass::Error, "invalid sprite path" end end # Name of this spite - def name - ensure_path_and_name! - @name + def self.sprite_name(uri) + _, name = path_and_name(uri) + name end # The on-disk location of this sprite - def path - ensure_path_and_name! - @path + def self.path(uri) + path, _ = path_and_name(uri) + path end - # Returns the Glob of image files for this sprite - def files - Dir[File.join(Compass.configuration.images_path, uri)].sort + # Returns the Glob of image files for the uri + def self.files(uri) + Compass.configuration.sprite_load_path.compact.each do |folder| + files = Dir[File.join(folder, uri)].sort + next if files.empty? + return files + end + + path = Compass.configuration.sprite_load_path.to_a.join(', ') + raise Compass::SpriteException, %Q{No files were found in the load path matching "#{uri}". Your current load paths are: #{path}} end # Returns an Array of image names without the file extension - def sprite_names - files.collect do |file| + def self.sprite_names(uri) + files(uri).collect do |file| filename = File.basename(file, '.png') unless VAILD_FILE_NAME =~ filename raise Compass::Error, "Sprite file names must be legal css identifiers. Please rename #{File.basename(file)}" @@ -97,105 +95,21 @@ module Compass end end - def validate_sprites! - files.each do |file| - unless VALID_EXTENSIONS.include? File.extname(file) - raise Compass::Error, "Invalid sprite extension only: #{VALID_EXTENSIONS.join(',')} images are allowed" - end - end - end - - # Returns the sass options for this sprite - def sass_options - options.merge(:filename => name, :syntax => :scss, :importer => self) + # Returns the sass_options for this sprite + def self.sass_options(uri, importer, options) + options.merge!(:filename => uri, :syntax => :scss, :importer => importer) end # Returns a Sass::Engine for this sprite object - def sass_engine - validate_sprites! - Sass::Engine.new(content_for_images, sass_options) + def self.sass_engine(uri, name, importer, options) + content = content_for_images(uri, name, options[:skip_overrides]) + Sass::Engine.new(content, sass_options(uri, importer, options)) end - - def ensure_path_and_name! - @path, @name = self.class.path_and_name(uri) - end # Generates the Sass for this sprite file - def content_for_images(skip_overrides = false) - <<-SCSS -@import "compass/utilities/sprites/base"; - -// General Sprite Defaults -// You can override them before you import this file. -$#{name}-sprite-base-class: ".#{name}-sprite" !default; -$#{name}-sprite-dimensions: false !default; -$#{name}-position: 0% !default; -$#{name}-spacing: 0 !default; -$#{name}-repeat: no-repeat !default; -$#{name}-prefix: '' !default; -$#{name}-clean-up: true !default; - -#{skip_overrides ? "$#{name}-sprites: sprite-map(\"#{uri}\", $cleanup: $#{name}-clean-up);" : generate_overrides } - -// All sprites should extend this class -// The #{name}-sprite mixin will do so for you. -\#{$#{name}-sprite-base-class} { - background: $#{name}-sprites no-repeat; -} - -// Use this to set the dimensions of an element -// based on the size of the original image. -@mixin #{name}-sprite-dimensions($name) { - @include sprite-dimensions($#{name}-sprites, $name) -} - -// Move the background position to display the sprite. -@mixin #{name}-sprite-position($name, $offset-x: 0, $offset-y: 0) { - @include sprite-background-position($#{name}-sprites, $name, $offset-x, $offset-y) -} - -// Extends the sprite base class and set the background position for the desired sprite. -// It will also apply the image dimensions if $dimensions is true. -@mixin #{name}-sprite($name, $dimensions: $#{name}-sprite-dimensions, $offset-x: 0, $offset-y: 0) { - @extend \#{$#{name}-sprite-base-class}; - @include sprite($#{name}-sprites, $name, $dimensions, $offset-x, $offset-y) -} - -@mixin #{name}-sprites($sprite-names, $dimensions: $#{name}-sprite-dimensions, $prefix: sprite-map-name($#{name}-sprites)) { - @include sprites($#{name}-sprites, $sprite-names, $#{name}-sprite-base-class, $dimensions, $prefix) -} - -// Generates a class for each sprited image. -@mixin all-#{name}-sprites($dimensions: $#{name}-sprite-dimensions, $prefix: sprite-map-name($#{name}-sprites)) { - @include #{name}-sprites(#{sprite_names.join(" ")}, $dimensions, $prefix); -} -SCSS - end - - # Generates the override defaults for this Sprite - # $#{name}-#{sprite_name}-position - # $#{name}-#{sprite_name}-spacing - # #{name}-#{sprite_name}-repeat: - def generate_overrides - content = <<-TXT -// These variables control the generated sprite output -// You can override them selectively before you import this file. - TXT - sprite_names.map do |sprite_name| - content += <<-SCSS -$#{name}-#{sprite_name}-position: $#{name}-position !default; -$#{name}-#{sprite_name}-spacing: $#{name}-spacing !default; -$#{name}-#{sprite_name}-repeat: $#{name}-repeat !default; - SCSS - end.join - - content += "\n$#{name}-sprites: sprite-map(\"#{uri}\", \n$cleanup: $#{name}-clean-up,\n" - content += sprite_names.map do |sprite_name| -%Q{ $#{sprite_name}-position: $#{name}-#{sprite_name}-position, - $#{sprite_name}-spacing: $#{name}-#{sprite_name}-spacing, - $#{sprite_name}-repeat: $#{name}-#{sprite_name}-repeat} - end.join(",\n") - content += ");" + def self.content_for_images(uri, name, skip_overrides = false) + binder = Compass::Sprites::Binding.new(:name => name, :uri => uri, :skip_overrides => skip_overrides, :sprite_names => sprite_names(uri), :files => files(uri)) + CONTENT_TEMPLATE.result(binder.get_binding) end end end diff --git a/lib/compass/sprite_importer/binding.rb b/lib/compass/sprite_importer/binding.rb new file mode 100644 index 00000000..3e56b585 --- /dev/null +++ b/lib/compass/sprite_importer/binding.rb @@ -0,0 +1,11 @@ +require 'ostruct' +module Compass + module Sprites + class Binding < OpenStruct + + def get_binding + binding + end + end + end +end \ No newline at end of file diff --git a/lib/compass/sprite_importer/content.erb b/lib/compass/sprite_importer/content.erb new file mode 100644 index 00000000..ccc6144e --- /dev/null +++ b/lib/compass/sprite_importer/content.erb @@ -0,0 +1,81 @@ +@import "compass/utilities/sprites/base"; + +// General Sprite Defaults +// You can override them before you import this file. +$<%= name %>-sprite-base-class: ".<%= name %>-sprite" !default; +$<%= name %>-sprite-dimensions: false !default; +$<%= name %>-position: 0% !default; +$<%= name %>-spacing: 0 !default; +$<%= name %>-repeat: no-repeat !default; +$<%= name %>-prefix: '' !default; +$<%= name %>-clean-up: true !default; +$<%= name %>-layout:vertical !default; +$<%= name %>-inline: false !default; + +<% if skip_overrides %> + $<%= name %>-sprites: sprite-map("<%= uri %>", $layout: $<%= name %>-layout, $cleanup: $<%= name %>-clean-up); +<% else %> + // These variables control the generated sprite output + // You can override them selectively before you import this file. + <% sprite_names.each do |sprite_name| %> + $<%= name %>-<%= sprite_name %>-position: $<%= name %>-position !default; + $<%= name %>-<%= sprite_name %>-spacing: $<%= name %>-spacing !default; + $<%= name %>-<%= sprite_name %>-repeat: $<%= name %>-repeat !default; + <% end %> + + $<%= name %>-sprites: sprite-map("<%= uri %>", + <% sprite_names.each do |sprite_name| %> + $<%= name %>-<%= sprite_name %>-position: $<%= name %>-<%= sprite_name %>-position, + $<%= name %>-<%= sprite_name %>-spacing: $<%= name %>-<%= sprite_name %>-spacing, + $<%= name %>-<%= sprite_name %>-repeat: $<%= name %>-<%= sprite_name %>-repeat, + <% end %> + $layout: $<%= name %>-layout, + $cleanup: $<%= name %>-clean-up + ); +<% end %> + +// All sprites should extend this class +// The <%= name %>-sprite mixin will do so for you. +@if $<%= name %>-inline { + #{$<%= name %>-sprite-base-class} { + background-image: inline-sprite($<%= name %>-sprites); + } +} @else { + #{$<%= name %>-sprite-base-class} { + background: $<%= name %>-sprites no-repeat; + } +} +//sass functions to return the dimensions of a sprite image as units +<% [:width, :height].each do |dimension| %> + @function <%= name %>-sprite-<%= dimension %>($name) { + $file: sprite_file($<%= name %>-sprites, $name); + @return image-<%= dimension %>($file); + } +<% end %> + +// Use this to set the dimensions of an element +// based on the size of the original image. +@mixin <%= name %>-sprite-dimensions($name) { + @include sprite-dimensions($<%= name %>-sprites, $name) +} + +// Move the background position to display the sprite. +@mixin <%= name %>-sprite-position($name, $offset-x: 0, $offset-y: 0) { + @include sprite-background-position($<%= name %>-sprites, $name, $offset-x, $offset-y) +} + +// Extends the sprite base class and set the background position for the desired sprite. +// It will also apply the image dimensions if $dimensions is true. +@mixin <%= name %>-sprite($name, $dimensions: $<%= name %>-sprite-dimensions, $offset-x: 0, $offset-y: 0) { + @extend #{$<%= name %>-sprite-base-class}; + @include sprite($<%= name %>-sprites, $name, $dimensions, $offset-x, $offset-y) +} + +@mixin <%= name %>-sprites($sprite-names, $dimensions: $<%= name %>-sprite-dimensions, $prefix: sprite-map-name($<%= name %>-sprites), $offset-x: 0, $offset-y: 0) { + @include sprites($<%= name %>-sprites, $sprite-names, $<%= name %>-sprite-base-class, $dimensions, $prefix, $offset-x, $offset-y) +} + +// Generates a class for each sprited image. +@mixin all-<%= name %>-sprites($dimensions: $<%= name %>-sprite-dimensions, $prefix: sprite-map-name($<%= name %>-sprites), $offset-x: 0, $offset-y: 0) { + @include <%= name %>-sprites(<%= sprite_names.join(" ") %>, $dimensions, $prefix, $offset-x, $offset-y); +} \ No newline at end of file diff --git a/test/fixtures/fonts/bgrove.base64.txt b/test/fixtures/fonts/bgrove.base64.txt new file mode 100644 index 00000000..35faae38 --- /dev/null +++ b/test/fixtures/fonts/bgrove.base64.txt @@ -0,0 +1 @@ +AAEAAAAOAIAAAwBgRkZUTVRX4doAAEkcAAAAHE9TLzJXOYGVAAABaAAAAFZjbWFwo9b83AAAA5wAAAGCY3Z0IAAhAnkAAAUgAAAABGdhc3D//wADAABJFAAAAAhnbHlmHjQt6QAABhQAADqcaGVhZO/rWMkAAADsAAAANmhoZWEG3gJsAAABJAAAACRobXR44bASCgAAAcAAAAHca2VybgkODBcAAECwAAACpmxvY2FEK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Wx0ZXJuYXRlLjI2Mg9qX2FsdGVybmF0ZS4yNjMGRXQuMjY0D3dfYWx0ZXJuYXRlLjI2NQ9XX2FsdGVybmF0ZS4yNjYPTV9hbHRlcm5hdGUuMjY3AAAAAf//AAIAAAABAAAAAMbCNwkAAAAAxr0CEAAAAADG2KjA diff --git a/test/fixtures/fonts/bgrove.ttf b/test/fixtures/fonts/bgrove.ttf new file mode 100755 index 00000000..9f2d056f Binary files /dev/null and b/test/fixtures/fonts/bgrove.ttf differ diff --git a/test/fixtures/sprites/public/images/bool/false.png b/test/fixtures/sprites/public/images/bool/false.png new file mode 100644 index 00000000..c0ae53cc Binary files /dev/null and b/test/fixtures/sprites/public/images/bool/false.png differ diff --git a/test/fixtures/sprites/public/images/bool/true.png b/test/fixtures/sprites/public/images/bool/true.png new file mode 100644 index 00000000..c0ae53cc Binary files /dev/null and b/test/fixtures/sprites/public/images/bool/true.png differ diff --git a/test/fixtures/sprites/public/images/image_row/large.png b/test/fixtures/sprites/public/images/image_row/large.png new file mode 100644 index 00000000..f86cca9b Binary files /dev/null and b/test/fixtures/sprites/public/images/image_row/large.png differ diff --git a/test/fixtures/sprites/public/images/image_row/large_square.png b/test/fixtures/sprites/public/images/image_row/large_square.png new file mode 100644 index 00000000..b99cf980 Binary files /dev/null and b/test/fixtures/sprites/public/images/image_row/large_square.png differ diff --git a/test/fixtures/sprites/public/images/image_row/medium.png b/test/fixtures/sprites/public/images/image_row/medium.png new file mode 100644 index 00000000..faf62a6d Binary files /dev/null and b/test/fixtures/sprites/public/images/image_row/medium.png differ diff --git a/test/fixtures/sprites/public/images/image_row/small.png b/test/fixtures/sprites/public/images/image_row/small.png new file mode 100644 index 00000000..d8e52311 Binary files /dev/null and b/test/fixtures/sprites/public/images/image_row/small.png differ diff --git a/test/fixtures/sprites/public/images/image_row/tall.png b/test/fixtures/sprites/public/images/image_row/tall.png new file mode 100644 index 00000000..ef422eff Binary files /dev/null and b/test/fixtures/sprites/public/images/image_row/tall.png differ diff --git a/test/fixtures/sprites/public/images/repeat_x/five.png b/test/fixtures/sprites/public/images/repeat_x/five.png new file mode 100644 index 00000000..4cac0a23 Binary files /dev/null and b/test/fixtures/sprites/public/images/repeat_x/five.png differ diff --git a/test/fixtures/sprites/public/images/repeat_x/four.png b/test/fixtures/sprites/public/images/repeat_x/four.png new file mode 100644 index 00000000..079a84e6 Binary files /dev/null and b/test/fixtures/sprites/public/images/repeat_x/four.png differ diff --git a/test/fixtures/sprites/public/images/repeat_x/one.png b/test/fixtures/sprites/public/images/repeat_x/one.png new file mode 100644 index 00000000..e94b22e3 Binary files /dev/null and b/test/fixtures/sprites/public/images/repeat_x/one.png differ diff --git a/test/fixtures/sprites/public/images/repeat_x/three.png b/test/fixtures/sprites/public/images/repeat_x/three.png new file mode 100644 index 00000000..bc84fbc4 Binary files /dev/null and b/test/fixtures/sprites/public/images/repeat_x/three.png differ diff --git a/test/fixtures/sprites/public/images/repeat_x/two.png b/test/fixtures/sprites/public/images/repeat_x/two.png new file mode 100644 index 00000000..ea9575a0 Binary files /dev/null and b/test/fixtures/sprites/public/images/repeat_x/two.png differ diff --git a/test/fixtures/stylesheets/blueprint/css/screen.css b/test/fixtures/stylesheets/blueprint/css/screen.css index abbea935..391a8e02 100644 --- a/test/fixtures/stylesheets/blueprint/css/screen.css +++ b/test/fixtures/stylesheets/blueprint/css/screen.css @@ -671,8 +671,8 @@ input.span-24, textarea.span-24, select.span-24 { background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -o-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -ms-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); - -moz-background-size: 100% 18px, auto; -webkit-background-size: 100% 18px, auto; + -moz-background-size: 100% 18px, auto; -o-background-size: 100% 18px, auto; background-size: 100% 18px, auto; background-position: left top; } diff --git a/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css b/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css index 738b46d3..40b1503e 100644 --- a/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css +++ b/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css @@ -5,8 +5,8 @@ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -o-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -ms-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); - -moz-background-size: 100% 18px, auto; -webkit-background-size: 100% 18px, auto; + -moz-background-size: 100% 18px, auto; -o-background-size: 100% 18px, auto; background-size: 100% 18px, auto; background-position: left top; } diff --git a/test/fixtures/stylesheets/compass/css/background-clip.css b/test/fixtures/stylesheets/compass/css/background-clip.css index 683b7e12..45c9574d 100644 --- a/test/fixtures/stylesheets/compass/css/background-clip.css +++ b/test/fixtures/stylesheets/compass/css/background-clip.css @@ -1,5 +1,10 @@ .background-clip { - -moz-background-clip: border; -webkit-background-clip: border; - -khtml-background-clip: border-box; + -moz-background-clip: border; background-clip: border-box; } + +.background-clip-khtml { + -webkit-background-clip: border; + -moz-background-clip: border; + -khtml-background-clip: border-box; + background-clip: border-box; } \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/css/border_radius.css b/test/fixtures/stylesheets/compass/css/border_radius.css index 5eef9e03..3b2452fc 100644 --- a/test/fixtures/stylesheets/compass/css/border_radius.css +++ b/test/fixtures/stylesheets/compass/css/border_radius.css @@ -1,23 +1,20 @@ .simple { -webkit-border-radius: 4px 4px; -moz-border-radius: 4px / 4px; - -o-border-radius: 4px / 4px; -ms-border-radius: 4px / 4px; - -khtml-border-radius: 4px / 4px; + -o-border-radius: 4px / 4px; border-radius: 4px / 4px; } .compound { -webkit-border-radius: 2px 3px; -moz-border-radius: 2px 5px / 3px 6px; - -o-border-radius: 2px 5px / 3px 6px; -ms-border-radius: 2px 5px / 3px 6px; - -khtml-border-radius: 2px 5px / 3px 6px; + -o-border-radius: 2px 5px / 3px 6px; border-radius: 2px 5px / 3px 6px; } .crazy { -webkit-border-radius: 1px 2px; -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; - -o-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; -ms-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; - -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; + -o-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; } diff --git a/test/fixtures/stylesheets/compass/css/box-sizeing.css b/test/fixtures/stylesheets/compass/css/box-sizeing.css new file mode 100644 index 00000000..410f7d76 --- /dev/null +++ b/test/fixtures/stylesheets/compass/css/box-sizeing.css @@ -0,0 +1,9 @@ +.div { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; } + +.div { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } diff --git a/test/fixtures/stylesheets/compass/css/box.css b/test/fixtures/stylesheets/compass/css/box.css index 9c1cdc9d..a3cc0bd4 100644 --- a/test/fixtures/stylesheets/compass/css/box.css +++ b/test/fixtures/stylesheets/compass/css/box.css @@ -1,103 +1,103 @@ .hbox { - display: -moz-box; display: -webkit-box; + display: -moz-box; display: -ms-box; display: box; - -moz-box-orient: horizontal; -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; -ms-box-orient: horizontal; box-orient: horizontal; - -moz-box-align: stretch; -webkit-box-align: stretch; + -moz-box-align: stretch; -ms-box-align: stretch; box-align: stretch; } .hbox > * { - -moz-box-flex: 0; -webkit-box-flex: 0; + -moz-box-flex: 0; -ms-box-flex: 0; box-flex: 0; } .vbox { - display: -moz-box; display: -webkit-box; + display: -moz-box; display: -ms-box; display: box; - -moz-box-orient: vertical; -webkit-box-orient: vertical; + -moz-box-orient: vertical; -ms-box-orient: vertical; box-orient: vertical; - -moz-box-align: stretch; -webkit-box-align: stretch; + -moz-box-align: stretch; -ms-box-align: stretch; box-align: stretch; } .vbox > * { - -moz-box-flex: 0; -webkit-box-flex: 0; + -moz-box-flex: 0; -ms-box-flex: 0; box-flex: 0; } .spacer { - -moz-box-flex: 1; -webkit-box-flex: 1; + -moz-box-flex: 1; -ms-box-flex: 1; box-flex: 1; } .reverse { - -moz-box-direction: reverse; -webkit-box-direction: reverse; + -moz-box-direction: reverse; -ms-box-direction: reverse; box-direction: reverse; } .box-flex-0 { - -moz-box-flex: 0; -webkit-box-flex: 0; + -moz-box-flex: 0; -ms-box-flex: 0; box-flex: 0; } .box-flex-1 { - -moz-box-flex: 1; -webkit-box-flex: 1; + -moz-box-flex: 1; -ms-box-flex: 1; box-flex: 1; } .box-flex-2 { - -moz-box-flex: 2; -webkit-box-flex: 2; + -moz-box-flex: 2; -ms-box-flex: 2; box-flex: 2; } .box-flex-group-0 { - -moz-box-flex-group: 0; -webkit-box-flex-group: 0; + -moz-box-flex-group: 0; -ms-box-flex-group: 0; box-flex-group: 0; } .box-flex-group-1 { - -moz-box-flex-group: 1; -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; -ms-box-flex-group: 1; box-flex-group: 1; } .box-flex-group-2 { - -moz-box-flex-group: 2; -webkit-box-flex-group: 2; + -moz-box-flex-group: 2; -ms-box-flex-group: 2; box-flex-group: 2; } .start { - -moz-box-pack: start; -webkit-box-pack: start; + -moz-box-pack: start; -ms-box-pack: start; box-pack: start; } .end { - -moz-box-pack: end; -webkit-box-pack: end; + -moz-box-pack: end; -ms-box-pack: end; box-pack: end; } .center { - -moz-box-pack: center; -webkit-box-pack: center; + -moz-box-pack: center; -ms-box-pack: center; box-pack: center; } diff --git a/test/fixtures/stylesheets/compass/css/box_shadow.css b/test/fixtures/stylesheets/compass/css/box_shadow.css index 92aa4f8b..305f454f 100644 --- a/test/fixtures/stylesheets/compass/css/box_shadow.css +++ b/test/fixtures/stylesheets/compass/css/box_shadow.css @@ -1,17 +1,14 @@ .box-shadow { - -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; -webkit-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; - -o-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; + -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; } .single-box-shadow { - -moz-box-shadow: 0px 0px 5px #333333; -webkit-box-shadow: 0px 0px 5px #333333; - -o-box-shadow: 0px 0px 5px #333333; + -moz-box-shadow: 0px 0px 5px #333333; box-shadow: 0px 0px 5px #333333; } .multiple-box-shadows { - -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; -webkit-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; - -o-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; + -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; } diff --git a/test/fixtures/stylesheets/compass/css/columns.css b/test/fixtures/stylesheets/compass/css/columns.css index c49d7ba6..e94dddd6 100644 --- a/test/fixtures/stylesheets/compass/css/columns.css +++ b/test/fixtures/stylesheets/compass/css/columns.css @@ -1,47 +1,47 @@ .column-count { - -moz-column-count: 5; -webkit-column-count: 5; + -moz-column-count: 5; -o-column-count: 5; column-count: 5; } .column-gap { - -moz-column-gap: 10px; -webkit-column-gap: 10px; + -moz-column-gap: 10px; -o-column-gap: 10px; column-gap: 10px; } .column-width { - -moz-column-width: 90px; -webkit-column-width: 90px; + -moz-column-width: 90px; -o-column-width: 90px; column-width: 90px; } .column-rule-width { - -moz-rule-width: 1px; -webkit-rule-width: 1px; + -moz-rule-width: 1px; -o-rule-width: 1px; rule-width: 1px; } .column-rule-style { - -moz-rule-style: dotted; -webkit-rule-style: dotted; + -moz-rule-style: dotted; -o-rule-style: dotted; rule-style: dotted; } .column-rule-color { - -moz-rule-color: blue; -webkit-rule-color: blue; + -moz-rule-color: blue; -o-rule-color: blue; rule-color: blue; } .column-rule { - -moz-column-rule: 1px solid blue; -webkit-column-rule: 1px solid blue; + -moz-column-rule: 1px solid blue; -o-column-rule: 1px solid blue; column-rule: 1px solid blue; } .column-rule-spaced { - -moz-column-rule: 1px solid blue; -webkit-column-rule: 1px solid blue; + -moz-column-rule: 1px solid blue; -o-column-rule: 1px solid blue; column-rule: 1px solid blue; } diff --git a/test/fixtures/stylesheets/compass/css/grid_background.css b/test/fixtures/stylesheets/compass/css/grid_background.css index 44b5f13e..30d13f05 100644 --- a/test/fixtures/stylesheets/compass/css/grid_background.css +++ b/test/fixtures/stylesheets/compass/css/grid_background.css @@ -5,8 +5,8 @@ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); - -moz-background-size: 100% 1.5em; -webkit-background-size: 100% 1.5em; + -moz-background-size: 100% 1.5em; -o-background-size: 100% 1.5em; background-size: 100% 1.5em; background-position: left top; } @@ -27,8 +27,8 @@ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -o-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -ms-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(100, 100, 225, 0.25) 0px, rgba(100, 100, 225, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(100, 100, 225, 0.25) 40px, rgba(100, 100, 225, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(100, 100, 225, 0.25) 80px, rgba(100, 100, 225, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(100, 100, 225, 0.25) 120px, rgba(100, 100, 225, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(100, 100, 225, 0.25) 160px, rgba(100, 100, 225, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(100, 100, 225, 0.25) 200px, rgba(100, 100, 225, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(100, 100, 225, 0.25) 240px, rgba(100, 100, 225, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(100, 100, 225, 0.25) 280px, rgba(100, 100, 225, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(100, 100, 225, 0.25) 320px, rgba(100, 100, 225, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(100, 100, 225, 0.25) 360px, rgba(100, 100, 225, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(100, 100, 225, 0.25) 400px, rgba(100, 100, 225, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(100, 100, 225, 0.25) 440px, rgba(100, 100, 225, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(100, 100, 225, 0.25) 480px, rgba(100, 100, 225, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(100, 100, 225, 0.25) 520px, rgba(100, 100, 225, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(100, 100, 225, 0.25) 560px, rgba(100, 100, 225, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(100, 100, 225, 0.25) 600px, rgba(100, 100, 225, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(100, 100, 225, 0.25) 640px, rgba(100, 100, 225, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(100, 100, 225, 0.25) 680px, rgba(100, 100, 225, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(100, 100, 225, 0.25) 720px, rgba(100, 100, 225, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(100, 100, 225, 0.25) 760px, rgba(100, 100, 225, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(100, 100, 225, 0.25) 800px, rgba(100, 100, 225, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(100, 100, 225, 0.25) 840px, rgba(100, 100, 225, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(100, 100, 225, 0.25) 880px, rgba(100, 100, 225, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(100, 100, 225, 0.25) 920px, rgba(100, 100, 225, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); - -moz-background-size: 100% 1.5em, auto; -webkit-background-size: 100% 1.5em, auto; + -moz-background-size: 100% 1.5em, auto; -o-background-size: 100% 1.5em, auto; background-size: 100% 1.5em, auto; background-position: left top; } @@ -40,8 +40,8 @@ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); - -moz-background-size: 100% 1.5em; -webkit-background-size: 100% 1.5em; + -moz-background-size: 100% 1.5em; -o-background-size: 100% 1.5em; background-size: 100% 1.5em; background-position: left top; } @@ -62,8 +62,8 @@ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -o-linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(100, 100, 225, 0.25) 11%, rgba(100, 100, 225, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(100, 100, 225, 0.25) 17%, rgba(100, 100, 225, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(100, 100, 225, 0.25) 23%, rgba(100, 100, 225, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(100, 100, 225, 0.25) 29%, rgba(100, 100, 225, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(100, 100, 225, 0.25) 35%, rgba(100, 100, 225, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(100, 100, 225, 0.25) 41%, rgba(100, 100, 225, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(100, 100, 225, 0.25) 47%, rgba(100, 100, 225, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(100, 100, 225, 0.25) 53%, rgba(100, 100, 225, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(100, 100, 225, 0.25) 59%, rgba(100, 100, 225, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(100, 100, 225, 0.25) 65%, rgba(100, 100, 225, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(100, 100, 225, 0.25) 71%, rgba(100, 100, 225, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(100, 100, 225, 0.25) 77%, rgba(100, 100, 225, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(100, 100, 225, 0.25) 83%, rgba(100, 100, 225, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(100, 100, 225, 0.25) 89%, rgba(100, 100, 225, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(100, 100, 225, 0.25) 95%, rgba(100, 100, 225, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -ms-linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(100, 100, 225, 0.25) 11%, rgba(100, 100, 225, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(100, 100, 225, 0.25) 17%, rgba(100, 100, 225, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(100, 100, 225, 0.25) 23%, rgba(100, 100, 225, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(100, 100, 225, 0.25) 29%, rgba(100, 100, 225, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(100, 100, 225, 0.25) 35%, rgba(100, 100, 225, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(100, 100, 225, 0.25) 41%, rgba(100, 100, 225, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(100, 100, 225, 0.25) 47%, rgba(100, 100, 225, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(100, 100, 225, 0.25) 53%, rgba(100, 100, 225, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(100, 100, 225, 0.25) 59%, rgba(100, 100, 225, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(100, 100, 225, 0.25) 65%, rgba(100, 100, 225, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(100, 100, 225, 0.25) 71%, rgba(100, 100, 225, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(100, 100, 225, 0.25) 77%, rgba(100, 100, 225, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(100, 100, 225, 0.25) 83%, rgba(100, 100, 225, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(100, 100, 225, 0.25) 89%, rgba(100, 100, 225, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(100, 100, 225, 0.25) 95%, rgba(100, 100, 225, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(100, 100, 225, 0.25) 11%, rgba(100, 100, 225, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(100, 100, 225, 0.25) 17%, rgba(100, 100, 225, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(100, 100, 225, 0.25) 23%, rgba(100, 100, 225, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(100, 100, 225, 0.25) 29%, rgba(100, 100, 225, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(100, 100, 225, 0.25) 35%, rgba(100, 100, 225, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(100, 100, 225, 0.25) 41%, rgba(100, 100, 225, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(100, 100, 225, 0.25) 47%, rgba(100, 100, 225, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(100, 100, 225, 0.25) 53%, rgba(100, 100, 225, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(100, 100, 225, 0.25) 59%, rgba(100, 100, 225, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(100, 100, 225, 0.25) 65%, rgba(100, 100, 225, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(100, 100, 225, 0.25) 71%, rgba(100, 100, 225, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(100, 100, 225, 0.25) 77%, rgba(100, 100, 225, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(100, 100, 225, 0.25) 83%, rgba(100, 100, 225, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(100, 100, 225, 0.25) 89%, rgba(100, 100, 225, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(100, 100, 225, 0.25) 95%, rgba(100, 100, 225, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); - -moz-background-size: 100% 1.5em, auto; -webkit-background-size: 100% 1.5em, auto; + -moz-background-size: 100% 1.5em, auto; -o-background-size: 100% 1.5em, auto; background-size: 100% 1.5em, auto; background-position: left top; } diff --git a/test/fixtures/stylesheets/compass/css/pie.css b/test/fixtures/stylesheets/compass/css/pie.css index 7f774b14..613aedcc 100644 --- a/test/fixtures/stylesheets/compass/css/pie.css +++ b/test/fixtures/stylesheets/compass/css/pie.css @@ -3,11 +3,10 @@ position: relative; } .bordered { - -moz-border-radius: 5px; -webkit-border-radius: 5px; - -o-border-radius: 5px; + -moz-border-radius: 5px; -ms-border-radius: 5px; - -khtml-border-radius: 5px; + -o-border-radius: 5px; border-radius: 5px; } .gradient { diff --git a/test/fixtures/stylesheets/compass/css/sprites.css b/test/fixtures/stylesheets/compass/css/sprites.css index c31df2fa..394ab443 100644 --- a/test/fixtures/stylesheets/compass/css/sprites.css +++ b/test/fixtures/stylesheets/compass/css/sprites.css @@ -1,328 +1,328 @@ .flag-sprite, #flags .us, #flags .au, #flags .ca, #flags .es, #flags .eg, #flags .ly, .flag-ad, .flag-ae, .flag-af, .flag-ag, .flag-ai, .flag-al, .flag-am, .flag-an, .flag-ao, .flag-ar, .flag-as, .flag-at, .flag-au, .flag-aw, .flag-ax, .flag-az, .flag-ba, .flag-bb, .flag-bd, .flag-be, .flag-bf, .flag-bg, .flag-bh, .flag-bi, .flag-bj, .flag-bm, .flag-bn, .flag-bo, .flag-br, .flag-bs, .flag-bt, .flag-bv, .flag-bw, .flag-by, .flag-bz, .flag-ca, .flag-catalonia, .flag-cc, .flag-cd, .flag-cf, .flag-cg, .flag-ch, .flag-ci, .flag-ck, .flag-cl, .flag-cm, .flag-cn, .flag-co, .flag-cr, .flag-cs, .flag-cu, .flag-cv, .flag-cx, .flag-cy, .flag-cz, .flag-de, .flag-dj, .flag-dk, .flag-dm, .flag-do, .flag-dz, .flag-ec, .flag-ee, .flag-eg, .flag-eh, .flag-england, .flag-er, .flag-es, .flag-et, .flag-europeanunion, .flag-fam, .flag-fi, .flag-fj, .flag-fk, .flag-fm, .flag-fo, .flag-fr, .flag-ga, .flag-gb, .flag-gd, .flag-ge, .flag-gf, .flag-gh, .flag-gi, .flag-gl, .flag-gm, .flag-gn, .flag-gp, .flag-gq, .flag-gr, .flag-gs, .flag-gt, .flag-gu, .flag-gw, .flag-gy, .flag-hk, .flag-hm, .flag-hn, .flag-hr, .flag-ht, .flag-hu, .flag-id-2, .flag-ie, .flag-il, .flag-in, .flag-io, .flag-iq, .flag-ir, .flag-is, .flag-it, .flag-jm, .flag-jo, .flag-jp, .flag-ke, .flag-kg, .flag-kh, .flag-ki, .flag-km, .flag-kn, .flag-kp, .flag-kr, .flag-kw, .flag-ky, .flag-kz, .flag-la, .flag-lb, .flag-lc, .flag-li, .flag-lk, .flag-lr, .flag-ls, .flag-lt, .flag-lu, .flag-lv, .flag-ly, .flag-ma, .flag-mc, .flag-md, .flag-me, .flag-mg, .flag-mh, .flag-mk, .flag-ml, .flag-mm, .flag-mn, .flag-mo, .flag-mp, .flag-mq, .flag-mr, .flag-ms, .flag-mt, .flag-mu, .flag-mv, .flag-mw, .flag-mx, .flag-my, .flag-mz, .flag-na, .flag-nc, .flag-ne, .flag-nf, .flag-ng, .flag-ni, .flag-nl, .flag-no, .flag-np, .flag-nr, .flag-nu, .flag-nz, .flag-om, .flag-pa, .flag-pe, .flag-pf, .flag-pg, .flag-ph, .flag-pk, .flag-pl, .flag-pm, .flag-pn, .flag-pr, .flag-ps, .flag-pt, .flag-pw, .flag-py, .flag-qa, .flag-re, .flag-ro, .flag-rs, .flag-ru, .flag-rw, .flag-sa, .flag-sb, .flag-sc, .flag-scotland, .flag-sd, .flag-se, .flag-sg, .flag-sh, .flag-si, .flag-sj, .flag-sk, .flag-sl, .flag-sm, .flag-sn, .flag-so, .flag-sr, .flag-st, .flag-sv, .flag-sy, .flag-sz, .flag-tc, .flag-td, .flag-tf, .flag-tg, .flag-th, .flag-tj, .flag-tk, .flag-tl, .flag-tm, .flag-tn, .flag-to, .flag-tr, .flag-tt, .flag-tv, .flag-tw, .flag-tz, .flag-ua, .flag-ug, .flag-um, .flag-us, .flag-uy, .flag-uz, .flag-va, .flag-vc, .flag-ve, .flag-vg, .flag-vi, .flag-vn, .flag-vu, .flag-wales, .flag-wf, .flag-ws, .flag-ye, .flag-yt, .flag-za, .flag-zm, .flag-zw { - background: url('/images/flag-s03c3b29b35.png') no-repeat; } + background: url('/images/flag-s4798b5a210.png') no-repeat; } #flags .us { - background-position: 0 -2520px; + background-position: 0 -429px; height: 11px; width: 16px; } #flags .au { - background-position: 0 -132px; + background-position: 0 -11px; height: 11px; width: 16px; } #flags .ca { - background-position: 0 -385px; + background-position: 0 -572px; height: 11px; width: 16px; } #flags .es { - background-position: 0 -737px; + background-position: 0 -2113px; height: 11px; width: 16px; } #flags .eg { - background-position: 0 -693px; + background-position: 0 -2058px; height: 11px; width: 16px; } #flags .ly { - background-position: 0 -1474px; + background-position: 0 -2663px; height: 11px; width: 16px; } .flag-ad { - background-position: 0 0; + background-position: 0 -781px; height: 11px; width: 16px; } .flag-ae { - background-position: 0 -11px; + background-position: 0 -2652px; height: 11px; width: 16px; } .flag-af { - background-position: 0 -22px; + background-position: 0 -1034px; height: 11px; width: 16px; } .flag-ag { - background-position: 0 -33px; + background-position: 0 -737px; height: 11px; width: 16px; } .flag-ai { - background-position: 0 -44px; - height: 11px; - width: 16px; } - -.flag-al { - background-position: 0 -55px; - height: 11px; - width: 16px; } - -.flag-am { - background-position: 0 -66px; - height: 11px; - width: 16px; } - -.flag-an { - background-position: 0 -77px; - height: 11px; - width: 16px; } - -.flag-ao { - background-position: 0 -88px; - height: 11px; - width: 16px; } - -.flag-ar { - background-position: 0 -99px; - height: 11px; - width: 16px; } - -.flag-as { - background-position: 0 -110px; - height: 11px; - width: 16px; } - -.flag-at { - background-position: 0 -121px; - height: 11px; - width: 16px; } - -.flag-au { - background-position: 0 -132px; - height: 11px; - width: 16px; } - -.flag-aw { - background-position: 0 -143px; - height: 11px; - width: 16px; } - -.flag-ax { - background-position: 0 -154px; - height: 11px; - width: 16px; } - -.flag-az { - background-position: 0 -165px; - height: 11px; - width: 16px; } - -.flag-ba { - background-position: 0 -176px; - height: 11px; - width: 16px; } - -.flag-bb { - background-position: 0 -187px; - height: 11px; - width: 16px; } - -.flag-bd { - background-position: 0 -198px; - height: 11px; - width: 16px; } - -.flag-be { - background-position: 0 -209px; - height: 11px; - width: 16px; } - -.flag-bf { - background-position: 0 -220px; - height: 11px; - width: 16px; } - -.flag-bg { - background-position: 0 -231px; - height: 11px; - width: 16px; } - -.flag-bh { - background-position: 0 -242px; - height: 11px; - width: 16px; } - -.flag-bi { - background-position: 0 -253px; - height: 11px; - width: 16px; } - -.flag-bj { - background-position: 0 -264px; - height: 11px; - width: 16px; } - -.flag-bm { - background-position: 0 -275px; - height: 11px; - width: 16px; } - -.flag-bn { - background-position: 0 -286px; - height: 11px; - width: 16px; } - -.flag-bo { background-position: 0 -297px; height: 11px; width: 16px; } -.flag-br { - background-position: 0 -308px; +.flag-al { + background-position: 0 -891px; height: 11px; width: 16px; } -.flag-bs { - background-position: 0 -319px; +.flag-am { + background-position: 0 -2300px; height: 11px; width: 16px; } -.flag-bt { - background-position: 0 -330px; +.flag-an { + background-position: 0 -1805px; height: 11px; width: 16px; } -.flag-bv { - background-position: 0 -341px; +.flag-ao { + background-position: 0 -1485px; height: 11px; width: 16px; } -.flag-bw { - background-position: 0 -352px; +.flag-ar { + background-position: 0 -1728px; height: 11px; width: 16px; } -.flag-by { - background-position: 0 -363px; +.flag-as { + background-position: 0 -121px; height: 11px; width: 16px; } -.flag-bz { - background-position: 0 -374px; +.flag-at { + background-position: 0 -2630px; height: 11px; width: 16px; } -.flag-ca { - background-position: 0 -385px; +.flag-au { + background-position: 0 -11px; height: 11px; width: 16px; } -.flag-catalonia { - background-position: 0 -396px; +.flag-aw { + background-position: 0 -1353px; height: 11px; width: 16px; } -.flag-cc { - background-position: 0 -407px; - height: 11px; - width: 16px; } - -.flag-cd { - background-position: 0 -418px; - height: 11px; - width: 16px; } - -.flag-cf { - background-position: 0 -429px; - height: 11px; - width: 16px; } - -.flag-cg { - background-position: 0 -440px; - height: 11px; - width: 16px; } - -.flag-ch { - background-position: 0 -451px; - height: 11px; - width: 11px; } - -.flag-ci { - background-position: 0 -462px; - height: 11px; - width: 16px; } - -.flag-ck { - background-position: 0 -473px; - height: 11px; - width: 16px; } - -.flag-cl { - background-position: 0 -484px; - height: 11px; - width: 16px; } - -.flag-cm { - background-position: 0 -495px; - height: 11px; - width: 16px; } - -.flag-cn { - background-position: 0 -506px; - height: 11px; - width: 16px; } - -.flag-co { +.flag-ax { background-position: 0 -517px; height: 11px; width: 16px; } -.flag-cr { - background-position: 0 -528px; +.flag-az { + background-position: 0 -1023px; height: 11px; width: 16px; } -.flag-cs { - background-position: 0 -539px; - height: 11px; - width: 16px; } - -.flag-cu { - background-position: 0 -550px; - height: 11px; - width: 16px; } - -.flag-cv { - background-position: 0 -561px; - height: 11px; - width: 16px; } - -.flag-cx { - background-position: 0 -572px; - height: 11px; - width: 16px; } - -.flag-cy { - background-position: 0 -583px; - height: 11px; - width: 16px; } - -.flag-cz { +.flag-ba { background-position: 0 -594px; height: 11px; width: 16px; } -.flag-de { +.flag-bb { + background-position: 0 -1243px; + height: 11px; + width: 16px; } + +.flag-bd { + background-position: 0 -1629px; + height: 11px; + width: 16px; } + +.flag-be { + background-position: 0 -2597px; + height: 11px; + width: 16px; } + +.flag-bf { + background-position: 0 -2157px; + height: 11px; + width: 16px; } + +.flag-bg { + background-position: 0 -2443px; + height: 11px; + width: 16px; } + +.flag-bh { + background-position: 0 -2080px; + height: 11px; + width: 16px; } + +.flag-bi { + background-position: 0 -44px; + height: 11px; + width: 16px; } + +.flag-bj { + background-position: 0 -2487px; + height: 11px; + width: 16px; } + +.flag-bm { + background-position: 0 -396px; + height: 11px; + width: 16px; } + +.flag-bn { + background-position: 0 -363px; + height: 11px; + width: 16px; } + +.flag-bo { + background-position: 0 -2168px; + height: 11px; + width: 16px; } + +.flag-br { + background-position: 0 -484px; + height: 11px; + width: 16px; } + +.flag-bs { + background-position: 0 -1397px; + height: 11px; + width: 16px; } + +.flag-bt { background-position: 0 -605px; height: 11px; width: 16px; } -.flag-dj { - background-position: 0 -616px; +.flag-bv { + background-position: 0 -1265px; height: 11px; width: 16px; } -.flag-dk { - background-position: 0 -627px; +.flag-bw { + background-position: 0 -2333px; height: 11px; width: 16px; } -.flag-dm { +.flag-by { + background-position: 0 -1452px; + height: 11px; + width: 16px; } + +.flag-bz { + background-position: 0 -550px; + height: 11px; + width: 16px; } + +.flag-ca { + background-position: 0 -572px; + height: 11px; + width: 16px; } + +.flag-catalonia { + background-position: 0 -2245px; + height: 11px; + width: 16px; } + +.flag-cc { + background-position: 0 -451px; + height: 11px; + width: 16px; } + +.flag-cd { background-position: 0 -638px; height: 11px; width: 16px; } +.flag-cf { + background-position: 0 -748px; + height: 11px; + width: 16px; } + +.flag-cg { + background-position: 0 -1530px; + height: 11px; + width: 16px; } + +.flag-ch { + background-position: 0 -2696px; + height: 11px; + width: 11px; } + +.flag-ci { + background-position: 0 -2509px; + height: 11px; + width: 16px; } + +.flag-ck { + background-position: 0 -462px; + height: 11px; + width: 16px; } + +.flag-cl { + background-position: 0 -2388px; + height: 11px; + width: 16px; } + +.flag-cm { + background-position: 0 -2047px; + height: 11px; + width: 16px; } + +.flag-cn { + background-position: 0 -2014px; + height: 11px; + width: 16px; } + +.flag-co { + background-position: 0 -2311px; + height: 11px; + width: 16px; } + +.flag-cr { + background-position: 0 -2025px; + height: 11px; + width: 16px; } + +.flag-cs { + background-position: 0 -2421px; + height: 11px; + width: 16px; } + +.flag-cu { + background-position: 0 -814px; + height: 11px; + width: 16px; } + +.flag-cv { + background-position: 0 -869px; + height: 11px; + width: 16px; } + +.flag-cx { + background-position: 0 -407px; + height: 11px; + width: 16px; } + +.flag-cy { + background-position: 0 -2190px; + height: 11px; + width: 16px; } + +.flag-cz { + background-position: 0 -1706px; + height: 11px; + width: 16px; } + +.flag-de { + background-position: 0 -1827px; + height: 11px; + width: 16px; } + +.flag-dj { + background-position: 0 -957px; + height: 11px; + width: 16px; } + +.flag-dk { + background-position: 0 -1959px; + height: 11px; + width: 16px; } + +.flag-dm { + background-position: 0 -374px; + height: 11px; + width: 16px; } + .flag-do { - background-position: 0 -649px; + background-position: 0 -1772px; height: 11px; width: 16px; } @@ -332,322 +332,322 @@ width: 16px; } .flag-ec { - background-position: 0 -671px; + background-position: 0 -1915px; height: 11px; width: 16px; } .flag-ee { - background-position: 0 -682px; + background-position: 0 -2564px; height: 11px; width: 16px; } .flag-eg { - background-position: 0 -693px; + background-position: 0 -2058px; height: 11px; width: 16px; } .flag-eh { - background-position: 0 -704px; + background-position: 0 -1408px; height: 11px; width: 16px; } .flag-england { - background-position: 0 -715px; + background-position: 0 -1563px; height: 11px; width: 16px; } .flag-er { - background-position: 0 -726px; + background-position: 0 -418px; height: 11px; width: 16px; } .flag-es { - background-position: 0 -737px; + background-position: 0 -2113px; height: 11px; width: 16px; } .flag-et { - background-position: 0 -748px; - height: 11px; - width: 16px; } - -.flag-europeanunion { - background-position: 0 -759px; - height: 11px; - width: 16px; } - -.flag-fam { - background-position: 0 -770px; - height: 11px; - width: 16px; } - -.flag-fi { - background-position: 0 -781px; - height: 11px; - width: 16px; } - -.flag-fj { - background-position: 0 -792px; - height: 11px; - width: 16px; } - -.flag-fk { - background-position: 0 -803px; - height: 11px; - width: 16px; } - -.flag-fm { - background-position: 0 -814px; - height: 11px; - width: 16px; } - -.flag-fo { - background-position: 0 -825px; - height: 11px; - width: 16px; } - -.flag-fr { - background-position: 0 -836px; - height: 11px; - width: 16px; } - -.flag-ga { - background-position: 0 -847px; - height: 11px; - width: 16px; } - -.flag-gb { - background-position: 0 -858px; - height: 11px; - width: 16px; } - -.flag-gd { - background-position: 0 -869px; - height: 11px; - width: 16px; } - -.flag-ge { background-position: 0 -880px; height: 11px; width: 16px; } -.flag-gf { - background-position: 0 -891px; - height: 11px; - width: 16px; } - -.flag-gh { - background-position: 0 -902px; - height: 11px; - width: 16px; } - -.flag-gi { - background-position: 0 -913px; - height: 11px; - width: 16px; } - -.flag-gl { - background-position: 0 -924px; - height: 11px; - width: 16px; } - -.flag-gm { - background-position: 0 -935px; - height: 11px; - width: 16px; } - -.flag-gn { - background-position: 0 -946px; - height: 11px; - width: 16px; } - -.flag-gp { - background-position: 0 -957px; - height: 11px; - width: 16px; } - -.flag-gq { - background-position: 0 -968px; - height: 11px; - width: 16px; } - -.flag-gr { - background-position: 0 -979px; - height: 11px; - width: 16px; } - -.flag-gs { - background-position: 0 -990px; - height: 11px; - width: 16px; } - -.flag-gt { - background-position: 0 -1001px; - height: 11px; - width: 16px; } - -.flag-gu { - background-position: 0 -1012px; - height: 11px; - width: 16px; } - -.flag-gw { - background-position: 0 -1023px; - height: 11px; - width: 16px; } - -.flag-gy { - background-position: 0 -1034px; - height: 11px; - width: 16px; } - -.flag-hk { - background-position: 0 -1045px; - height: 11px; - width: 16px; } - -.flag-hm { - background-position: 0 -1056px; - height: 11px; - width: 16px; } - -.flag-hn { - background-position: 0 -1067px; - height: 11px; - width: 16px; } - -.flag-hr { - background-position: 0 -1078px; - height: 11px; - width: 16px; } - -.flag-ht { - background-position: 0 -1089px; - height: 11px; - width: 16px; } - -.flag-hu { - background-position: 0 -1100px; - height: 11px; - width: 16px; } - -.flag-id-2 { - background-position: 0 -1111px; - height: 11px; - width: 16px; } - -.flag-ie { - background-position: 0 -1122px; - height: 11px; - width: 16px; } - -.flag-il { - background-position: 0 -1133px; - height: 11px; - width: 16px; } - -.flag-in { - background-position: 0 -1144px; - height: 11px; - width: 16px; } - -.flag-io { - background-position: 0 -1155px; - height: 11px; - width: 16px; } - -.flag-iq { - background-position: 0 -1166px; - height: 11px; - width: 16px; } - -.flag-ir { - background-position: 0 -1177px; - height: 11px; - width: 16px; } - -.flag-is { - background-position: 0 -1188px; - height: 11px; - width: 16px; } - -.flag-it { - background-position: 0 -1199px; - height: 11px; - width: 16px; } - -.flag-jm { - background-position: 0 -1210px; - height: 11px; - width: 16px; } - -.flag-jo { - background-position: 0 -1221px; - height: 11px; - width: 16px; } - -.flag-jp { - background-position: 0 -1232px; - height: 11px; - width: 16px; } - -.flag-ke { - background-position: 0 -1243px; - height: 11px; - width: 16px; } - -.flag-kg { +.flag-europeanunion { background-position: 0 -1254px; height: 11px; width: 16px; } -.flag-kh { - background-position: 0 -1265px; +.flag-fam { + background-position: 0 -2003px; height: 11px; width: 16px; } -.flag-ki { - background-position: 0 -1276px; +.flag-fi { + background-position: 0 -1783px; height: 11px; width: 16px; } -.flag-km { - background-position: 0 -1287px; +.flag-fj { + background-position: 0 -286px; height: 11px; width: 16px; } -.flag-kn { - background-position: 0 -1298px; +.flag-fk { + background-position: 0 -176px; height: 11px; width: 16px; } -.flag-kp { - background-position: 0 -1309px; +.flag-fm { + background-position: 0 -1144px; height: 11px; width: 16px; } -.flag-kr { +.flag-fo { + background-position: 0 -1585px; + height: 11px; + width: 16px; } + +.flag-fr { + background-position: 0 -1640px; + height: 11px; + width: 16px; } + +.flag-ga { + background-position: 0 -2135px; + height: 11px; + width: 16px; } + +.flag-gb { + background-position: 0 -99px; + height: 11px; + width: 16px; } + +.flag-gd { + background-position: 0 -693px; + height: 11px; + width: 16px; } + +.flag-ge { + background-position: 0 -473px; + height: 11px; + width: 16px; } + +.flag-gf { + background-position: 0 -1651px; + height: 11px; + width: 16px; } + +.flag-gh { + background-position: 0 -2256px; + height: 11px; + width: 16px; } + +.flag-gi { + background-position: 0 -1761px; + height: 11px; + width: 16px; } + +.flag-gl { + background-position: 0 -1981px; + height: 11px; + width: 16px; } + +.flag-gm { + background-position: 0 -1849px; + height: 11px; + width: 16px; } + +.flag-gn { + background-position: 0 -2454px; + height: 11px; + width: 16px; } + +.flag-gp { + background-position: 0 -1893px; + height: 11px; + width: 16px; } + +.flag-gq { + background-position: 0 -1210px; + height: 11px; + width: 16px; } + +.flag-gr { + background-position: 0 -1419px; + height: 11px; + width: 16px; } + +.flag-gs { + background-position: 0 -187px; + height: 11px; + width: 16px; } + +.flag-gt { + background-position: 0 -2201px; + height: 11px; + width: 16px; } + +.flag-gu { + background-position: 0 -1496px; + height: 11px; + width: 16px; } + +.flag-gw { + background-position: 0 -2091px; + height: 11px; + width: 16px; } + +.flag-gy { + background-position: 0 -242px; + height: 11px; + width: 16px; } + +.flag-hk { + background-position: 0 -1364px; + height: 11px; + width: 16px; } + +.flag-hm { + background-position: 0 -22px; + height: 11px; + width: 16px; } + +.flag-hn { + background-position: 0 -1155px; + height: 11px; + width: 16px; } + +.flag-hr { + background-position: 0 -1056px; + height: 11px; + width: 16px; } + +.flag-ht { + background-position: 0 -2344px; + height: 11px; + width: 16px; } + +.flag-hu { + background-position: 0 -2608px; + height: 11px; + width: 16px; } + +.flag-id-2 { + background-position: 0 -2542px; + height: 11px; + width: 16px; } + +.flag-ie { + background-position: 0 -2278px; + height: 11px; + width: 16px; } + +.flag-il { + background-position: 0 -2366px; + height: 11px; + width: 16px; } + +.flag-in { + background-position: 0 -1596px; + height: 11px; + width: 16px; } + +.flag-io { + background-position: 0 0; + height: 11px; + width: 16px; } + +.flag-iq { + background-position: 0 -1221px; + height: 11px; + width: 16px; } + +.flag-ir { background-position: 0 -1320px; height: 11px; width: 16px; } +.flag-is { + background-position: 0 -1177px; + height: 11px; + width: 16px; } + +.flag-it { + background-position: 0 -2641px; + height: 11px; + width: 16px; } + +.flag-jm { + background-position: 0 -319px; + height: 11px; + width: 16px; } + +.flag-jo { + background-position: 0 -1948px; + height: 11px; + width: 16px; } + +.flag-jp { + background-position: 0 -2465px; + height: 11px; + width: 16px; } + +.flag-ke { + background-position: 0 -935px; + height: 11px; + width: 16px; } + +.flag-kg { + background-position: 0 -1926px; + height: 11px; + width: 16px; } + +.flag-kh { + background-position: 0 -1045px; + height: 11px; + width: 16px; } + +.flag-ki { + background-position: 0 -88px; + height: 11px; + width: 16px; } + +.flag-km { + background-position: 0 -671px; + height: 11px; + width: 16px; } + +.flag-kn { + background-position: 0 -528px; + height: 11px; + width: 16px; } + +.flag-kp { + background-position: 0 -1001px; + height: 11px; + width: 16px; } + +.flag-kr { + background-position: 0 -308px; + height: 11px; + width: 16px; } + .flag-kw { - background-position: 0 -1331px; + background-position: 0 -1992px; height: 11px; width: 16px; } .flag-ky { - background-position: 0 -1342px; + background-position: 0 -143px; height: 11px; width: 16px; } .flag-kz { - background-position: 0 -1353px; + background-position: 0 -704px; height: 11px; width: 16px; } .flag-la { - background-position: 0 -1364px; + background-position: 0 -1100px; height: 11px; width: 16px; } @@ -657,197 +657,197 @@ width: 16px; } .flag-lc { - background-position: 0 -1386px; + background-position: 0 -836px; height: 11px; width: 16px; } .flag-li { - background-position: 0 -1397px; + background-position: 0 -1298px; height: 11px; width: 16px; } .flag-lk { - background-position: 0 -1408px; + background-position: 0 -682px; height: 11px; width: 16px; } .flag-lr { - background-position: 0 -1419px; - height: 11px; - width: 16px; } - -.flag-ls { - background-position: 0 -1430px; - height: 11px; - width: 16px; } - -.flag-lt { - background-position: 0 -1441px; - height: 11px; - width: 16px; } - -.flag-lu { - background-position: 0 -1452px; - height: 11px; - width: 16px; } - -.flag-lv { - background-position: 0 -1463px; - height: 11px; - width: 16px; } - -.flag-ly { - background-position: 0 -1474px; - height: 11px; - width: 16px; } - -.flag-ma { - background-position: 0 -1485px; - height: 11px; - width: 16px; } - -.flag-mc { - background-position: 0 -1496px; - height: 11px; - width: 16px; } - -.flag-md { - background-position: 0 -1507px; - height: 11px; - width: 16px; } - -.flag-me { - background-position: 0 -1518px; - height: 12px; - width: 16px; } - -.flag-mg { - background-position: 0 -1530px; - height: 11px; - width: 16px; } - -.flag-mh { - background-position: 0 -1541px; - height: 11px; - width: 16px; } - -.flag-mk { - background-position: 0 -1552px; - height: 11px; - width: 16px; } - -.flag-ml { - background-position: 0 -1563px; - height: 11px; - width: 16px; } - -.flag-mm { - background-position: 0 -1574px; - height: 11px; - width: 16px; } - -.flag-mn { - background-position: 0 -1585px; - height: 11px; - width: 16px; } - -.flag-mo { - background-position: 0 -1596px; - height: 11px; - width: 16px; } - -.flag-mp { - background-position: 0 -1607px; - height: 11px; - width: 16px; } - -.flag-mq { background-position: 0 -1618px; height: 11px; width: 16px; } +.flag-ls { + background-position: 0 -385px; + height: 11px; + width: 16px; } + +.flag-lt { + background-position: 0 -2102px; + height: 11px; + width: 16px; } + +.flag-lu { + background-position: 0 -2212px; + height: 11px; + width: 16px; } + +.flag-lv { + background-position: 0 -2223px; + height: 11px; + width: 16px; } + +.flag-ly { + background-position: 0 -2663px; + height: 11px; + width: 16px; } + +.flag-ma { + background-position: 0 -2619px; + height: 11px; + width: 16px; } + +.flag-mc { + background-position: 0 -2685px; + height: 11px; + width: 16px; } + +.flag-md { + background-position: 0 -1232px; + height: 11px; + width: 16px; } + +.flag-me { + background-position: 0 -1507px; + height: 12px; + width: 16px; } + +.flag-mg { + background-position: 0 -2476px; + height: 11px; + width: 16px; } + +.flag-mh { + background-position: 0 -275px; + height: 11px; + width: 16px; } + +.flag-mk { + background-position: 0 -825px; + height: 11px; + width: 16px; } + +.flag-ml { + background-position: 0 -2410px; + height: 11px; + width: 16px; } + +.flag-mm { + background-position: 0 -2267px; + height: 11px; + width: 16px; } + +.flag-mn { + background-position: 0 -2146px; + height: 11px; + width: 16px; } + +.flag-mo { + background-position: 0 -759px; + height: 11px; + width: 16px; } + +.flag-mp { + background-position: 0 -506px; + height: 11px; + width: 16px; } + +.flag-mq { + background-position: 0 -132px; + height: 11px; + width: 16px; } + .flag-mr { - background-position: 0 -1629px; + background-position: 0 -1188px; height: 11px; width: 16px; } .flag-ms { - background-position: 0 -1640px; + background-position: 0 -440px; height: 11px; width: 16px; } .flag-mt { - background-position: 0 -1651px; + background-position: 0 -2586px; height: 11px; width: 16px; } .flag-mu { - background-position: 0 -1662px; + background-position: 0 -1860px; height: 11px; width: 16px; } .flag-mv { - background-position: 0 -1673px; + background-position: 0 -1430px; height: 11px; width: 16px; } .flag-mw { - background-position: 0 -1684px; + background-position: 0 -1838px; height: 11px; width: 16px; } .flag-mx { - background-position: 0 -1695px; + background-position: 0 -990px; height: 11px; width: 16px; } .flag-my { - background-position: 0 -1706px; + background-position: 0 -561px; height: 11px; width: 16px; } .flag-mz { - background-position: 0 -1717px; + background-position: 0 -858px; height: 11px; width: 16px; } .flag-na { - background-position: 0 -1728px; + background-position: 0 -66px; height: 11px; width: 16px; } .flag-nc { - background-position: 0 -1739px; + background-position: 0 -616px; height: 11px; width: 16px; } .flag-ne { - background-position: 0 -1750px; + background-position: 0 -1386px; height: 11px; width: 16px; } .flag-nf { - background-position: 0 -1761px; + background-position: 0 -539px; height: 11px; width: 16px; } .flag-ng { - background-position: 0 -1772px; + background-position: 0 -2179px; height: 11px; width: 16px; } .flag-ni { - background-position: 0 -1783px; + background-position: 0 -1684px; height: 11px; width: 16px; } .flag-nl { - background-position: 0 -1794px; + background-position: 0 -2498px; height: 11px; width: 16px; } .flag-no { - background-position: 0 -1805px; + background-position: 0 -1276px; height: 11px; width: 16px; } @@ -857,242 +857,242 @@ width: 9px; } .flag-nr { - background-position: 0 -1827px; + background-position: 0 -1342px; height: 11px; width: 16px; } .flag-nu { - background-position: 0 -1838px; + background-position: 0 -627px; height: 11px; width: 16px; } .flag-nz { - background-position: 0 -1849px; + background-position: 0 -154px; height: 11px; width: 16px; } .flag-om { - background-position: 0 -1860px; - height: 11px; - width: 16px; } - -.flag-pa { - background-position: 0 -1871px; - height: 11px; - width: 16px; } - -.flag-pe { - background-position: 0 -1882px; - height: 11px; - width: 16px; } - -.flag-pf { - background-position: 0 -1893px; - height: 11px; - width: 16px; } - -.flag-pg { - background-position: 0 -1904px; - height: 11px; - width: 16px; } - -.flag-ph { - background-position: 0 -1915px; - height: 11px; - width: 16px; } - -.flag-pk { - background-position: 0 -1926px; - height: 11px; - width: 16px; } - -.flag-pl { - background-position: 0 -1937px; - height: 11px; - width: 16px; } - -.flag-pm { - background-position: 0 -1948px; - height: 11px; - width: 16px; } - -.flag-pn { - background-position: 0 -1959px; - height: 11px; - width: 16px; } - -.flag-pr { - background-position: 0 -1970px; - height: 11px; - width: 16px; } - -.flag-ps { - background-position: 0 -1981px; - height: 11px; - width: 16px; } - -.flag-pt { - background-position: 0 -1992px; - height: 11px; - width: 16px; } - -.flag-pw { - background-position: 0 -2003px; - height: 11px; - width: 16px; } - -.flag-py { - background-position: 0 -2014px; - height: 11px; - width: 16px; } - -.flag-qa { - background-position: 0 -2025px; - height: 11px; - width: 16px; } - -.flag-re { - background-position: 0 -2036px; - height: 11px; - width: 16px; } - -.flag-ro { - background-position: 0 -2047px; - height: 11px; - width: 16px; } - -.flag-rs { - background-position: 0 -2058px; - height: 11px; - width: 16px; } - -.flag-ru { - background-position: 0 -2069px; - height: 11px; - width: 16px; } - -.flag-rw { - background-position: 0 -2080px; - height: 11px; - width: 16px; } - -.flag-sa { - background-position: 0 -2091px; - height: 11px; - width: 16px; } - -.flag-sb { - background-position: 0 -2102px; - height: 11px; - width: 16px; } - -.flag-sc { - background-position: 0 -2113px; - height: 11px; - width: 16px; } - -.flag-scotland { - background-position: 0 -2124px; - height: 11px; - width: 16px; } - -.flag-sd { - background-position: 0 -2135px; - height: 11px; - width: 16px; } - -.flag-se { - background-position: 0 -2146px; - height: 11px; - width: 16px; } - -.flag-sg { - background-position: 0 -2157px; - height: 11px; - width: 16px; } - -.flag-sh { - background-position: 0 -2168px; - height: 11px; - width: 16px; } - -.flag-si { - background-position: 0 -2179px; - height: 11px; - width: 16px; } - -.flag-sj { - background-position: 0 -2190px; - height: 11px; - width: 16px; } - -.flag-sk { - background-position: 0 -2201px; - height: 11px; - width: 16px; } - -.flag-sl { - background-position: 0 -2212px; - height: 11px; - width: 16px; } - -.flag-sm { - background-position: 0 -2223px; - height: 11px; - width: 16px; } - -.flag-sn { background-position: 0 -2234px; height: 11px; width: 16px; } -.flag-so { - background-position: 0 -2245px; +.flag-pa { + background-position: 0 -1441px; height: 11px; width: 16px; } -.flag-sr { - background-position: 0 -2256px; +.flag-pe { + background-position: 0 -2674px; height: 11px; width: 16px; } -.flag-st { - background-position: 0 -2267px; +.flag-pf { + background-position: 0 -1552px; height: 11px; width: 16px; } -.flag-sv { - background-position: 0 -2278px; +.flag-pg { + background-position: 0 -913px; height: 11px; width: 16px; } -.flag-sy { +.flag-ph { + background-position: 0 -979px; + height: 11px; + width: 16px; } + +.flag-pk { + background-position: 0 -792px; + height: 11px; + width: 16px; } + +.flag-pl { + background-position: 0 -2707px; + height: 11px; + width: 16px; } + +.flag-pm { + background-position: 0 -33px; + height: 11px; + width: 16px; } + +.flag-pn { + background-position: 0 -110px; + height: 11px; + width: 16px; } + +.flag-pr { + background-position: 0 -803px; + height: 11px; + width: 16px; } + +.flag-ps { + background-position: 0 -2069px; + height: 11px; + width: 16px; } + +.flag-pt { + background-position: 0 -1199px; + height: 11px; + width: 16px; } + +.flag-pw { + background-position: 0 -1012px; + height: 11px; + width: 16px; } + +.flag-py { + background-position: 0 -2124px; + height: 11px; + width: 16px; } + +.flag-qa { + background-position: 0 -2036px; + height: 11px; + width: 16px; } + +.flag-re { + background-position: 0 -1662px; + height: 11px; + width: 16px; } + +.flag-ro { background-position: 0 -2289px; height: 11px; width: 16px; } +.flag-rs { + background-position: 0 -1871px; + height: 11px; + width: 16px; } + +.flag-ru { + background-position: 0 -2575px; + height: 11px; + width: 16px; } + +.flag-rw { + background-position: 0 -1541px; + height: 11px; + width: 16px; } + +.flag-sa { + background-position: 0 -968px; + height: 11px; + width: 16px; } + +.flag-sb { + background-position: 0 -253px; + height: 11px; + width: 16px; } + +.flag-sc { + background-position: 0 -495px; + height: 11px; + width: 16px; } + +.flag-scotland { + background-position: 0 -55px; + height: 11px; + width: 16px; } + +.flag-sd { + background-position: 0 -1739px; + height: 11px; + width: 16px; } + +.flag-se { + background-position: 0 -1463px; + height: 11px; + width: 16px; } + +.flag-sg { + background-position: 0 -1970px; + height: 11px; + width: 16px; } + +.flag-sh { + background-position: 0 -198px; + height: 11px; + width: 16px; } + +.flag-si { + background-position: 0 -1519px; + height: 11px; + width: 16px; } + +.flag-sj { + background-position: 0 -1287px; + height: 11px; + width: 16px; } + +.flag-sk { + background-position: 0 -902px; + height: 11px; + width: 16px; } + +.flag-sl { + background-position: 0 -2432px; + height: 11px; + width: 16px; } + +.flag-sm { + background-position: 0 -1331px; + height: 11px; + width: 16px; } + +.flag-sn { + background-position: 0 -1904px; + height: 11px; + width: 16px; } + +.flag-so { + background-position: 0 -1607px; + height: 11px; + width: 16px; } + +.flag-sr { + background-position: 0 -1717px; + height: 11px; + width: 16px; } + +.flag-st { + background-position: 0 -946px; + height: 11px; + width: 16px; } + +.flag-sv { + background-position: 0 -1673px; + height: 11px; + width: 16px; } + +.flag-sy { + background-position: 0 -2377px; + height: 11px; + width: 16px; } + .flag-sz { - background-position: 0 -2300px; + background-position: 0 -330px; height: 11px; width: 16px; } .flag-tc { - background-position: 0 -2311px; + background-position: 0 -352px; height: 11px; width: 16px; } .flag-td { - background-position: 0 -2322px; + background-position: 0 -1574px; height: 11px; width: 16px; } .flag-tf { - background-position: 0 -2333px; + background-position: 0 -1309px; height: 11px; width: 16px; } .flag-tg { - background-position: 0 -2344px; + background-position: 0 -1089px; height: 11px; width: 16px; } @@ -1102,161 +1102,161 @@ width: 16px; } .flag-tj { - background-position: 0 -2366px; + background-position: 0 -1695px; height: 11px; width: 16px; } .flag-tk { - background-position: 0 -2377px; + background-position: 0 -220px; height: 11px; width: 16px; } .flag-tl { - background-position: 0 -2388px; + background-position: 0 -1078px; height: 11px; width: 16px; } .flag-tm { - background-position: 0 -2399px; + background-position: 0 -770px; height: 11px; width: 16px; } .flag-tn { - background-position: 0 -2410px; + background-position: 0 -1794px; height: 11px; width: 16px; } .flag-to { - background-position: 0 -2421px; - height: 11px; - width: 16px; } - -.flag-tr { - background-position: 0 -2432px; - height: 11px; - width: 16px; } - -.flag-tt { - background-position: 0 -2443px; - height: 11px; - width: 16px; } - -.flag-tv { - background-position: 0 -2454px; - height: 11px; - width: 16px; } - -.flag-tw { - background-position: 0 -2465px; - height: 11px; - width: 16px; } - -.flag-tz { - background-position: 0 -2476px; - height: 11px; - width: 16px; } - -.flag-ua { - background-position: 0 -2487px; - height: 11px; - width: 16px; } - -.flag-ug { - background-position: 0 -2498px; - height: 11px; - width: 16px; } - -.flag-um { - background-position: 0 -2509px; - height: 11px; - width: 16px; } - -.flag-us { - background-position: 0 -2520px; - height: 11px; - width: 16px; } - -.flag-uy { - background-position: 0 -2531px; - height: 11px; - width: 16px; } - -.flag-uz { - background-position: 0 -2542px; - height: 11px; - width: 16px; } - -.flag-va { background-position: 0 -2553px; height: 11px; width: 16px; } +.flag-tr { + background-position: 0 -1750px; + height: 11px; + width: 16px; } + +.flag-tt { + background-position: 0 -231px; + height: 11px; + width: 16px; } + +.flag-tv { + background-position: 0 -847px; + height: 11px; + width: 16px; } + +.flag-tw { + background-position: 0 -2322px; + height: 11px; + width: 16px; } + +.flag-tz { + background-position: 0 -264px; + height: 11px; + width: 16px; } + +.flag-ua { + background-position: 0 -2531px; + height: 11px; + width: 16px; } + +.flag-ug { + background-position: 0 -1474px; + height: 11px; + width: 16px; } + +.flag-um { + background-position: 0 -583px; + height: 11px; + width: 16px; } + +.flag-us { + background-position: 0 -429px; + height: 11px; + width: 16px; } + +.flag-uy { + background-position: 0 -1166px; + height: 11px; + width: 16px; } + +.flag-uz { + background-position: 0 -1122px; + height: 11px; + width: 16px; } + +.flag-va { + background-position: 0 -1067px; + height: 11px; + width: 16px; } + .flag-vc { - background-position: 0 -2564px; + background-position: 0 -1133px; height: 11px; width: 16px; } .flag-ve { - background-position: 0 -2575px; + background-position: 0 -1111px; height: 11px; width: 16px; } .flag-vg { - background-position: 0 -2586px; + background-position: 0 -341px; height: 11px; width: 16px; } .flag-vi { - background-position: 0 -2597px; + background-position: 0 -165px; height: 11px; width: 16px; } .flag-vn { - background-position: 0 -2608px; + background-position: 0 -2399px; height: 11px; width: 16px; } .flag-vu { - background-position: 0 -2619px; + background-position: 0 -726px; height: 11px; width: 16px; } .flag-wales { - background-position: 0 -2630px; + background-position: 0 -77px; height: 11px; width: 16px; } .flag-wf { - background-position: 0 -2641px; + background-position: 0 -924px; height: 11px; width: 16px; } .flag-ws { - background-position: 0 -2652px; + background-position: 0 -1937px; height: 11px; width: 16px; } .flag-ye { - background-position: 0 -2663px; + background-position: 0 -2520px; height: 11px; width: 16px; } .flag-yt { - background-position: 0 -2674px; + background-position: 0 -715px; height: 11px; width: 16px; } .flag-za { - background-position: 0 -2685px; + background-position: 0 -209px; height: 11px; width: 16px; } .flag-zm { - background-position: 0 -2696px; + background-position: 0 -1882px; height: 11px; width: 16px; } .flag-zw { - background-position: 0 -2707px; + background-position: 0 -649px; height: 11px; width: 16px; } diff --git a/test/fixtures/stylesheets/compass/css/text_shadow.css b/test/fixtures/stylesheets/compass/css/text_shadow.css index bb07037e..0384185f 100644 --- a/test/fixtures/stylesheets/compass/css/text_shadow.css +++ b/test/fixtures/stylesheets/compass/css/text_shadow.css @@ -1,6 +1,3 @@ -.legacy-text-shadow { - text-shadow: #777777 5px 5px 10px; } - .single-text-shadow { text-shadow: #aaaaaa 0px 0px 1px; } diff --git a/test/fixtures/stylesheets/compass/css/transform.css b/test/fixtures/stylesheets/compass/css/transform.css index a1745a52..d79d25a8 100644 --- a/test/fixtures/stylesheets/compass/css/transform.css +++ b/test/fixtures/stylesheets/compass/css/transform.css @@ -1,8 +1,8 @@ .apply-origin-2d { - -moz-transform-origin: 2px 5%; -webkit-transform-origin: 2px 5%; - -o-transform-origin: 2px 5%; + -moz-transform-origin: 2px 5%; -ms-transform-origin: 2px 5%; + -o-transform-origin: 2px 5%; transform-origin: 2px 5%; } .apply-origin-3d { @@ -10,10 +10,10 @@ transform-origin: 2px 5% 2in; } .transform-origin-2d { - -moz-transform-origin: 100px 100px; -webkit-transform-origin: 100px 100px; - -o-transform-origin: 100px 100px; + -moz-transform-origin: 100px 100px; -ms-transform-origin: 100px 100px; + -o-transform-origin: 100px 100px; transform-origin: 100px 100px; } .transform-origin-3d { @@ -21,10 +21,10 @@ transform-origin: 100px 100px 100px; } .transform-2d { - -moz-transform: rotateY(20deg); -webkit-transform: rotateY(20deg); - -o-transform: rotateY(20deg); + -moz-transform: rotateY(20deg); -ms-transform: rotateY(20deg); + -o-transform: rotateY(20deg); transform: rotateY(20deg); } .transform-3d { @@ -48,10 +48,10 @@ backface-visibility: hidden; } .scale { - -moz-transform: scale(30px, 50px); -webkit-transform: scale(30px, 50px); - -o-transform: scale(30px, 50px); + -moz-transform: scale(30px, 50px); -ms-transform: scale(30px, 50px); + -o-transform: scale(30px, 50px); transform: scale(30px, 50px); } .scale-3d { @@ -59,10 +59,10 @@ transform: scale(30px, 50px); } .scale-with-perspective { - -moz-transform: perspective(500) scale(30px, 50px); -webkit-transform: perspective(500) scale(30px, 50px); - -o-transform: perspective(500) scale(30px, 50px); + -moz-transform: perspective(500) scale(30px, 50px); -ms-transform: perspective(500) scale(30px, 50px); + -o-transform: perspective(500) scale(30px, 50px); transform: perspective(500) scale(30px, 50px); } .scale-3d-with-perspective { @@ -70,10 +70,10 @@ transform: perspective(500) scale(30px, 50px); } .scale-x { - -moz-transform: scaleX(30px); -webkit-transform: scaleX(30px); - -o-transform: scaleX(30px); + -moz-transform: scaleX(30px); -ms-transform: scaleX(30px); + -o-transform: scaleX(30px); transform: scaleX(30px); } .scale-x-3d { @@ -81,10 +81,10 @@ transform: scaleX(30px); } .scale-x-with-perspective { - -moz-transform: perspective(500) scaleX(30px); -webkit-transform: perspective(500) scaleX(30px); - -o-transform: perspective(500) scaleX(30px); + -moz-transform: perspective(500) scaleX(30px); -ms-transform: perspective(500) scaleX(30px); + -o-transform: perspective(500) scaleX(30px); transform: perspective(500) scaleX(30px); } .scale-x-3d-with-perspective { @@ -92,10 +92,10 @@ transform: perspective(500) scaleX(30px); } .scale-y { - -moz-transform: scaleY(50px); -webkit-transform: scaleY(50px); - -o-transform: scaleY(50px); + -moz-transform: scaleY(50px); -ms-transform: scaleY(50px); + -o-transform: scaleY(50px); transform: scaleY(50px); } .scale-y-3d { @@ -103,10 +103,10 @@ transform: scaleY(50px); } .scale-y-with-perspective { - -moz-transform: perspective(500) scaleY(50px); -webkit-transform: perspective(500) scaleY(50px); - -o-transform: perspective(500) scaleY(50px); + -moz-transform: perspective(500) scaleY(50px); -ms-transform: perspective(500) scaleY(50px); + -o-transform: perspective(500) scaleY(50px); transform: perspective(500) scaleY(50px); } .scale-y-3d-with-perspective { @@ -130,31 +130,31 @@ transform: perspective(500) scale3d(30px, 50px, 100px); } .rotate { - -moz-transform: perspective(500) rotate(25deg); -webkit-transform: perspective(500) rotate(25deg); - -o-transform: perspective(500) rotate(25deg); + -moz-transform: perspective(500) rotate(25deg); -ms-transform: perspective(500) rotate(25deg); + -o-transform: perspective(500) rotate(25deg); transform: perspective(500) rotate(25deg); } .rotate-with-perspective { - -moz-transform: perspective(500) rotate(25deg); -webkit-transform: perspective(500) rotate(25deg); - -o-transform: perspective(500) rotate(25deg); + -moz-transform: perspective(500) rotate(25deg); -ms-transform: perspective(500) rotate(25deg); + -o-transform: perspective(500) rotate(25deg); transform: perspective(500) rotate(25deg); } .rotate-z { - -moz-transform: rotate(25deg); -webkit-transform: rotate(25deg); - -o-transform: rotate(25deg); + -moz-transform: rotate(25deg); -ms-transform: rotate(25deg); + -o-transform: rotate(25deg); transform: rotate(25deg); } .rotate-z-with-perspective { - -moz-transform: perspective(500) rotate(25deg); -webkit-transform: perspective(500) rotate(25deg); - -o-transform: perspective(500) rotate(25deg); + -moz-transform: perspective(500) rotate(25deg); -ms-transform: perspective(500) rotate(25deg); + -o-transform: perspective(500) rotate(25deg); transform: perspective(500) rotate(25deg); } .rotate-x { @@ -182,17 +182,17 @@ transform: perspective(500) rotate3d(5, 2, 1, 75deg); } .translate { - -moz-transform: translate(20px, 30%); -webkit-transform: translate(20px, 30%); - -o-transform: translate(20px, 30%); + -moz-transform: translate(20px, 30%); -ms-transform: translate(20px, 30%); + -o-transform: translate(20px, 30%); transform: translate(20px, 30%); } .translate-with-perspective { - -moz-transform: perspective(500) translate(20px, 30%); -webkit-transform: perspective(500) translate(20px, 30%); - -o-transform: perspective(500) translate(20px, 30%); + -moz-transform: perspective(500) translate(20px, 30%); -ms-transform: perspective(500) translate(20px, 30%); + -o-transform: perspective(500) translate(20px, 30%); transform: perspective(500) translate(20px, 30%); } .translate-3d { @@ -204,10 +204,10 @@ transform: perspective(500) translate(20px, 30%); } .translate-x { - -moz-transform: translateX(30px); -webkit-transform: translateX(30px); - -o-transform: translateX(30px); + -moz-transform: translateX(30px); -ms-transform: translateX(30px); + -o-transform: translateX(30px); transform: translateX(30px); } .translate-x-3d { @@ -215,10 +215,10 @@ transform: translateX(30px); } .translate-x-with-perspective { - -moz-transform: perspective(500) translateX(30px); -webkit-transform: perspective(500) translateX(30px); - -o-transform: perspective(500) translateX(30px); + -moz-transform: perspective(500) translateX(30px); -ms-transform: perspective(500) translateX(30px); + -o-transform: perspective(500) translateX(30px); transform: perspective(500) translateX(30px); } .translate-x-3d-with-perspective { @@ -226,10 +226,10 @@ transform: perspective(500) translateX(30px); } .translate-y { - -moz-transform: translateY(30px); -webkit-transform: translateY(30px); - -o-transform: translateY(30px); + -moz-transform: translateY(30px); -ms-transform: translateY(30px); + -o-transform: translateY(30px); transform: translateY(30px); } .translate-y-3d { @@ -237,10 +237,10 @@ transform: translateY(30px); } .translate-y-with-perspective { - -moz-transform: perspective(500) translateY(30px); -webkit-transform: perspective(500) translateY(30px); - -o-transform: perspective(500) translateY(30px); + -moz-transform: perspective(500) translateY(30px); -ms-transform: perspective(500) translateY(30px); + -o-transform: perspective(500) translateY(30px); transform: perspective(500) translateY(30px); } .translate-y-3d-with-perspective { @@ -264,10 +264,10 @@ transform: perspective(500) translate3d(30px, 50px, 75px); } .skew { - -moz-transform: skew(20deg, 50deg); -webkit-transform: skew(20deg, 50deg); - -o-transform: skew(20deg, 50deg); + -moz-transform: skew(20deg, 50deg); -ms-transform: skew(20deg, 50deg); + -o-transform: skew(20deg, 50deg); transform: skew(20deg, 50deg); } .skew-3d { @@ -275,10 +275,10 @@ transform: skew(20deg, 50deg); } .skew-x { - -moz-transform: skewX(20deg); -webkit-transform: skewX(20deg); - -o-transform: skewX(20deg); + -moz-transform: skewX(20deg); -ms-transform: skewX(20deg); + -o-transform: skewX(20deg); transform: skewX(20deg); } .skew-x-3d { @@ -286,10 +286,10 @@ transform: skewX(20deg); } .skew-y { - -moz-transform: skewY(20deg); -webkit-transform: skewY(20deg); - -o-transform: skewY(20deg); + -moz-transform: skewY(20deg); -ms-transform: skewY(20deg); + -o-transform: skewY(20deg); transform: skewY(20deg); } .skew-y-3d { @@ -297,37 +297,37 @@ transform: skewY(20deg); } .create-transform-2d { - -moz-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); -webkit-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); - -o-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); + -moz-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); -ms-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); + -o-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); - -moz-transform-origin: 50%; -webkit-transform-origin: 50%; - -o-transform-origin: 50%; + -moz-transform-origin: 50%; -ms-transform-origin: 50%; + -o-transform-origin: 50%; transform-origin: 50%; } .create-transform-3d { - -moz-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); -webkit-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); - -o-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); + -moz-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); -ms-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); + -o-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); - -moz-transform-origin: 50% 50%; -webkit-transform-origin: 50% 50%; - -o-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; transform-origin: 50% 50%; } .simple-transform { - -moz-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); -webkit-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); - -o-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); + -moz-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); -ms-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); + -o-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); - -moz-transform-origin: 10% 10%; -webkit-transform-origin: 10% 10%; - -o-transform-origin: 10% 10%; + -moz-transform-origin: 10% 10%; -ms-transform-origin: 10% 10%; + -o-transform-origin: 10% 10%; transform-origin: 10% 10%; } diff --git a/test/fixtures/stylesheets/compass/css/transition.css b/test/fixtures/stylesheets/compass/css/transition.css new file mode 100644 index 00000000..b9b21aea --- /dev/null +++ b/test/fixtures/stylesheets/compass/css/transition.css @@ -0,0 +1,71 @@ +.single-transition-without-delay { + -webkit-transition: all 0.6s ease-out; + -moz-transition: all 0.6s ease-out; + -ms-transition: all 0.6s ease-out; + -o-transition: all 0.6s ease-out; + transition: all 0.6s ease-out; } + +.single-transition-with-delay { + -webkit-transition: all 0.6s ease-out; + -webkit-transition-delay: 0.2s; + -moz-transition: all 0.6s ease-out 0.2s; + -ms-transition: all 0.6s ease-out 0.2s; + -o-transition: all 0.6s ease-out 0.2s; + transition: all 0.6s ease-out 0.2s; } + +.transition-duration-string { + -webkit-transition-duration: 0.2s, 0.5s, 0.2s; + -moz-transition-duration: 0.2s, 0.5s, 0.2s; + -ms-transition-duration: 0.2s, 0.5s, 0.2s; + -o-transition-duration: 0.2s, 0.5s, 0.2s; + transition-duration: 0.2s, 0.5s, 0.2s; } + +.transition-duration-list { + -webkit-transition-duration: 0.2s, 0.5s, 0.2s; + -moz-transition-duration: 0.2s, 0.5s, 0.2s; + -ms-transition-duration: 0.2s, 0.5s, 0.2s; + -o-transition-duration: 0.2s, 0.5s, 0.2s; + transition-duration: 0.2s, 0.5s, 0.2s; } + +.single-transform-transition-without-delay { + -webkit-transition: -webkit-transform 0.6s ease-out; + -moz-transition: -moz-transform 0.6s ease-out; + -ms-transition: -ms-transform 0.6s ease-out; + -o-transition: -o-transform 0.6s ease-out; + transition: transform 0.6s ease-out; } + +.single-transform-transition-with-delay { + -webkit-transition: -webkit-transform 0.6s ease-out; + -webkit-transition-delay: 0.2s; + -moz-transition: -moz-transform 0.6s ease-out 0.2s; + -ms-transition: -ms-transform 0.6s ease-out 0.2s; + -o-transition: -o-transform 0.6s ease-out 0.2s; + transition: transform 0.6s ease-out 0.2s; } + +.transform-transition { + -webkit-transition: -webkit-transform 0.6s ease-out; + -moz-transition: -moz-transform 0.6s ease-out; + -ms-transition: -ms-transform 0.6s ease-out; + -o-transition: -o-transform 0.6s ease-out; + transition: transform 0.6s ease-out; } + +.multiple-transitions { + -webkit-transition: -webkit-transform 0.6s ease-out, opacity 0.2s ease-in; + -moz-transition: -moz-transform 0.6s ease-out, opacity 0.2s ease-in; + -ms-transition: -ms-transform 0.6s ease-out, opacity 0.2s ease-in; + -o-transition: -o-transform 0.6s ease-out, opacity 0.2s ease-in; + transition: transform 0.6s ease-out, opacity 0.2s ease-in; } + +.transition-property { + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; } + +.multiple-transition-properties { + -webkit-transition-property: opacity, -webkit-transform, left; + -moz-transition-property: opacity, -moz-transform, left; + -ms-transition-property: opacity, -ms-transform, left; + -o-transition-property: opacity, -o-transform, left; + transition-property: opacity, transform, left; } diff --git a/test/fixtures/stylesheets/compass/css/user-interface.css b/test/fixtures/stylesheets/compass/css/user-interface.css index 32647ab6..19594c62 100644 --- a/test/fixtures/stylesheets/compass/css/user-interface.css +++ b/test/fixtures/stylesheets/compass/css/user-interface.css @@ -1,5 +1,4 @@ .user-select { - -moz-user-select: none; -webkit-user-select: none; - -khtml-user-select: none; + -moz-user-select: none; user-select: none; } diff --git a/test/fixtures/stylesheets/compass/css/utilities.css b/test/fixtures/stylesheets/compass/css/utilities.css index 8a6c64b1..188e1e61 100644 --- a/test/fixtures/stylesheets/compass/css/utilities.css +++ b/test/fixtures/stylesheets/compass/css/utilities.css @@ -34,3 +34,23 @@ p.light-with-args { p.dark-with-args { background-color: #5f1210; color: blue; } + +th { + background-color: white; } + th.even, th:nth-child(2n) { + background-color: yellow; } + +tr.odd td, tr:nth-child(2n+1) td { + background-color: white; } + tr.odd td.even, tr.odd td:nth-child(2n), tr:nth-child(2n+1) td.even, tr:nth-child(2n+1) td:nth-child(2n) { + background-color: yellow; } + +tr.even td { + background-color: red; } + tr.even td.even, tr.even td:nth-child(2n) { + background-color: red; } + +tfoot th, tfoot td { + background-color: white; } + tfoot th.even, tfoot th:nth-child(2n), tfoot td.even, tfoot td:nth-child(2n) { + background-color: yellow; } \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/css/vertical_rhythm.css b/test/fixtures/stylesheets/compass/css/vertical_rhythm.css index ddf7c2ec..96032f49 100644 --- a/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +++ b/test/fixtures/stylesheets/compass/css/vertical_rhythm.css @@ -40,3 +40,6 @@ html > body { border-bottom-style: solid; border-bottom-width: 0.25em; padding-bottom: 0.417em; } + +.reset { + line-height: 1.143em; } \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/images/flag-s03c3b29b35.png b/test/fixtures/stylesheets/compass/images/flag-s03c3b29b35.png deleted file mode 100644 index 3ec1e90d..00000000 Binary files a/test/fixtures/stylesheets/compass/images/flag-s03c3b29b35.png and /dev/null differ diff --git a/test/fixtures/stylesheets/compass/images/flag-s4798b5a210.png b/test/fixtures/stylesheets/compass/images/flag-s4798b5a210.png new file mode 100644 index 00000000..afb0a2f8 Binary files /dev/null and b/test/fixtures/stylesheets/compass/images/flag-s4798b5a210.png differ diff --git a/test/fixtures/stylesheets/compass/sass/background-clip.scss b/test/fixtures/stylesheets/compass/sass/background-clip.scss index 0716dabd..03fd4cc6 100644 --- a/test/fixtures/stylesheets/compass/sass/background-clip.scss +++ b/test/fixtures/stylesheets/compass/sass/background-clip.scss @@ -1,3 +1,8 @@ @import "compass/css3/background-clip"; -.background-clip { @include background-clip('border-box'); } \ No newline at end of file +.background-clip { @include background-clip('border-box'); } + +.background-clip-khtml { + $experimental-support-for-khtml:true; + @include background-clip('border-box'); +} \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/sass/box-sizeing.scss b/test/fixtures/stylesheets/compass/sass/box-sizeing.scss new file mode 100644 index 00000000..1338ee8e --- /dev/null +++ b/test/fixtures/stylesheets/compass/sass/box-sizeing.scss @@ -0,0 +1,8 @@ +@import "compass/css3/box-sizing"; + +.div { + @include box-sizing(content-box); +} +.div { + @include box-sizing(border-box); +} \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/sass/text_shadow.scss b/test/fixtures/stylesheets/compass/sass/text_shadow.scss index c8335318..f278cce6 100644 --- a/test/fixtures/stylesheets/compass/sass/text_shadow.scss +++ b/test/fixtures/stylesheets/compass/sass/text_shadow.scss @@ -1,6 +1,5 @@ @import "compass/css3/text-shadow"; -.legacy-text-shadow { @include text-shadow(#777, 5px, 5px, 10px); } .single-text-shadow { @include single-text-shadow;} .default-text-shadow { @include text-shadow;} .multiple-text-shadows-with-default { @include text-shadow(default, 2px 2px 5px #222);} diff --git a/test/fixtures/stylesheets/compass/sass/transition.scss b/test/fixtures/stylesheets/compass/sass/transition.scss new file mode 100644 index 00000000..16add41a --- /dev/null +++ b/test/fixtures/stylesheets/compass/sass/transition.scss @@ -0,0 +1,12 @@ +@import "compass/css3/transition"; + +.single-transition-without-delay { @include single-transition(all, 0.6s, ease-out); } +.single-transition-with-delay { @include single-transition(all, 0.6s, ease-out, 0.2s); } +.transition-duration-string { @include transition-duration("0.2s, 0.5s, 0.2s"); } +.transition-duration-list { @include transition-duration((0.2s, 0.5s, 0.2s)); } +.single-transform-transition-without-delay { @include single-transition(transform, 0.6s, ease-out); } +.single-transform-transition-with-delay { @include single-transition(transform, 0.6s, ease-out, 0.2s); } +.transform-transition { @include transition(transform 0.6s ease-out) } +.multiple-transitions { @include transition(transform 0.6s ease-out, opacity 0.2s ease-in) } +.transition-property { @include transition-property(transform); } +.multiple-transition-properties { @include transition-property((opacity, transform, left)); } diff --git a/test/fixtures/stylesheets/compass/sass/utilities.scss b/test/fixtures/stylesheets/compass/sass/utilities.scss index d579a6ca..14eadfa2 100644 --- a/test/fixtures/stylesheets/compass/sass/utilities.scss +++ b/test/fixtures/stylesheets/compass/sass/utilities.scss @@ -15,3 +15,6 @@ p.light { @include contrasted(#B0201E); } p.dark { @include contrasted(#5F1210); } p.light-with-args { @include contrasted(#B0201E, green, blue); } p.dark-with-args { @include contrasted(#5F1210, green, blue); } + + +@include alternating-rows-and-columns(red, white, blue); diff --git a/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss b/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss index 09b6b224..1f00db41 100644 --- a/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss +++ b/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss @@ -11,4 +11,6 @@ $base-line-height: 16px; .small-padded { @include adjust-font-size-to(12px,1); @include rhythm(1,1,1,1,12px); } .borders { @include h-borders(1px,1); } -.large-borders { @include adjust-font-size-to(24px,3); @include h-borders(6px,1,24px); } \ No newline at end of file +.large-borders { @include adjust-font-size-to(24px,3); @include h-borders(6px,1,24px); } + +.reset { @include reset-baseline; } \ No newline at end of file diff --git a/test/fixtures/stylesheets/envtest/config.rb b/test/fixtures/stylesheets/envtest/config.rb new file mode 100644 index 00000000..6fff7da1 --- /dev/null +++ b/test/fixtures/stylesheets/envtest/config.rb @@ -0,0 +1,9 @@ +# Require any additional compass plugins here. +project_type = :stand_alone +css_dir = "tmp" +sass_dir = "sass" +images_dir = "images" +output_style = :nested +line_comments = false + +disable_warnings = true diff --git a/test/fixtures/stylesheets/envtest/css/env.css b/test/fixtures/stylesheets/envtest/css/env.css new file mode 100644 index 00000000..1c08a273 --- /dev/null +++ b/test/fixtures/stylesheets/envtest/css/env.css @@ -0,0 +1,2 @@ +.env { + env: <%= options[:environment] %>; } diff --git a/test/fixtures/stylesheets/envtest/sass/env.scss b/test/fixtures/stylesheets/envtest/sass/env.scss new file mode 100644 index 00000000..e88f6fbe --- /dev/null +++ b/test/fixtures/stylesheets/envtest/sass/env.scss @@ -0,0 +1,3 @@ +.env { + env: compass-env(); +} diff --git a/test/helpers/rails.rb b/test/helpers/rails.rb index 12c60c0f..614322a8 100644 --- a/test/helpers/rails.rb +++ b/test/helpers/rails.rb @@ -10,7 +10,7 @@ module Compass # Generate a rails application without polluting our current set of requires # with the rails libraries. This will allow testing against multiple versions of rails # by manipulating the load path. - def generate_rails_app(name) + def generate_rails_app(name, dir = nil) if pid = fork Process.wait(pid) if $?.exitstatus == 2 @@ -22,7 +22,16 @@ module Compass begin require 'action_pack/version' if ActionPack::VERSION::MAJOR >= 3 - `rails new #{name}` + require 'rails/generators' + require 'rails/generators/rails/app/app_generator' + require 'mocha' + dir ||= File.join(File.expand_path('../../', __FILE__)) + args = [File.join(dir, name), '-q', '-f', '--skip-bundle', '--skip-gemfile'] + + #stub this so you can generate more apps + Rails::Generators::AppGenerator.any_instance.stubs(:valid_const?).returns(true) + Rails::Generators::AppGenerator.start(args, {:destination_root => dir}) + else require 'rails/version' require 'rails_generator' diff --git a/test/integrations/compass_test.rb b/test/integrations/compass_test.rb index b505debb..b06f1283 100644 --- a/test/integrations/compass_test.rb +++ b/test/integrations/compass_test.rb @@ -73,6 +73,28 @@ class CompassTest < Test::Unit::TestCase end end + def test_env_in_development + within_project('envtest', lambda {|c| c.environment = :development }) do |proj| + each_css_file(proj.css_path) do |css_file| + assert_no_errors css_file, 'envtest' + end + each_sass_file do |sass_file| + assert_renders_correctly sass_file, :ignore_charset => true, :environment => "development" + end + end + end + + def test_env_in_production + within_project('envtest', lambda {|c| c.environment = :production }) do |proj| + each_css_file(proj.css_path) do |css_file| + assert_no_errors css_file, 'envtest' + end + each_sass_file do |sass_file| + assert_renders_correctly sass_file, :ignore_charset => true, :environment => "production" + end + end + end + def test_busted_image_urls within_project('busted_image_urls') do |proj| each_css_file(proj.css_path) do |css_file| @@ -125,11 +147,10 @@ private expected_lines.gsub!(/^@charset[^;]+;/,'') if options[:ignore_charset] expected_lines = expected_lines.split("\n").reject{|l| l=~/\A\Z/} expected_lines.zip(actual_lines).each_with_index do |pair, line| - message = "template: #{name}\nline: #{line + 1}" if pair.first == pair.last assert(true) else - assert false, diff_as_string(pair.first.inspect, pair.last.inspect) + assert false, "Error in #{result_path(@current_project)}/#{name}.css:#{line + 1}\n"+diff_as_string(pair.first.inspect, pair.last.inspect) end end if expected_lines.size < actual_lines.size @@ -151,6 +172,7 @@ private if Compass.configuration.sass_path && File.exists?(Compass.configuration.sass_path) compiler = Compass::Compiler.new *args + compiler.clean! compiler.run end yield Compass.configuration if block_given? diff --git a/test/integrations/rails_integration_test.rb b/test/integrations/rails_integration_test.rb deleted file mode 100644 index 622432a7..00000000 --- a/test/integrations/rails_integration_test.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'test_helper' -require 'fileutils' -require 'compass' -require 'compass/exec' -require 'timeout' - -class RailsIntegrationTest < Test::Unit::TestCase - include Compass::CommandLineHelper - include Compass::IoHelper - include Compass::RailsHelper - - def setup - Compass.reset_configuration! - end - - def test_rails_install - within_tmp_directory do - begin - generate_rails_app_directories("compass_rails") - Dir.chdir "compass_rails" do - compass(*%w(init rails --trace --boring .)) do |responder| - responder.respond_to %r{^\s*Is this OK\? \(Y/n\)\s*$}, :with => "Y" - responder.respond_to %r{^\s*Emit compiled stylesheets to public/stylesheets/compiled/\? \(Y/n\)\s*$}, :with => "Y" - end - # puts ">>>#{@last_result}<<<" - assert_action_performed :create, "./app/stylesheets/screen.scss" - assert_action_performed :create, "./config/initializers/compass.rb" - end - ensure - FileUtils.rm_rf "compass_rails" - end - end - rescue LoadError - puts "Skipping rails test. Couldn't Load rails" - rescue NotImplementedError => e - puts "Skipping rails test: #{e}" - end - - def test_rails_install_with_no_dialog - within_tmp_directory do - generate_rails_app_directories("compass_rails") - Dir.chdir "compass_rails" do - compass(*%w(init rails --trace --boring --sass-dir app/stylesheets --css-dir public/stylesheets/compiled .)) - assert_action_performed :create, "./app/stylesheets/screen.scss" - assert_action_performed :create, "./config/initializers/compass.rb" - end - end - rescue LoadError - puts "Skipping rails test. Couldn't Load rails" - end -end diff --git a/test/integrations/sprites_test.rb b/test/integrations/sprites_test.rb index 723dac7d..a316f173 100644 --- a/test/integrations/sprites_test.rb +++ b/test/integrations/sprites_test.rb @@ -11,6 +11,7 @@ class SpritesTest < Test::Unit::TestCase Compass.reset_configuration! @images_src_path = File.join(File.dirname(__FILE__), '..', 'fixtures', 'sprites', 'public', 'images') @images_tmp_path = File.join(File.dirname(__FILE__), '..', 'fixtures', 'sprites', 'public', 'images-tmp') + @generated_images_tmp_path = File.join(File.dirname(__FILE__), '..', 'fixtures', 'sprites', 'public', 'generated-images-tmp') ::FileUtils.cp_r @images_src_path, @images_tmp_path file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n") Compass.add_configuration(file, "sprite_config") @@ -20,6 +21,7 @@ class SpritesTest < Test::Unit::TestCase def teardown Compass.reset_configuration! ::FileUtils.rm_r @images_tmp_path + ::FileUtils.rm_rf @generated_images_tmp_path end @@ -47,11 +49,17 @@ class SpritesTest < Test::Unit::TestCase options[:line_comments] = false options[:style] = :expanded options[:syntax] = :scss + options[:compass] ||= {} + options[:compass][:logger] ||= Compass::NullLogger.new css = Sass::Engine.new(scss, options).render # reformat to fit result of heredoc: " #{css.gsub('@charset "UTF-8";', '').gsub(/\n/, "\n ").strip}\n" end + def clean(string) + string.gsub("\n", '').gsub(' ', '') + end + it "should generate sprite classes" do css = render <<-SCSS @import "squares/*.png"; @@ -59,7 +67,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-s161c60ad78.png') no-repeat; + background: url('/squares-sbbc18e2129.png') no-repeat; } .squares-ten-by-ten { @@ -74,6 +82,35 @@ class SpritesTest < Test::Unit::TestCase assert_equal image_md5('squares-s*.png'), '7349a0f4e88ea80abddcf6ac2486abe3' end + it "should output and serve sprite files using the generated images directory" do + Compass.reset_configuration! + file = StringIO.new(<<-CONFIG) + images_path = #{@images_tmp_path.inspect} + generated_images_path = #{@generated_images_tmp_path.inspect} + http_generated_images_path = "/images/generated" + CONFIG + Compass.add_configuration(file, "sprite_config") + Compass.configure_sass_plugin! + css = render <<-SCSS + @import "squares/*.png"; + @include all-squares-sprites; + SCSS + assert_not_nil Dir.glob("#{@generated_images_tmp_path}/squares-s*.png").first + assert_correct <<-CSS, css + .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { + background: url('/images/generated/squares-sbbc18e2129.png') no-repeat; + } + + .squares-ten-by-ten { + background-position: 0 0; + } + + .squares-twenty-by-twenty { + background-position: 0 -10px; + } + CSS + end + it "should generate sprite classes with dimensions" do css = render <<-SCSS $squares-sprite-dimensions: true; @@ -82,7 +119,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-s161c60ad78.png') no-repeat; + background: url('/squares-sbbc18e2129.png') no-repeat; } .squares-ten-by-ten { @@ -114,7 +151,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .cubicle, .large-cube { - background: url('/squares-s161c60ad78.png') no-repeat; + background: url('/squares-sbbc18e2129.png') no-repeat; } .cubicle { @@ -139,7 +176,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .circles { - background: url('/squares-s161c60ad78.png') no-repeat; + background: url('/squares-sbbc18e2129.png') no-repeat; } CSS assert_equal image_size('squares-s*.png'), [20, 30] @@ -153,7 +190,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-s89450808af.png') no-repeat; + background: url('/squares-s563a5e0855.png') no-repeat; } .squares-ten-by-ten { @@ -175,7 +212,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-s673837183a.png') no-repeat; + background: url('/squares-s4ea353fa6d.png') no-repeat; } .squares-ten-by-ten { @@ -198,7 +235,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-s1cd84c9068.png') no-repeat; + background: url('/squares-sf4771cb124.png') no-repeat; } .squares-ten-by-ten { @@ -221,7 +258,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-sf25b7090ca.png') no-repeat; + background: url('/squares-sc82d6f3cf4.png') no-repeat; } .squares-ten-by-ten { @@ -243,7 +280,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-sd66bf24bab.png') no-repeat; + background: url('/squares-s2f4aa65dcf.png') no-repeat; } .squares-ten-by-ten { @@ -278,7 +315,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite { - background: url('/squares-s8e490168dd.png') no-repeat; + background: url('/squares-sce5dc30797.png') no-repeat; } .adjusted-percentage { @@ -316,7 +353,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .adjusted-percentage, .adjusted-px-1, .adjusted-px-2 { - background: url('/squares-s8e490168dd.png') no-repeat; + background: url('/squares-sce5dc30797.png') no-repeat; } .adjusted-percentage { @@ -337,13 +374,13 @@ class SpritesTest < Test::Unit::TestCase it "should repeat the image" do css = render <<-SCSS - $squares-repeat: repeat; + $squares-repeat: repeat-x; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-sa5550fd132.png') no-repeat; + background: url('/squares-s65c43cd573.png') no-repeat; } .squares-ten-by-ten { @@ -367,7 +404,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { - background: url('/squares-s89a274044e.png') no-repeat; + background: url('/squares-sb9d9a8ca6a.png') no-repeat; } .squares-ten-by-ten { @@ -416,7 +453,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .squares { - background: url('/squares-s145869726f.png') 0 -10px no-repeat; + background: url('/squares-sd817b59156.png') 0 -10px no-repeat; } CSS end @@ -435,7 +472,7 @@ class SpritesTest < Test::Unit::TestCase assert_equal image_size('squares-s*.png'), [20, 40] assert_correct css, <<-CSS .squares-sprite { - background: url('/squares-se3c68372d9.png') no-repeat; + background: url('/squares-s555875d730.png') no-repeat; } .foo { @@ -448,14 +485,14 @@ class SpritesTest < Test::Unit::TestCase CSS end - it "should render corret sprite with css selectors via issue#248" do + it "should render correct sprite with css selectors via issue#248" do css = render <<-SCSS @import "selectors/*.png"; @include all-selectors-sprites; SCSS assert_correct css, <<-CSS .selectors-sprite, .selectors-ten-by-ten { - background: url('/selectors-sedfef809e2.png') no-repeat; + background: url('/selectors-s7e84acb3d2.png') no-repeat; } .selectors-ten-by-ten { @@ -472,8 +509,33 @@ class SpritesTest < Test::Unit::TestCase } CSS end + + it "should honor offsets when rendering selectors via issue#449" do + css = render <<-SCSS + @import "selectors/*.png"; + @include all-selectors-sprites($offset-x: 20px, $offset-y: 20px); + SCSS + assert_correct css, <<-CSS + .selectors-sprite, .selectors-ten-by-ten { + background: url('/selectors-s7e84acb3d2.png') no-repeat; + } + + .selectors-ten-by-ten { + background-position: 20px 20px; + } + .selectors-ten-by-ten:hover, .selectors-ten-by-ten.ten-by-ten_hover, .selectors-ten-by-ten.ten-by-ten-hover { + background-position: 20px 0; + } + .selectors-ten-by-ten:target, .selectors-ten-by-ten.ten-by-ten_target, .selectors-ten-by-ten.ten-by-ten-target { + background-position: 20px -10px; + } + .selectors-ten-by-ten:active, .selectors-ten-by-ten.ten-by-ten_active, .selectors-ten-by-ten.ten-by-ten-active { + background-position: 20px 10px; + } + CSS + end - it "should render corret sprite with css selectors via magic mixin" do + it "should render correct sprite with css selectors via magic mixin" do css = render <<-SCSS @import "selectors/*.png"; a { @@ -482,7 +544,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .selectors-sprite, a { - background: url('/selectors-sedfef809e2.png') no-repeat; + background: url('/selectors-s7e84acb3d2.png') no-repeat; } a { @@ -499,6 +561,7 @@ class SpritesTest < Test::Unit::TestCase } CSS end + it "should not render corret sprite with css selectors via magic mixin" do css = render <<-SCSS @@ -510,7 +573,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .selectors-sprite, a { - background: url('/selectors-sedfef809e2.png') no-repeat; + background: url('/selectors-s7e84acb3d2.png') no-repeat; } a { @@ -518,6 +581,33 @@ class SpritesTest < Test::Unit::TestCase } CSS end + + it "should render corret sprite with css selectors via magic mixin with the correct offsets" do + css = render <<-SCSS + @import "selectors/*.png"; + a { + @include selectors-sprite(ten-by-ten, false, 5, -5) + } + SCSS + assert_correct css, <<-CSS + .selectors-sprite, a { + background: url('/selectors-s7e84acb3d2.png') no-repeat; + } + + a { + background-position: 5px -5px; + } + a:hover, a.ten-by-ten_hover, a.ten-by-ten-hover { + background-position: 5px -25px; + } + a:target, a.ten-by-ten_target, a.ten-by-ten-target { + background-position: 5px -35px; + } + a:active, a.ten-by-ten_active, a.ten-by-ten-active { + background-position: 5px -15px; + } + CSS + end it "should raise error on filenames that are not valid sass syntax" do assert_raise(Compass::Error) do @@ -538,7 +628,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .ko-sprite, .ko-default_background, .ko-starbg26x27 { - background: url('/ko-scc3f80660d.png') no-repeat; + background: url('/ko-sd46dfbab4f.png') no-repeat; } .ko-default_background { @@ -578,6 +668,20 @@ class SpritesTest < Test::Unit::TestCase assert_equal 2, map_files('selectors-s*.png').size, "File was removed" end + it "should generate a sprite if the sprite is a bool" do + css = render <<-SCSS + @import "bool/*.png"; + a { + @include bool-sprite(false); + } + a { + @include bool-sprite(true); + } + SCSS + assert !css.empty? + end + + it "should generate a sprite if the sprite is a colorname" do css = render <<-SCSS @import "colors/*.png"; @@ -595,7 +699,7 @@ class SpritesTest < Test::Unit::TestCase SCSS assert_correct css, <<-CSS .nested-sprite, .nested-ten-by-ten { - background: url('/nested-s55a8935544.png') no-repeat; + background: url('/nested-s7b93e0b6bf.png') no-repeat; } .nested-ten-by-ten { @@ -603,5 +707,137 @@ class SpritesTest < Test::Unit::TestCase } CSS end + + it "should create horizontal sprite" do + css = render <<-SCSS + $squares-layout:horizontal; + @import "squares/*.png"; + .foo { + @include sprite-background-position($squares-sprites, "twenty-by-twenty"); + } + .bar { + @include sprite-background-position($squares-sprites, "ten-by-ten"); + } + SCSS + assert_equal [30, 20], image_size('squares-s*.png') + other_css = <<-CSS + .squares-sprite { + background: url('/squares-s4bd95c5c56.png') no-repeat; + } -end \ No newline at end of file + .foo { + background-position: -10px 0; + } + + .bar { + background-position: 0 0; + } + CSS + assert_correct clean(css), clean(other_css) + end + + it "should allow use of demension functions" do + css = render <<-SCSS + @import "squares/*.png"; + $h: squares-sprite-height(twenty-by-twenty); + $w: squares-sprite-width(twenty-by-twenty); + .div { + height:$h + 1px; + width:$w + 2px; + } + SCSS + other_css = <<-CSS + .squares-sprite { + background: url('/squares-sbbc18e2129.png') no-repeat; + } + .div { + height:21px; + width:22px; + } + CSS + assert_correct clean(css), clean(other_css) + end + + it "should replace text with images and dimensions using sprites" do + css = render <<-SCSS + @import "colors/*.png"; + .blue { + @include sprite-replace-text($colors-sprites, blue); + } + .yellow { + @include sprite-replace-text-with-dimensions($colors-sprites, yellow); + } + SCSS + other_css = <<-CSS + .colors-sprite { + background:url('/colors-s58671cb5bb.png') no-repeat; + } + .blue { + text-indent:110%; + white-space:nowrap; + overflow:hidden; + background-position:0 0; + background-image:url('/colors-s58671cb5bb.png'); + background-repeat:no-repeat; + } + + .yellow { + text-indent:110%; + white-space:nowrap; + overflow:hidden; + background-position:0 -10px; + height:10px; + width:10px; + background-image:url('/colors-s58671cb5bb.png'); + background-repeat:no-repeat; + } + CSS + assert_correct clean(css), clean(other_css) + end + + it "should inline the sprite file" do + css = render <<-SCSS + $colors-inline:true; + @import "colors/*.png"; + @include all-colors-sprites; + SCSS + other_css = <<-CSS + .colors-sprite, .colors-blue, .colors-yellow { + background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAUCAAAAACRhfOKAAAAHElEQVR42mM5wQADLP8JMRlIUIvE/IdgctLTNgCHDhEQVD4ceAAAAABJRU5ErkJggg=='); + } + .colors-blue { + background-position:0 0; + } + .colors-yellow { + background-position:0 -10px; + } + CSS + assert_correct clean(css), clean(other_css) + end + + it "should have a sprite_name function that returns the names of the sprites in a sass list" do + css = render <<-SCSS + $colors-inline:true; + @import "colors/*.png"; + @each $color in sprite_names($colors-sprites) { + .\#{$color} { + width:0px; + } + } + SCSS + other_css = <<-CSS + .colors-sprite { + background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAUCAAAAACRhfOKAAAAHElEQVR42mM5wQADLP8JMRlIUIvE/IdgctLTNgCHDhEQVD4ceAAAAABJRU5ErkJggg=='); + } + .blue { + width:0px; + } + .yellow { + width:0px; + } + CSS + assert_correct clean(css), clean(other_css) + + end + +end diff --git a/test/integrations/test_rails_helper.rb b/test/integrations/test_rails_helper.rb deleted file mode 100644 index 6cbb80f2..00000000 --- a/test/integrations/test_rails_helper.rb +++ /dev/null @@ -1,20 +0,0 @@ -# XXX This file isn't in use at the moment, but will be used to help test -# XXX deep rails integration of compass features. -need_gems = false - -# allows testing with edge Rails by creating a test/rails symlink -RAILS_ROOT = linked_rails = File.dirname(__FILE__) + '/rails' -RAILS_ENV = 'test' - -if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib') - puts "[ using linked Rails ]" - $:.unshift linked_rails + '/activesupport/lib' - $:.unshift linked_rails + '/actionpack/lib' -else - need_gems = true -end - -require 'rubygems' if need_gems - -require 'action_controller' -require 'action_view' diff --git a/test/test_helper.rb b/test/test_helper.rb index 33dbe6ec..b2cedcd4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -23,6 +23,12 @@ require 'compass' require 'test/unit' +class String + def name + to_s + end +end + %w(command_line diff io rails test_case).each do |helper| require "helpers/#{helper}" end @@ -34,4 +40,35 @@ class Test::Unit::TestCase include Compass::IoHelper extend Compass::TestCaseHelper::ClassMethods -end \ No newline at end of file +end + +module SpriteHelper + URI = "selectors/*.png" + + def init_sprite_helper + @images_src_path = File.join(File.expand_path('../', __FILE__), 'fixtures', 'sprites', 'public', 'images') + @images_tmp_path = File.join(File.expand_path('../', __FILE__), 'fixtures', 'sprites', 'public', 'images-tmp') + end + + def sprite_map_test(options, uri = URI) + importer = Compass::SpriteImporter.new + path, name = Compass::SpriteImporter.path_and_name(uri) + sprite_names = Compass::SpriteImporter.sprite_names(uri) + sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options) + map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map{|n| uri.gsub('*', n)}, path, name, sass_engine, options) + map.options = {:compass => {:logger => Compass::NullLogger.new}} + map + end + + def create_sprite_temp + init_sprite_helper + ::FileUtils.cp_r @images_src_path, @images_tmp_path + end + + def clean_up_sprites + init_sprite_helper + ::FileUtils.rm_r @images_tmp_path + rescue Errno::ENOENT => e + end + +end \ No newline at end of file diff --git a/test/units/actions_test.rb b/test/units/actions_test.rb index 21b26414..c1cb379b 100644 --- a/test/units/actions_test.rb +++ b/test/units/actions_test.rb @@ -13,7 +13,7 @@ class ActionsTest < Test::Unit::TestCase end # When log4r is included, it sometimes breaks the Actions - def test_quiet_option + test "test_quiet_option" do b = BaseActionExtender.new b.logger = "" b.options[:quiet] = true diff --git a/test/units/compiler_test.rb b/test/units/compiler_test.rb new file mode 100644 index 00000000..8e2fe604 --- /dev/null +++ b/test/units/compiler_test.rb @@ -0,0 +1,11 @@ +require 'test_helper' +require 'fileutils' + +class CompilerTest < Test::Unit::TestCase + + it "should strip css from file name and reappend" do + compiler = Compass::Compiler.new(Dir.pwd, 'foo', 'bar', {}) + assert_equal 'screen', compiler.stylesheet_name(File.join(Dir.pwd, 'foo', 'screen.css.scss')) + end + +end \ No newline at end of file diff --git a/test/units/configuration_test.rb b/test/units/configuration_test.rb index 5be7b3c2..c383aec8 100644 --- a/test/units/configuration_test.rb +++ b/test/units/configuration_test.rb @@ -19,7 +19,6 @@ class ConfigurationTest < Test::Unit::TestCase project_type = :stand_alone - # Set this to the root of your project when deployed: http_path = "/" css_dir = "css" sass_dir = "sass" @@ -69,6 +68,96 @@ class ConfigurationTest < Test::Unit::TestCase assert_equal "WARNING: asset_host is code and cannot be written to a file. You'll need to copy it yourself.\n", warning end + class TestData < Compass::Configuration::Data + def initialize + super(:test) + end + inherited_array :stuff + end + + def test_inherited_array_can_clobber + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff = [:b] + data2.inherit_from!(data1) + assert_equal [:b], data2.stuff.to_a + end + + def test_inherited_array_can_append + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff << :b + data2.inherit_from!(data1) + assert_equal [:b, :a], data2.stuff.to_a + end + + def test_inherited_array_can_append_2 + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff << :b + data2.inherit_from!(data1) + data3 = TestData.new + data3.stuff << :c + data3.inherit_from!(data2) + assert_equal [:c, :b, :a], data3.stuff.to_a + end + + def test_inherited_array_can_remove + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff >> :a + data2.inherit_from!(data1) + assert_equal [], data2.stuff.to_a + end + + def test_inherited_array_combined_augmentations + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff >> :a + data2.stuff << :b + data2.inherit_from!(data1) + assert_equal [:b], data2.stuff.to_a + end + + def test_inherited_array_long_methods + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.remove_from_stuff(:a) + data2.add_to_stuff(:b) + data2.inherit_from!(data1) + assert_equal [:b], data2.stuff.to_a + end + + def test_inherited_array_augmentations_can_be_clobbered + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff >> :a + data2.stuff << :b + data2.stuff = [:c] + data2.inherit_from!(data1) + assert_equal [:c], data2.stuff.to_a + end + + def test_inherited_array_augmentations_after_clobbering + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff >> :a + data2.stuff << :b + data2.stuff = [:c, :d] + data2.stuff << :e + data2.stuff >> :c + data2.inherit_from!(data1) + assert_equal [:d, :e], data2.stuff.to_a + end + def test_serialization_warns_with_asset_cache_buster_set contents = StringIO.new(<<-CONFIG) asset_cache_buster do |path| @@ -78,12 +167,36 @@ class ConfigurationTest < Test::Unit::TestCase Compass.add_configuration(contents, "test_serialization_warns_with_asset_cache_buster_set") + assert_kind_of Proc, Compass.configuration.asset_cache_buster_without_default + assert_equal "http://example.com", Compass.configuration.asset_cache_buster_without_default.call("whatever") warning = capture_warning do Compass.configuration.serialize end assert_equal "WARNING: asset_cache_buster is code and cannot be written to a file. You'll need to copy it yourself.\n", warning end + def test_inherited_arrays_augmentations_serialize + inherited = TestData.new + inherited.stuff << :a + d = TestData.new + d.stuff << :b + d.stuff >> :c + assert_equal <> :c +CONFIG + end + def test_inherited_arrays_clobbering_with_augmentations_serialize + inherited = TestData.new + inherited.stuff << :a + d = TestData.new + d.stuff << :b + d.stuff = [:c, :d] + d.stuff << :e + assert_equal < 1000, evaluate("tan(pi()/2 - 0.0001)") assert evaluate("tan(pi()/2 + 0.0001)").to_f < -1000, evaluate("tan(pi()/2 - 0.0001)") assert_equal "0.693px", evaluate("log(2px)") @@ -101,6 +104,60 @@ class SassExtensionsTest < Test::Unit::TestCase assert_equal "true", evaluate("prefixed(-css2, css2-fallback(css3, css2))") end + def test_font_files + assert_equal '', evaluate('font_files()') + assert_equal "url(/font/name.woff) format('woff'), url(/fonts/name.ttf) format('truetype'), url(/fonts/name.svg#fontpath) format('svg')", evaluate("font-files('/font/name.woff', woff, '/fonts/name.ttf', truetype, '/fonts/name.svg#fontpath', svg)") + + assert_equal "url(/font/with/right_ext.woff) format('woff')", evaluate("font_files('/font/with/right_ext.woff')") + assert_equal "url(/font/with/wrong_ext.woff) format('svg')", evaluate("font_files('/font/with/wrong_ext.woff', 'svg')") + assert_equal "url(/font/with/no_ext) format('opentype')", evaluate("font_files('/font/with/no_ext', 'otf')") + assert_equal "url(/font/with/weird.ext) format('truetype')", evaluate("font_files('/font/with/weird.ext', 'ttf')") + + assert_equal "url(/font/with/right_ext.woff) format('woff'), url(/font/with/right_ext_also.otf) format('opentype')", evaluate("font_files('/font/with/right_ext.woff', '/font/with/right_ext_also.otf')") + assert_equal "url(/font/with/wrong_ext.woff) format('truetype'), url(/font/with/right_ext.otf) format('opentype')", evaluate("font_files('/font/with/wrong_ext.woff', 'ttf', '/font/with/right_ext.otf')") + + assert_nothing_raised Sass::SyntaxError do + evaluate("font-files('/font/name.woff')") + end + + assert_raises Sass::SyntaxError do + evaluate("font-files('/font/name.ext')") + end + + assert_raises Sass::SyntaxError do + evaluate("font-files('/font/name.ext', 'nonsense')") + end + end + + %w(stylesheet_url font_url image_url generated_image_url).each do |helper| + class_eval %Q{ + def test_#{helper}_helper_defers_to_existing_helper + c = Class.new do + def #{helper}(*args) + :original + end + end + c.send(:include, Compass::SassExtensions::Functions::Urls) + assert_equal :original, c.new.#{helper}("logo.png") + end + } + end + + def test_inline_font_files + Compass.configuration.fonts_path = File.expand_path "../fixtures/fonts", File.dirname(__FILE__) + base64_string = File.read(File.join(Compass.configuration.fonts_path, "bgrove.base64.txt")).chomp + assert_equal "url('data:font/truetype;base64,#{base64_string}') format('truetype')", evaluate("inline_font_files('bgrove.ttf', truetype)") + end + + + def test_image_size_should_respond_to_to_path + object = mock() + object.expects(:to_path).returns('foo.jpg') + object.expects(:respond_to?).with(:to_path).returns(true) + + Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object) + end + def test_reject assert_equal "b d", evaluate("reject(a b c d, a, c)") assert_equal "a b c d", evaluate("reject(a b c d, e)") diff --git a/test/units/sprites/engine_test.rb b/test/units/sprites/engine_test.rb index a172c518..571c1fac 100644 --- a/test/units/sprites/engine_test.rb +++ b/test/units/sprites/engine_test.rb @@ -1,14 +1,19 @@ require 'test_helper' class EngineTest < Test::Unit::TestCase - + include SpriteHelper def setup + create_sprite_temp sprite_filename = 'squares/ten-by-ten.png' @images = [ Compass::SassExtensions::Sprites::Image.new(nil, File.join(sprite_filename), {}) ] @engine = Compass::SassExtensions::Sprites::Engine.new(100, 100, @images) end + + def taredown + clean_up_sprites + end test "should have width of 100" do diff --git a/test/units/sprites/image_row_test.rb b/test/units/sprites/image_row_test.rb new file mode 100644 index 00000000..6f40c819 --- /dev/null +++ b/test/units/sprites/image_row_test.rb @@ -0,0 +1,58 @@ +require 'test_helper' + +class ImageRowTest < Test::Unit::TestCase + include SpriteHelper + def setup + clean_up_sprites + create_sprite_temp + file = StringIO.new("images_path = #{@images_src_path.inspect}\n") + Compass.add_configuration(file, "sprite_config") + @filenames = %w(large.png large_square.png medium.png tall.png small.png) + @image_files = Dir["#{@images_src_path}/image_row/*.png"].sort + @images = @image_files.map do |img| + img.gsub!("#{@images_src_path}/", '') + Compass::SassExtensions::Sprites::Image.new(nil, img, {}) + end + image_row(1000) + end + + def teardown + clean_up_sprites + end + + def image_row(max) + @image_row = Compass::SassExtensions::Sprites::ImageRow.new(max) + end + + def populate_row + @images.each do |image| + assert @image_row.add(image) + end + end + + it "should return false if image will not fit in row" do + image_row(100) + img = Compass::SassExtensions::Sprites::Image.new(nil, File.join('image_row', 'large.png'), {}) + assert !@image_row.add(img) + end + + it "should have 5 images" do + populate_row + assert_equal 5, @image_row.images.size + end + + it "should return max image width" do + populate_row + assert_equal 400, @image_row.width + end + + it "should return max image height" do + populate_row + assert_equal 40, @image_row.height + end + + it "should have an efficiency rating" do + populate_row + assert_equal 1 - (580.0 / 1000.0), @image_row.efficiency + end +end \ No newline at end of file diff --git a/test/units/sprites/image_test.rb b/test/units/sprites/image_test.rb index aa8dff32..bd3e44ab 100644 --- a/test/units/sprites/image_test.rb +++ b/test/units/sprites/image_test.rb @@ -1,49 +1,46 @@ require 'test_helper' require 'mocha' require 'ostruct' -class SpritesImageTest < Test::Unit::TestCase +class SpritesImageTest < Test::Unit::TestCase + include SpriteHelper def setup - @images_src_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images') - file = StringIO.new("images_path = #{@images_src_path.inspect}\n") - Compass.add_configuration(file, "sprite_config") - @repeat = 'no-repeat' - @spacing = 0 - @position = 100 - @offset = 100 + create_sprite_temp end - let(:sprite_filename) { 'squares/ten-by-ten.png' } - let(:sprite_path) { File.join(@images_src_path, sprite_filename) } - let(:sprite_name) { File.basename(sprite_filename, '.png') } + def teardown + clean_up_sprites + end + + SPRITE_FILENAME = 'selectors/ten-by-ten.png' - def parent - importer = Compass::SpriteImporter.new(:uri => "selectors/*.png", :options => options) - @parent ||= Compass::SassExtensions::Sprites::SpriteMap.new(importer.sprite_names.map{|n| "selectors/#{n}.png"}, importer.path, importer.name, importer.sass_engine, importer.options) + def sprite_path + File.join(@images_tmp_path, SPRITE_FILENAME) end - let(:options) do - options = {:offset => @offset} - options.stubs(:get_var).with(anything).returns(nil) - ::OpenStruct.any_instance.stubs(:unitless?).returns(true) - options.stubs(:get_var).with("#{sprite_name}-repeat").returns(::OpenStruct.new(:value => @repeat)) - options.stubs(:get_var).with("#{sprite_name}-spacing").returns(::OpenStruct.new(:value => @spacing)) - options.stubs(:get_var).with("#{sprite_name}-position").returns(::OpenStruct.new(:value => @position)) - options + def sprite_name + File.basename(SPRITE_FILENAME, '.png') end - + def digest + Digest::MD5.file(sprite_path).hexdigest + end - let(:digest) { Digest::MD5.file(sprite_path).hexdigest } - - - let(:image) { Compass::SassExtensions::Sprites::Image.new(parent, File.join(sprite_filename), options)} + def test_map(options ={}) + options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')}.merge(options) + map = sprite_map_test(options) + end + + def test_image(options ={}) + test_map(options).images.first + end test 'initialize' do + image = test_image assert_equal sprite_name, image.name assert_equal sprite_path, image.file - assert_equal sprite_filename, image.relative_file + assert_equal SPRITE_FILENAME, image.relative_file assert_equal 10, image.width assert_equal 10, image.height assert_equal digest, image.digest @@ -52,44 +49,49 @@ class SpritesImageTest < Test::Unit::TestCase end test 'hover' do - assert_equal 'ten-by-ten_hover', image.hover.name + assert_equal 'ten-by-ten_hover', test_image.hover.name end test 'no parent' do - assert_nil image.parent + assert_nil test_image.parent end - - test 'image type is nil' do - @repeat = nil - assert_nil image.repeat - end - - test 'image type is "global"' do - @repeat = 'global' - assert_equal @repeat, image.repeat + test 'image type is "global" should raise exception' do + assert_raise ::Compass::SpriteException do + image = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('global') + image.repeat + end end test 'image type is "no-repeat"' do - assert_equal 'no-repeat', image.repeat + img = test_image + assert_equal 'no-repeat', img.repeat + assert img.no_repeat? + end + + test 'image repeat-x' do + img = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('repeat-x') + assert img.repeat_x? end test 'image position' do - assert_equal Sass::Script::Number.new(100, ["px"]).value, image.position.value + image = test_image "selectors_ten_by_ten_position" => Sass::Script::Number.new(100, ["px"]) + assert_equal 100, image.position.value end test 'image spacing' do @spacing = 10 - assert_equal @spacing, image.spacing + image = test_image "spacing" => Sass::Script::Number.new(100, ["px"]) + assert_equal 100, image.spacing end test 'offset' do - assert_equal @offset, image.offset + image = test_image "selectors_ten_by_ten_position" => Sass::Script::Number.new(100, ["px"]) + assert_equal 100, image.offset end test 'neither, uses 0' do - @offset = 0 - img = image + img = test_image img.position.stubs(:unitless?).returns(false) assert_equal 0, img.offset end diff --git a/test/units/sprites/importer_test.rb b/test/units/sprites/importer_test.rb index 79fdc800..6691fa41 100644 --- a/test/units/sprites/importer_test.rb +++ b/test/units/sprites/importer_test.rb @@ -1,13 +1,13 @@ require 'test_helper' -require 'timecop' + class ImporterTest < Test::Unit::TestCase - URI = "selectors/*.png" + include SpriteHelper def setup - @images_src_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images') + create_sprite_temp file = StringIO.new("images_path = #{@images_src_path.inspect}\n") Compass.add_configuration(file, "sprite_config") - @importer = Compass::SpriteImporter.new(:uri => URI, :options => options) + @importer = Compass::SpriteImporter.new end def teardown @@ -18,20 +18,37 @@ class ImporterTest < Test::Unit::TestCase {:foo => 'bar'} end - test "load should return an instance of SpriteImporter" do - assert Compass::SpriteImporter.load(URI, options).is_a?(Compass::SpriteImporter) + test "should use search path to find sprites" do + Compass.reset_configuration! + uri = 'foo/*.png' + other_folder = File.join(@images_tmp_path, '../other-temp') + FileUtils.mkdir_p other_folder + FileUtils.mkdir_p File.join(other_folder, 'foo') + %w(my bar).each do |file| + FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) + end + config = Compass::Configuration::Data.new('config') + config.images_path = @images_tmp_path + config.sprite_load_path = [@images_tmp_path, other_folder] + Compass.add_configuration(config, "sprite_config") + importer = Compass::SpriteImporter.new + assert_equal 2, Compass.configuration.sprite_load_path.compact.size + assert Compass.configuration.sprite_load_path.include?(other_folder) + assert_equal ["bar", "my"], Compass::SpriteImporter.sprite_names(uri) + + FileUtils.rm_rf other_folder end test "name should return the sprite name" do - assert_equal 'selectors', @importer.name + assert_equal 'selectors', Compass::SpriteImporter.sprite_name(URI) end test "path should return the sprite path" do - assert_equal 'selectors', @importer.path + assert_equal 'selectors', Compass::SpriteImporter.path(URI) end test "should return all the sprite names" do - assert_equal ["ten-by-ten", "ten-by-ten_active", "ten-by-ten_hover", "ten-by-ten_target"], @importer.sprite_names + assert_equal ["ten-by-ten", "ten-by-ten_active", "ten-by-ten_hover", "ten-by-ten_target"], Compass::SpriteImporter.sprite_names(URI) end test "should have correct mtime" do @@ -47,19 +64,27 @@ class ImporterTest < Test::Unit::TestCase end test "sass options should contain options" do - assert_equal 'bar', @importer.sass_options[:foo] + opts = Compass::SpriteImporter.sass_options('foo', @importer, options) + assert_equal 'bar', opts[:foo] + end + + test "verify that the sass_engine passes the correct filename" do + importer = Compass::SpriteImporter.new + engine = Compass::SpriteImporter.sass_engine(URI, 'foo', importer, options) + assert_equal engine.options[:filename], URI end test "should fail given bad sprite extensions" do @images_src_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images') file = StringIO.new("images_path = #{@images_src_path.inspect}\n") Compass.add_configuration(file, "sprite_config") - importer = Compass::SpriteImporter.new(:uri => 'bad_extensions/*.jpg', :options => options) + importer = Compass::SpriteImporter.new + uri = "bad_extensions/*.jpg" begin - importer.sass_engine + Compass::SpriteImporter.sass_engine(uri, Compass::SpriteImporter.sprite_name(uri), importer, {}) assert false, "An invalid sprite file made it past validation." rescue Compass::Error => e - assert e.message.include?('.png') + assert e.message.include?("invalid sprite path") end end diff --git a/test/units/sprites/layout_test.rb b/test/units/sprites/layout_test.rb new file mode 100644 index 00000000..371e3eb3 --- /dev/null +++ b/test/units/sprites/layout_test.rb @@ -0,0 +1,155 @@ +require 'test_helper' + +class LayoutTest < Test::Unit::TestCase + include SpriteHelper + + def setup + Hash.send(:include, Compass::SassExtensions::Functions::Sprites::VariableReader) + clean_up_sprites + create_sprite_temp + file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n") + Compass.add_configuration(file, "sprite_config") + Compass.configure_sass_plugin! + @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')} + end + + def teardown + clean_up_sprites + end + + # HELPERS + + def vertical + opts = @options.merge("layout" => Sass::Script::String.new('vertical')) + + sprite_map_test(opts) + end + + def smart + options = @options.merge("layout" => Sass::Script::String.new('smart')) + importer = Compass::SpriteImporter.new + uri = "image_row/*.png" + path, name = Compass::SpriteImporter.path_and_name(uri) + sprite_names = Compass::SpriteImporter.sprite_names(uri) + sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options) + map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map {|n| "image_row/#{n}.png"}, path, name, sass_engine, options) + map.options = {:compass => {:logger => Compass::NullLogger.new}} + + map + end + + def diagonal + opts = @options.merge("layout" => Sass::Script::String.new('diagonal')) + + sprite_map_test(opts) + end + + def horizontal(options= {}) + opts = @options.merge("layout" => Sass::Script::String.new('horizontal')) + opts.merge!(options) + + sprite_map_test(opts) + end + + # REPEAT_X + + test 'repeat-x layout single image' do + opts = {"repeat_x_three_repeat" => Sass::Script::String.new('repeat-x')} + map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png') + assert_equal 6, map.width + assert_equal [0, 4, 7, 9, 14, 4, 4], map.images.map(&:top) + assert_equal [0, 0, 0, 0, 0, 0, 3], map.images.map(&:left) + end + + test 'repeat-x layout multi image' do + opts = {"repeat_x_three_repeat" => Sass::Script::String.new('repeat-x'), "repeat_x_four_repeat" => Sass::Script::String.new('repeat-x')} + map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png') + assert_equal 12, map.width + end + + # VERTICAL LAYOUT + + it "should have a vertical layout" do + vert = vertical + assert_equal [0, 10, 20, 30], vert.images.map(&:top) + assert_equal [0, 0, 0, 0], vert.images.map(&:left) + assert vert.vertical? + end + + it "should have a vertical layout with spacing" do + vert = sprite_map_test(@options.merge({"spacing" => Sass::Script::Number.new(10, ['px'])})) + assert_equal [0, 20, 40, 60], vert.images.map(&:top) + end + + it "should layout vertical with position" do + vert = sprite_map_test("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px'])) + assert_equal [0, 10, 0, 0], vert.images.map(&:left) + end + + it "should generate vertical sprites in decending order" do + sizes = vertical.images.map{|image| File.size(image.file) } + assert_equal sizes.min, File.size(vertical.images.first.file) + assert_equal sizes.max, File.size(vertical.images.last.file) + end + + # SMART LAYOUT + + it "should have a smart layout" do + base = smart + base.generate + assert base.smart? + assert_equal 400, base.width + assert_equal 60, base.height + assert_equal [[0, 0], [20, 120], [20, 0], [20, 100], [20, 160]], base.images.map {|i| [i.top, i.left]} + assert File.exists?(base.filename) + FileUtils.rm base.filename + end + + # DIAGONAL LAYOUT + + it "should generate a diagonal sprite" do + base = diagonal + base.generate + assert base.diagonal? + assert_equal 40, base.width + assert_equal 40, base.height + assert_equal [[30, 0], [20, 10], [10, 20], [0, 30]], base.images.map {|i| [i.top, i.left]} + assert File.exists?(base.filename) + FileUtils.rm base.filename + end + + # HORIZONTAL LAYOUT + + it "should have a horizontal layout" do + base = horizontal + assert base.horizontal? + assert_equal 10, base.height + assert_equal 40, base.width + end + + it "should layout images horizontaly" do + base = horizontal + assert_equal [0, 10, 20, 30], base.images.map(&:left) + assert_equal [0, 0, 0, 0], base.images.map(&:top) + end + + it "should layout horizontaly with spacing" do + base = horizontal("spacing" => Sass::Script::Number.new(10, ['px'])) + assert_equal [0, 20, 40, 60], base.images.map(&:left) + assert_equal [0, 0, 0, 0], base.images.map(&:top) + assert_equal 80, base.width + end + + it "should layout horizontaly with position" do + base = horizontal("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px'])) + assert_equal [0, 10, 0, 0], base.images.map(&:top) + end + + it "should generate a horrizontal sprite" do + base = horizontal + base.generate + assert File.exists?(base.filename) + FileUtils.rm base.filename + end + +end \ No newline at end of file diff --git a/test/units/sprites/row_fitter_test.rb b/test/units/sprites/row_fitter_test.rb new file mode 100644 index 00000000..38096ef8 --- /dev/null +++ b/test/units/sprites/row_fitter_test.rb @@ -0,0 +1,66 @@ +require 'test_helper' +require 'compass/sass_extensions/sprites/row_fitter' + +class RowFitterTest < Test::Unit::TestCase + include SpriteHelper + def setup + file = StringIO.new("images_path = #{@images_src_path.inspect}\n") + Compass.add_configuration(file, "sprite_config") + end + + def row_fitter(images = nil) + @row_fitter ||= Compass::SassExtensions::Sprites::RowFitter.new(images) + end + + def teardown + @row_fitter = nil + end + + def create_images(dims) + dims.collect { |width, height| + image = Compass::SassExtensions::Sprites::Image.new('blah', 'blah', {}) + image.stubs(:width => width, :height => height) + image + } + end + + def basic_dims + [ + [ 100, 10 ], + [ 80, 10 ], + [ 50, 10 ], + [ 35, 10 ], + [ 20, 10 ] + ] + end + + it 'should use the fast placement algorithm' do + images = create_images(basic_dims) + + row_fitter(images) + assert_equal 100, row_fitter.width + + row_fitter.fit!(:fast) + + assert_equal 4, row_fitter.rows.length + + assert_equal [ images[0] ], row_fitter[0].images + assert_equal [ images[1] ], row_fitter[1].images + assert_equal [ images[2], images[3] ], row_fitter[2].images + assert_equal [ images[4] ], row_fitter[3].images + end + + it 'should use the scan placement algorithm' do + images = create_images(basic_dims) + + row_fitter(images) + + row_fitter.fit!(:scan) + + assert_equal 3, row_fitter.rows.length + + assert_equal [ images[0] ], row_fitter[0].images + assert_equal [ images[1], images[4] ], row_fitter[1].images + assert_equal [ images[2], images[3] ], row_fitter[2].images + end +end \ No newline at end of file diff --git a/test/units/sprites/sprite_command_test.rb b/test/units/sprites/sprite_command_test.rb index 240b00c3..2c30c168 100644 --- a/test/units/sprites/sprite_command_test.rb +++ b/test/units/sprites/sprite_command_test.rb @@ -1,30 +1,25 @@ require 'test_helper' - +require 'compass/exec' class SpriteCommandTest < Test::Unit::TestCase - attr_reader :test_dir + include Compass::TestCaseHelper + include Compass::CommandLineHelper + include Compass::IoHelper + attr_reader :test_dir + include SpriteHelper def setup - @images_src_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images') - @images_tmp_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images-tmp') @before_dir = ::Dir.pwd create_temp_cli_dir create_sprite_temp - File.open(File.join(@test_dir, 'config.rb'), 'w') do |f| + @config_file = File.join(@test_dir, 'config.rb') + File.open(@config_file, 'w') do |f| f << config_data end end - def create_sprite_temp - ::FileUtils.cp_r @images_src_path, @images_tmp_path - end - - def clean_up_sprites - ::FileUtils.rm_r @images_tmp_path - end - def config_data return <<-CONFIG - images_path = #{@images_tmp_path.inspect} + images_path = "#{@images_tmp_path}" CONFIG end @@ -37,7 +32,7 @@ class SpriteCommandTest < Test::Unit::TestCase def run_compass_with_options(options) output = 'foo' ::Dir.chdir @test_dir - %x{compass #{options.join(' ')}} + compass *options end def options_to_cli(options) @@ -53,7 +48,7 @@ class SpriteCommandTest < Test::Unit::TestCase end it "should create sprite file" do - assert_equal 0, run_compass_with_options(['sprite', "-f", 'stylesheet.scss', "'#{@images_tmp_path}/*.png'"]).to_i + assert_equal 0, run_compass_with_options(['sprite', "-f", 'stylesheet.scss', "squares/*.png"]).to_i assert File.exists?(File.join(test_dir, 'stylesheet.scss')) end diff --git a/test/units/sprites/sprite_map_test.rb b/test/units/sprites/sprite_map_test.rb index 56f10885..a59fd086 100644 --- a/test/units/sprites/sprite_map_test.rb +++ b/test/units/sprites/sprite_map_test.rb @@ -1,27 +1,21 @@ require 'test_helper' class SpriteMapTest < Test::Unit::TestCase + include SpriteHelper def setup Hash.send(:include, Compass::SassExtensions::Functions::Sprites::VariableReader) - @images_src_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images') - @images_tmp_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images-tmp') - FileUtils.cp_r @images_src_path, @images_tmp_path - config = Compass::Configuration::Data.new('config') - config.images_path = @images_tmp_path - Compass.add_configuration(config) + create_sprite_temp + file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n") + Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin! - @options = {'cleanup' => Sass::Script::Bool.new(true)} - setup_map - end - - def setup_map - @importer = Compass::SpriteImporter.new(:uri => "selectors/*.png", :options => @options) - @base = Compass::SassExtensions::Sprites::SpriteMap.new(@importer.sprite_names.map{|n| "selectors/#{n}.png"}, @importer.path, @importer.name, @importer.sass_engine, @importer.options) + @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')} + @base = sprite_map_test(@options) end def teardown - FileUtils.rm_r @images_tmp_path + clean_up_sprites + @base = nil end it "should have the correct size" do @@ -29,7 +23,7 @@ class SpriteMapTest < Test::Unit::TestCase end it "should have the sprite names" do - assert_equal @importer.sprite_names, @base.sprite_names + assert_equal Compass::SpriteImporter.sprite_names(URI), @base.sprite_names end it 'should have image filenames' do @@ -41,7 +35,7 @@ class SpriteMapTest < Test::Unit::TestCase end test 'uniqueness_hash' do - assert_equal 'ef52c5c63a', @base.uniqueness_hash + assert_equal '4c703bbc05', @base.uniqueness_hash end it 'should be outdated' do @@ -82,9 +76,56 @@ class SpriteMapTest < Test::Unit::TestCase file_to_remove = File.join(@images_tmp_path, 'selectors', 'ten-by-ten.png') FileUtils.rm file_to_remove assert !File.exists?(file_to_remove), "Failed to remove sprite file" - setup_map + @base = sprite_map_test(@options) @base.generate assert !File.exists?(file), "Sprite file did not get removed" end + test "should get correct relative_name" do + Compass.reset_configuration! + uri = 'foo/*.png' + other_folder = File.join(@images_tmp_path, '../other-temp') + FileUtils.mkdir_p other_folder + FileUtils.mkdir_p File.join(other_folder, 'foo') + %w(my bar).each do |file| + FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) + end + config = Compass::Configuration::Data.new('config') + config.images_path = @images_tmp_path + config.sprite_load_path = [@images_tmp_path, other_folder] + Compass.add_configuration(config, "sprite_config") + assert_equal 'foo/my.png', Compass::SassExtensions::Sprites::SpriteMap.relative_name(File.join(other_folder, 'foo/my.png')) + FileUtils.rm_rf other_folder + end + + test "should create map for nested" do + base = Compass::SassExtensions::Sprites::SpriteMap.from_uri OpenStruct.new(:value => 'nested/squares/*.png'), @base.instance_variable_get(:@evaluation_context), @options + assert_equal 'squares', base.name + assert_equal 'nested/squares', base.path + end + + test "should have correct position on ten-by-ten" do + percent = Sass::Script::Number.new(50, ['%']) + base = sprite_map_test(@options.merge('selectors_ten_by_ten_position' => percent)) + assert_equal percent, base.image_for('ten-by-ten').position + end + + test 'gets name for sprite in search path' do + Compass.reset_configuration! + uri = 'foo/*.png' + other_folder = File.join(@images_tmp_path, '../other-temp') + FileUtils.mkdir_p other_folder + FileUtils.mkdir_p File.join(other_folder, 'foo') + %w(my bar).each do |file| + FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) + end + config = Compass::Configuration::Data.new('config') + config.images_path = @images_tmp_path + config.sprite_load_path = [@images_tmp_path, other_folder] + Compass.add_configuration(config, "sprite_config") + image = Compass::SassExtensions::Sprites::Image.new(@base, "foo/my.png", {}) + assert_equal File.join(other_folder, 'foo/my.png'), image.file + assert_equal 0, image.size + end + end \ No newline at end of file