diff --git a/Gemfile b/Gemfile
index 7f1994df..47aa9a44 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,8 +7,11 @@ gem "rails", "~>3.0.0.rc"
gem "compass-validator", "3.0.0"
gem "css_parser", "~> 1.0.1"
gem "sass"
+gem "haml", "~> 3.1.alpha"
gem "rcov"
gem "rubyzip"
gem "livereload"
gem "chunky_png", "~> 0.10.1"
-gem "ruby-prof"
+
+gem "ruby-prof" unless RUBY_PLATFORM == "java"
+
diff --git a/Rakefile b/Rakefile
index 772acd60..dcb44d0c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -61,7 +61,7 @@ task :examples do
puts "=" * "Compiling #{example}".length
Dir.chdir example do
load "bootstrap.rb" if File.exists?("bootstrap.rb")
- Compass::Exec::SwitchUI.new(["--force"]).run!
+ Compass::Exec::SubCommandUI.new(%w(compile --force)).run!
end
# compile any haml templates to html
FileList["#{example}/**/*.haml"].each do |haml_file|
diff --git a/doc-src/Gemfile b/doc-src/Gemfile
index d82f7a7e..aea55426 100644
--- a/doc-src/Gemfile
+++ b/doc-src/Gemfile
@@ -8,7 +8,7 @@ gem 'mime-types'
gem 'serve', "1.0.0"
gem 'nokogiri'
gem 'coderay'
-gem 'sass', ">= 3.1.0.alpha.50", :git => "git://github.com/chriseppstein/sass.git"
+gem 'sass', ">= 3.1.0.alpha.50"
gem 'fssm', '0.1.2'
gem 'haml', ">= 3.1.0.alpha.36"
gem 'rake'
diff --git a/doc-src/Gemfile.lock b/doc-src/Gemfile.lock
index 20ea7971..ac01405d 100644
--- a/doc-src/Gemfile.lock
+++ b/doc-src/Gemfile.lock
@@ -5,16 +5,10 @@ GIT
nanoc3 (3.2.0a3)
cri (>= 1.0.0)
-GIT
- remote: git://github.com/chriseppstein/sass.git
- revision: c9de58c678644ec9b0ae5103ab595815e5aa4ecf
- specs:
- sass (3.1.0.alpha.50)
-
PATH
remote: ..
specs:
- compass (0.11.alpha.4.02d6292)
+ compass (0.11.alpha.4.d67a43a)
chunky_png (~> 0.10.3)
sass (>= 3.1.0.alpha.50)
@@ -40,6 +34,7 @@ GEM
rake (0.8.7)
rdiscount (1.6.5)
ruby-prof (0.9.2)
+ sass (3.1.0.alpha.214)
serve (1.0.0)
activesupport (~> 3.0.1)
i18n (~> 0.4.1)
@@ -67,6 +62,6 @@ DEPENDENCIES
rake
rdiscount
ruby-prof
- sass (>= 3.1.0.alpha.50)!
+ sass (>= 3.1.0.alpha.50)
serve (= 1.0.0)
thor
diff --git a/doc-src/assets/javascripts/site.js b/doc-src/assets/javascripts/site.js
index b273aee4..e977a384 100644
--- a/doc-src/assets/javascripts/site.js
+++ b/doc-src/assets/javascripts/site.js
@@ -109,7 +109,7 @@ $('document').ready(function(){
changeTheme();
event.preventDefault();
- // View source for mixins
+ // View source for mixins & functions
} else if (target.attr("rel") == "view source") {
$(target.attr("href")).toggle();
event.preventDefault();
diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown
index 349b9f14..19f04ecb 100644
--- a/doc-src/content/CHANGELOG.markdown
+++ b/doc-src/content/CHANGELOG.markdown
@@ -26,6 +26,16 @@ The Documentation for the [latest preview release](http://beta.compass-style.org
The CLI options will still override the values set within the config file, but they might
inform other values. For instance `compass compile -e production` will have the environment
parameter preset to `:production` so that you can set other values in the project accordingly.
+* New infrastructure for supporting experimental css3 functions that are prefixed but have the same
+ syntax across all browsers. It is now possible to configure which browsers support which
+ experimental functions outside of the compass release cycle. For details, see the
+ [cross browser helpers](/reference/compass/helpers/cross-browser/).
+* [Blueprint] Added a new sass function called span($n) to the grid module which replaces
+ the now **deprecated span mixin**. If you are using this mixin, please replace it with:
+ `width: span($n)`.
+* [Blueprint] Blueprint no longer adds `!important` to the widths of `input`, `textarea`,
+ and `select` form fields, so compass no longer defaults to using `!important` in those cases.
+ If you were relying on this behavior, you may need to adjust your stylesheets accordingly.
0.11.alpha.4 (12/08/2010)
diff --git a/doc-src/content/examples/compass/css3/gradient.haml b/doc-src/content/examples/compass/css3/gradient.haml
index c15144bf..3417cc46 100644
--- a/doc-src/content/examples/compass/css3/gradient.haml
+++ b/doc-src/content/examples/compass/css3/gradient.haml
@@ -1,8 +1,8 @@
---
-title: Gradient
+title: Background Gradients
description: css3 mixin for css gradients
framework: compass
-stylesheet: compass/css3/_gradient.scss
+stylesheet: compass/css3/_images.scss
example: true
---
= render "partials/example"
\ No newline at end of file
diff --git a/doc-src/content/examples/compass/css3/gradient/stylesheet.sass b/doc-src/content/examples/compass/css3/gradient/stylesheet.sass
index 77aea812..d5edcdbb 100644
--- a/doc-src/content/examples/compass/css3/gradient/stylesheet.sass
+++ b/doc-src/content/examples/compass/css3/gradient/stylesheet.sass
@@ -14,30 +14,30 @@
// This will yield a radial gradient with an apparent specular highlight
#radial-gradient
- +radial-gradient(color-stops(#00FFFF 10px, #1E90FF 30px), 45 45)
+ +background-image(radial-gradient(45 45, #0ff 10px, #1e90ff 30px))
// This yields a linear gradient spanning from the upper left corner to the lower right corner
#linear-gradient
- +linear-gradient(color-stops(#fff, #ddd), left top)
+ +background-image(linear-gradient(left top, #fff, #ddd))
// This yields a gradient starting at the top with #fff, ending in #aaa
#v-gradient
- +linear-gradient(color-stops(#fff, #aaa))
+ +background-image(linear-gradient(#fff, #aaa))
// Same as above but with a #ccc at the halfway point
#v-gradient-2
- +linear-gradient(color-stops(#fff, #ccc, #aaa))
+ +background-image(linear-gradient(#fff, #ccc, #aaa))
// Same as the first example but with #ccc at the 30% from the top, and #bbb at 70% from the top
#v-gradient-3
- +linear-gradient(color-stops(#fff, #ccc 30%, #bbb 70%, #aaa))
+ +background-image(linear-gradient(#fff, #ccc 30%, #bbb 70%, #aaa))
// This yields a horizontal linear gradient spanning from left to right.
#h-gradient
- +linear-gradient(color-stops(#fff, #ddd), left)
+ +background-image(linear-gradient(left, #fff, #ddd))
#svg-gradient
$experimental-support-for-svg: true
- +linear-gradient(color-stops(#2AC363, #CD8C14, #9C4CC2), left)
+ +background-image(linear-gradient(left, #2ac363, #cd8c14, #9c4cc2))
width: 80px
height: 80px
diff --git a/doc-src/content/help/tutorials/contributing.markdown b/doc-src/content/help/tutorials/contributing.markdown
index 8f162604..0a4f1696 100644
--- a/doc-src/content/help/tutorials/contributing.markdown
+++ b/doc-src/content/help/tutorials/contributing.markdown
@@ -34,10 +34,10 @@ Here's some general information about the project you might find useful along th
* [Submitting Patches](#patches)
* [Project Structure](#project-structure)
-* Project Architecture
+
* [General Philosophy](#project-philosophy)
* [Stylesheet Conventions](#stylesheet-conventions)
* [Miscellaneous Stuff](#faq)
diff --git a/doc-src/content/help/tutorials/spriting.markdown b/doc-src/content/help/tutorials/spriting.markdown
index 90ec7e42..40f0e6a4 100644
--- a/doc-src/content/help/tutorials/spriting.markdown
+++ b/doc-src/content/help/tutorials/spriting.markdown
@@ -146,9 +146,11 @@ this in mind.
## Large numbers of sprites
The magic stylesheet can get very large when there are large numbers of sprites. 50 sprites
-will cause there to be over 150 variables created and then passed into the `sprite` function.
+will cause there to be over 150 variables created and then passed into the
+`sprite-map` [function](/reference/compass/helpers/sprites/#sprite-map).
You may find that customizing the sprite function call to only pass those values that you
-are overriding will provide a performance boost.
+are overriding will provide a small performance boost.
+See a [concrete example](https://gist.github.com/747970).
## Oily PNG
diff --git a/doc-src/content/index.haml b/doc-src/content/index.haml
index 74b49789..acd834f3 100644
--- a/doc-src/content/index.haml
+++ b/doc-src/content/index.haml
@@ -10,13 +10,18 @@ layout: homepage
.compass
%h4 Why designers love Compass.
%ol
- %li Get cleaner markup with no presentational classes.
+ %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 Compass mixins make CSS3 easy.
+ %li Download and create extensions with ease.
.sass
%h4 Compass uses Sass.
- %p Sass is an extension of CSS3 which adds nested rules, variables, mixins, selector inheritance, and more. Sass generates well formatted CSS.
+ %p
+ Sass is an extension of CSS3 which
+ adds nested rules, variables, mixins, selector inheritance, and more.
+ Sass generates well formatted CSS and makes your stylesheets
+ easier to organize and maintain.
%h3 Brilliant people use Compass, including these wildly talented folks:
%ul#featured_sites
%li
diff --git a/doc-src/content/index/functions.haml b/doc-src/content/index/functions.haml
new file mode 100644
index 00000000..3db82d99
--- /dev/null
+++ b/doc-src/content/index/functions.haml
@@ -0,0 +1,24 @@
+---
+title: Compass Documentation | All Functions
+crumb: Docs
+body_id: home
+---
+%article
+ %h1#logo Sass Based Functions
+
+ - all_functions.sorted_and_grouped_by_name{|f| f.last.name }.each do |(group, functions)|
+ %h3= group
+ %ul
+ - functions.each do |(i, f)|
+ %li
+ %a{:href=>"#{i.path}#function-#{f.name}"}= f.sass_signature(:html)
+
+ %h1#logo All Ruby Based Functions
+ %ul
+ - Sass::Script::Functions.public_instance_methods.sort_by{|m| m.to_s}.each do |m|
+ %li
+ - name = m.to_s.gsub("_","-")
+ - if i = item_for_function_name(name)
+ %a{:href=>"#{i.path}##{name}"}= name
+ - else
+ = name
\ No newline at end of file
diff --git a/doc-src/content/index/mixins.haml b/doc-src/content/index/mixins.haml
index 3980026e..1743fe8f 100644
--- a/doc-src/content/index/mixins.haml
+++ b/doc-src/content/index/mixins.haml
@@ -6,9 +6,9 @@ body_id: home
%article
%h1#logo Compass Mixins
- - all_mixins.sort_by{|i| i.first.identifier}.each do |item, mixins|
- %h3= link_to item[:title], item
+ - all_mixins.sorted_and_grouped_by_name{|m| m.last.name }.each do |(group, mixins)|
+ %h3= group
%ul
- - mixins.sort_by{|m| m.name}.each do |m|
- %li= mixin_signature(m)
-
+ - mixins.each do |(i, m)|
+ %li
+ %a{:href=>"#{i.path}#mixin-#{m.name}"}= m.sass_signature(:none, :html)
diff --git a/doc-src/content/index/variables.haml b/doc-src/content/index/variables.haml
index dcb78594..cffd3731 100644
--- a/doc-src/content/index/variables.haml
+++ b/doc-src/content/index/variables.haml
@@ -6,10 +6,10 @@ body_id: home
%article
%h1#logo Compass Variables
- - all_constants.sort_by{|i| i.first.identifier}.each do |item, constants|
- %h3= link_to item[:title], item
+ - all_constants.sorted_and_grouped_by_name{|v| v.last.name }.each do |(group, variables)|
+ %h3= group
%ul
- - constants.sort_by{|c| c.name}.each do |c|
- %li $#{c.name}
-
+ - variables.each do |(i, v)|
+ %li
+ %a{:href=>"#{i.path}#const-#{v.name}"}= "$" + v.name
\ No newline at end of file
diff --git a/doc-src/content/reference/compass/css3/gradient.haml b/doc-src/content/reference/compass/css3/gradient.haml
index dfd70112..745e320a 100644
--- a/doc-src/content/reference/compass/css3/gradient.haml
+++ b/doc-src/content/reference/compass/css3/gradient.haml
@@ -12,13 +12,8 @@ classnames:
- css3
---
- render 'reference' do
- %p
+ :markdown
+ **IMPORTANT:** This module has been deprecated. See the new
+ [images module](../images/) for the new, more flexible approach to gradients.
+
Provides mixins to create cross-browser CSS3 gradients.
- %p
- To enable SVG gradient support in Opera and IE9, set
- $experimental-support-for-svg: true
in your stylesheet.
- %p
- NOTE: At this time, Opera renders incorrectly an SVG background on a element
- with a border, repeating the gradient towards the end. You can set
- background-repeat: no-repeat
to avoid this, but the gradient
- will not fill the area completely.
diff --git a/doc-src/content/reference/compass/css3/images.haml b/doc-src/content/reference/compass/css3/images.haml
index 5436dadb..73fa5d3b 100644
--- a/doc-src/content/reference/compass/css3/images.haml
+++ b/doc-src/content/reference/compass/css3/images.haml
@@ -12,6 +12,33 @@ classnames:
- css3
---
- render 'reference' do
- %p
+ :markdown
Provides mixins that work across many modern browsers with the latest
CSS3 image rendering primitives.
+
+ These mixins provide intelligent cross-browser access to properties that accept
+ images or image-like values (e.g. gradients). The syntax is very straightforward,
+ it is exactly like the css syntax that you would use for the corresponding CSS3
+ properties: Values are comma and space delimited, just as they would be for a property.
+ Vendor prefixes are used only when necessary.
+
+ Example (more examples are available by following the links below):
+
+
.in-css3 {
+ background: image-url("foo.png"),
+ linear-gradient(top left, #333, #0c0),
+ radial-gradient(#c00, #fff 100px);
+ }
+ .with-compass {
+ @include background(image-url("foo.png"),
+ linear-gradient(top left, #333, #0c0),
+ radial-gradient(#c00, #fff 100px));
+ }
+
+ To enable SVG gradient support in Opera and IE9, set
+ $experimental-support-for-svg: true
in your stylesheet.
+
+ NOTE: At this time, Opera renders incorrectly an SVG background on a element
+ with a border, repeating the gradient towards the end. You can set
+ background-repeat: no-repeat
to avoid this, but the gradient
+ will not fill the area completely.
diff --git a/doc-src/content/reference/compass/helpers.haml b/doc-src/content/reference/compass/helpers.haml
index 4903d283..340e1f45 100644
--- a/doc-src/content/reference/compass/helpers.haml
+++ b/doc-src/content/reference/compass/helpers.haml
@@ -35,9 +35,18 @@ layout: core
* [inline-font-files()](/reference/compass/helpers/inline-data/#inline-font-files)
* [inline-image()](/reference/compass/helpers/inline-data/#inline-image)
* [nest()](/reference/compass/helpers/selectors/#nest)
+ * [prefix()](/reference/compass/helpers/cross-browser/#prefix)
+ * [prefixed()](/reference/compass/helpers/cross-browser/#prefixed)
* [pi()](/reference/compass/helpers/trig/#pi)
* [sin()](/reference/compass/helpers/trig/#sin)
* [stylesheet-url()](/reference/compass/helpers/urls/#stylesheet-url)
* [scale-lightness()](/reference/compass/helpers/colors/#scale-lightness)
* [tan()](/reference/compass/helpers/trig/#tan)
+ * [-css2()](/reference/compass/helpers/cross-browser/#-css2)
+ * [-moz()](/reference/compass/helpers/cross-browser/#-moz)
+ * [-ms()](/reference/compass/helpers/cross-browser/#-ms)
+ * [-o()](/reference/compass/helpers/cross-browser/#-o)
+ * [-pie()](/reference/compass/helpers/cross-browser/#-pie)
+ * [-svg()](/reference/compass/helpers/cross-browser/#-svg)
+ * [-webkit()](/reference/compass/helpers/cross-browser/#-webkit)
diff --git a/doc-src/content/reference/compass/helpers/color-stops.haml b/doc-src/content/reference/compass/helpers/color-stops.haml
index 01d3d5df..a95f629a 100644
--- a/doc-src/content/reference/compass/helpers/color-stops.haml
+++ b/doc-src/content/reference/compass/helpers/color-stops.haml
@@ -8,6 +8,8 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "color-stops"
---
%h1 Compass Color Stops Helper
diff --git a/doc-src/content/reference/compass/helpers/colors.haml b/doc-src/content/reference/compass/helpers/colors.haml
index 0e99a04d..3c49e423 100644
--- a/doc-src/content/reference/compass/helpers/colors.haml
+++ b/doc-src/content/reference/compass/helpers/colors.haml
@@ -8,6 +8,11 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "adjust-lightness"
+ - "adjust-saturation"
+ - "scale-lightness"
+ - "scale-saturation"
---
%h1 Compass Color Helpers
%p
diff --git a/doc-src/content/reference/compass/helpers/constants.haml b/doc-src/content/reference/compass/helpers/constants.haml
index b619dfe4..e1995322 100644
--- a/doc-src/content/reference/compass/helpers/constants.haml
+++ b/doc-src/content/reference/compass/helpers/constants.haml
@@ -8,6 +8,8 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "opposite-position"
---
%h1 Compass Constant Helpers
diff --git a/doc-src/content/reference/compass/helpers/cross-browser.haml b/doc-src/content/reference/compass/helpers/cross-browser.haml
new file mode 100644
index 00000000..f8097bd7
--- /dev/null
+++ b/doc-src/content/reference/compass/helpers/cross-browser.haml
@@ -0,0 +1,114 @@
+---
+title: Compass Cross Browser Helpers
+crumb: Cross Browser
+framework: compass
+meta_description: Helper functions for working with vendor prefixed functions.
+layout: core
+classnames:
+ - reference
+ - core
+ - helpers
+documented_functions:
+ - "prefixed"
+ - "prefix"
+ - "-webkit"
+ - "-moz"
+ - "-o"
+ - "-ms"
+ - "-svg"
+ - "-pie"
+ - "-css2"
+---
+%h1 Compass Cross Browser Helpers
+
+:markdown
+ These helpers are used by compass to create mixins that can insulate
+ the user from cross browser syntax and vendor prefix complexities.
+
+ If you need to support a new experimental (prefixed) function in your
+ project using these helpers, you can add support for it adding the following
+ to your compass configuration file:
+
+ Compass::BrowserSupport.add_support("function-name", "webkit", "moz")
+
+ For an example of how to use these functions see the
+ [compass images module](https://github.com/chriseppstein/compass/blob/master/frameworks/compass/stylesheets/compass/css3/_images.scss).
+
+#prefixed.helper
+ %h3
+ %a(href="#prefixed")
+ prefixed($prefix, $arg, ...)
+ .details
+ %p
+ Returns true if any of the arguments require the given prefix.
+
+#prefix.helper
+ %h3
+ %a(href="#prefix")
+ prefix($prefix, $arg, ...)
+ .details
+ %p
+ Transforms the argument(s) into a representation for the rendering engine
+ indicated by $prefix
. Usually this means just adding a prefix,
+ but in some cases, this may result in entirely different representations for
+ the given rendering engine (E.g. linear-gradient).
+ %p
+ Values that do not have a specific representation are passed through without
+ being transformed.
+
+#-webkit.helper
+ %h3
+ %a(href="#-webkit")
+ \-webkit($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-webkit, $arg, ...)
.
+#-moz.helper
+ %h3
+ %a(href="#-moz")
+ \-moz($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-moz, $arg, ...)
.
+#-o.helper
+ %h3
+ %a(href="#-o")
+ \-o($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-o, $arg, ...)
.
+#-ms.helper
+ %h3
+ %a(href="#-ms")
+ \-ms($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-ms, $arg, ...)
.
+#-svg.helper
+ %h3
+ %a(href="#-svg")
+ \-svg($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-svg, $arg, ...)
.
+ Instead of adding a prefix, it returns a representation of the
+ arguments using SVG to render them where it can.
+#-pie.helper
+ %h3
+ %a(href="#-pie")
+ \-pie($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-pie, $arg, ...)
.
+ It it used to get CSS3 PIE
+ support where necessary.
+#-css2.helper
+ %h3
+ %a(href="#-css2")
+ \-css2($arg, ...)
+ .details
+ %p
+ This is a shortcut for calling prefix(-css2, $arg, ...)
.
+ It is a kind of hack to sanitize the output of experimental code
+ into a form that can be parsed by a css2.1 compliant parser.
+ Usually this results in causing some functions to be omitted.
diff --git a/doc-src/content/reference/compass/helpers/display.haml b/doc-src/content/reference/compass/helpers/display.haml
index d4f5396f..c0c3924e 100644
--- a/doc-src/content/reference/compass/helpers/display.haml
+++ b/doc-src/content/reference/compass/helpers/display.haml
@@ -8,6 +8,8 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "elements-of-type"
---
%h1 Compass Display Helpers
diff --git a/doc-src/content/reference/compass/helpers/font-files.haml b/doc-src/content/reference/compass/helpers/font-files.haml
index 170c1bf5..d055c900 100644
--- a/doc-src/content/reference/compass/helpers/font-files.haml
+++ b/doc-src/content/reference/compass/helpers/font-files.haml
@@ -8,6 +8,8 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "font-files"
---
%h1 Compass Font Files Helper
diff --git a/doc-src/content/reference/compass/helpers/image-dimensions.haml b/doc-src/content/reference/compass/helpers/image-dimensions.haml
index 13533d9f..c1f99cca 100644
--- a/doc-src/content/reference/compass/helpers/image-dimensions.haml
+++ b/doc-src/content/reference/compass/helpers/image-dimensions.haml
@@ -8,6 +8,9 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "image-width"
+ - "image-height"
---
%h1 Compass Image Dimension Helpers
diff --git a/doc-src/content/reference/compass/helpers/inline-data.haml b/doc-src/content/reference/compass/helpers/inline-data.haml
index eac0bf10..9c212392 100644
--- a/doc-src/content/reference/compass/helpers/inline-data.haml
+++ b/doc-src/content/reference/compass/helpers/inline-data.haml
@@ -8,6 +8,9 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "inline-image"
+ - "inline-font-files"
---
%h1 Compass Inline Data Helpers
diff --git a/doc-src/content/reference/compass/helpers/selectors.haml b/doc-src/content/reference/compass/helpers/selectors.haml
index 472c79d4..ed80584e 100644
--- a/doc-src/content/reference/compass/helpers/selectors.haml
+++ b/doc-src/content/reference/compass/helpers/selectors.haml
@@ -8,6 +8,12 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "nest"
+ - "append-selector"
+ - "enumerate"
+ - "headings"
+ - "headers"
---
%h1 Compass Selector Helpers
@@ -67,6 +73,7 @@ classnames:
%li
%a(href="/examples/compass/helpers/using-extend-in-place-of-enumerate/") Example of using @extend
in place of enumerate
+%a(name="headers")
#headings.helper
%h3
%a(href="#append-selector")
diff --git a/doc-src/content/reference/compass/helpers/sprites.haml b/doc-src/content/reference/compass/helpers/sprites.haml
index 91f70f2e..3a2eb5d3 100644
--- a/doc-src/content/reference/compass/helpers/sprites.haml
+++ b/doc-src/content/reference/compass/helpers/sprites.haml
@@ -8,6 +8,13 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "sprite-map"
+ - "sprite"
+ - "sprite-map-name"
+ - "sprite-file"
+ - "sprite-url"
+ - "sprite-position"
---
%h1 Compass Sprite Helpers
diff --git a/doc-src/content/reference/compass/helpers/trig.haml b/doc-src/content/reference/compass/helpers/trig.haml
index cf1e5320..2147d2b2 100644
--- a/doc-src/content/reference/compass/helpers/trig.haml
+++ b/doc-src/content/reference/compass/helpers/trig.haml
@@ -8,6 +8,11 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "pi"
+ - "sin"
+ - "cos"
+ - "tan"
---
%h1 Compass Trig Helpers
diff --git a/doc-src/content/reference/compass/helpers/urls.haml b/doc-src/content/reference/compass/helpers/urls.haml
index 038efe66..da1d7853 100644
--- a/doc-src/content/reference/compass/helpers/urls.haml
+++ b/doc-src/content/reference/compass/helpers/urls.haml
@@ -8,6 +8,10 @@ classnames:
- reference
- core
- helpers
+documented_functions:
+ - "stylesheet-url"
+ - "font-url"
+ - "image-url"
---
%h1 Compass URL Helpers
diff --git a/doc-src/content/search.haml b/doc-src/content/search.haml
index 49580019..fa0c31ff 100644
--- a/doc-src/content/search.haml
+++ b/doc-src/content/search.haml
@@ -30,5 +30,15 @@ body_id: search
}
%input#q{:type => "text", :placeholder=>"Search"}
+%h2 Index of all:
+%ul#indexes
+ %li
+ %a(href="/index/variables/") Variables
+ %li
+ %a(href="/index/mixins/") Mixins
+ %li
+ %a(href="/index/functions/") Functions
+
+%h2 Results
%ol#results
%li.none Please enter a search term.
\ No newline at end of file
diff --git a/doc-src/content/stylesheets/partials/_code.scss b/doc-src/content/stylesheets/partials/_code.scss
index 9349495f..710b75f3 100644
--- a/doc-src/content/stylesheets/partials/_code.scss
+++ b/doc-src/content/stylesheets/partials/_code.scss
@@ -1,18 +1,18 @@
//html.sass .mixin-source .scss, html.scss .mixin-source .sass { @extend .hide;}
-.mixin-source, .example-source {
+.mixin-source, .example-source, .function-source {
position: relative; @extend .fixed-font;
.syntaxhighlighter, pre {
&.scss, &.sass, &.css, &.haml, &.html { display: none; } } }
-html.sass { .mixin-source .syntaxhighlighter.sass, .example-source .syntaxhighlighter.sass { display: block; } }
-html.scss { .mixin-source .syntaxhighlighter.scss, .example-source .syntaxhighlighter.scss { display: block; } }
+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 { display: none; }
+.mixin-source, .function-source { display: none; }
html.light .syntaxhighlighter, html.dark .syntaxhighlighter {
margin: 0 0 2px;
@@ -59,7 +59,7 @@ h3 { @include round-corners;
a { text-decoration: none;}
code, .arg { font-weight: normal; }
}
-h3.mixin { @include round-top-corners; margin-bottom: 2px;}
+h3.mixin, h3.function { @include round-top-corners; margin-bottom: 2px;}
.arg {
display: inline-block;
padding: 0 2px;
diff --git a/doc-src/content/stylesheets/partials/_theme.scss b/doc-src/content/stylesheets/partials/_theme.scss
index d5c4d114..e60b6270 100644
--- a/doc-src/content/stylesheets/partials/_theme.scss
+++ b/doc-src/content/stylesheets/partials/_theme.scss
@@ -74,7 +74,7 @@
&.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 { @extend .mixin-panel-#{$theme};
+ .mixin-source, .example-source, .function-source { @extend .mixin-panel-#{$theme};
.container textarea { color: $code; }
}
h2 a.help { color: $heading;}
diff --git a/doc-src/content/stylesheets/partials/_typography.scss b/doc-src/content/stylesheets/partials/_typography.scss
index ab16fe3b..fe85f130 100644
--- a/doc-src/content/stylesheets/partials/_typography.scss
+++ b/doc-src/content/stylesheets/partials/_typography.scss
@@ -42,3 +42,5 @@ em { font-style: italic; }
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/layouts/partials/main-navigation.haml b/doc-src/layouts/partials/main-navigation.haml
index 93fb6ab6..15d33110 100644
--- a/doc-src/layouts/partials/main-navigation.haml
+++ b/doc-src/layouts/partials/main-navigation.haml
@@ -7,7 +7,7 @@
%li.vcard
%a.fn.org.url.uid{:href => "/", :rel => "home"} Home
%li
- %a{:href => "/reference/compass/", :rel => "documentation"} Docs
+ %a{:href => "/reference/compass/", :rel => "documentation"} Reference
%li
%a{:href => "/help", :rel=> "help"} Help
%li
diff --git a/doc-src/layouts/partials/reference/functions.haml b/doc-src/layouts/partials/reference/functions.haml
new file mode 100644
index 00000000..51b945e3
--- /dev/null
+++ b/doc-src/layouts/partials/reference/functions.haml
@@ -0,0 +1,19 @@
+- if (functions = functions(@item)).any?
+ %h2 Functions
+
+ - functions.each do |function|
+ %a{:href=>"#function-#{function.name}-source", :rel => "view source"} view source
+ %h3.function{:id=>"function-#{function.name}"}
+ %a.permalink{:href => "#function-#{function.name}"}= function.sass_signature(:html)
+ .function-source{:id=>"function-#{function.name}-source"}
+ %pre.source-code.sass= function.to_sass
+ %pre.source-code.scss= function.to_scss
+
+ .source-documentation
+ = format_doc(function.comment)
+ - if (examples = examples(@item, function)).any?
+ %dl.examples
+ - examples.each do |example|
+ %dt= link_to example.item[:title], example
+ - if example.item[:description]
+ %dd= example.item[:description]
diff --git a/doc-src/layouts/partials/reference/mixins.haml b/doc-src/layouts/partials/reference/mixins.haml
index 8a4a60cb..e3b35441 100644
--- a/doc-src/layouts/partials/reference/mixins.haml
+++ b/doc-src/layouts/partials/reference/mixins.haml
@@ -4,7 +4,7 @@
- mixin_defs.each do |mixin|
%a{:href=>"#mixin-#{mixin.name}-source", :rel => "view source"} view source
%h3.mixin{:id=>"mixin-#{mixin.name}"}
- %a.permalink{:href => "#mixin-#{mixin.name}"}= mixin_signature(mixin)
+ %a.permalink{:href => "#mixin-#{mixin.name}"}= mixin.sass_signature(:none, :html)
.mixin-source{:id=>"mixin-#{mixin.name}-source"}
%pre.source-code.sass= mixin.to_sass
%pre.source-code.scss= mixin.to_scss
diff --git a/doc-src/layouts/reference.haml b/doc-src/layouts/reference.haml
index ef5cafe4..cad6909c 100644
--- a/doc-src/layouts/reference.haml
+++ b/doc-src/layouts/reference.haml
@@ -20,4 +20,6 @@
= render "partials/reference/constants"
+= render "partials/reference/functions"
+
= render "partials/reference/mixins"
diff --git a/doc-src/lib/default.rb b/doc-src/lib/default.rb
index 39b25dec..46b98745 100644
--- a/doc-src/lib/default.rb
+++ b/doc-src/lib/default.rb
@@ -28,6 +28,12 @@ def body_attributes(item)
}
end
+module Enumerable
+ def sorted_and_grouped_by_name
+ sort_by{|i| yield(i)}.group_by{|i| yield(i).sub(/^[^\w]/,"")[0..0].upcase}
+ end
+end
+
class Recycler
attr_accessor :values
attr_accessor :index
diff --git a/doc-src/lib/stylesheets.rb b/doc-src/lib/stylesheets.rb
index 113baa20..6fa56b6b 100644
--- a/doc-src/lib/stylesheets.rb
+++ b/doc-src/lib/stylesheets.rb
@@ -118,6 +118,26 @@ def mixins(item)
mixins.reject{|m| m.comment =~ /@private/}
end
+def functions(item)
+ sass_tree = tree(item)
+ functions = []
+ comment = nil
+ sass_tree.children.each do |child|
+ if child.is_a?(Sass::Tree::FunctionNode)
+ child.comment = comment && Sass::Tree::CommentNode.clean(comment)
+ comment = nil
+ functions << child
+ elsif child.is_a?(Sass::Tree::CommentNode)
+ comment ||= ""
+ comment << "\n" unless comment.empty?
+ comment << child.docstring
+ else
+ comment = nil
+ end
+ end
+ functions.reject{|m| m.comment =~ /@private/}
+end
+
def constants(item)
sass_tree = tree(item)
constants = []
@@ -140,33 +160,27 @@ def constants(item)
end
def all_constants
- variables = []
- @items.each do |item|
- next unless item.identifier =~ %r{/reference}
- next unless item[:stylesheet]
- vars = constants(item)
- if vars.any?
- variables << [item, vars]
- end
+ @items.inject([]) do |variables, item|
+ next variables unless item.identifier =~ %r{/reference}
+ next variables unless item[:stylesheet]
+ variables += constants(item).map{|v| [item, v] }
end
- variables
end
def all_mixins
- all_mixins = []
- @items.each do |item|
- next unless item.identifier =~ %r{/reference}
- next unless item[:stylesheet]
- ms = mixins(item)
- if ms.any?
- all_mixins << [item, ms]
- end
+ @items.inject([]) do |all_mixins, item|
+ next all_mixins unless item.identifier =~ %r{/reference}
+ next all_mixins unless item[:stylesheet]
+ all_mixins += mixins(item).map{|m| [item, m] }
end
- all_mixins
end
-def mixin_signature(mixin, format = :html)
- mixin.sass_signature(:none, format)
+def all_functions
+ @items.inject([]) do |all_functions, item|
+ next all_functions unless item.identifier =~ %r{/reference}
+ next all_functions unless item[:stylesheet]
+ all_functions += functions(item).map{|f| [item, f] }
+ end
end
def example_items
@@ -177,6 +191,12 @@ def example_items
end
end
+def item_for_function_name(function_name)
+ @items.detect do |item|
+ (item.identifier =~ %r{helpers}) && item[:documented_functions] && item[:documented_functions].include?(function_name)
+ end
+end
+
def examples_for_item(item)
@site.cached("examples/#{item.identifier}") do
example_items.select do |i|
diff --git a/doc-src/lib/stylesheets/sass_extensions.rb b/doc-src/lib/stylesheets/sass_extensions.rb
index dcf77717..a22ca076 100644
--- a/doc-src/lib/stylesheets/sass_extensions.rb
+++ b/doc-src/lib/stylesheets/sass_extensions.rb
@@ -19,18 +19,9 @@ module Sass
class VariableNode < Node
attr_accessor :comment unless method_defined? :comment
end
- class MixinDefNode < Node
- attr_accessor :name unless method_defined? :name
- attr_accessor :args unless method_defined? :args
- attr_accessor :comment unless method_defined? :comment
- def sass_signature(mode = :definition, format = :text)
- prefix = case mode
- when :definition
- "="
- when :include
- "+"
- end
- "#{prefix}#{name}#{arglist_to_sass(format)}"
+ module HasSignature
+ def sass_signature(format = :text)
+ "#{name}#{arglist_to_sass(format)}"
end
private
@@ -57,6 +48,30 @@ module Sass
sass_str
end
end
+ class MixinDefNode < Node
+ attr_accessor :name unless method_defined? :name
+ attr_accessor :args unless method_defined? :args
+ attr_accessor :comment unless method_defined? :comment
+ unless included_modules.include?(HasSignature)
+ include HasSignature
+ alias sass_signature_without_prefix sass_signature
+ def sass_signature(mode = :definition, format = :text)
+ prefix = case mode
+ when :definition
+ "="
+ when :include
+ "+"
+ end
+ "#{prefix}#{sass_signature_without_prefix(format)}"
+ end
+ end
+ end
+ class FunctionNode < Node
+ attr_accessor :name unless method_defined? :name
+ attr_accessor :args unless method_defined? :args
+ attr_accessor :comment unless method_defined? :comment
+ include HasSignature unless included_modules.include?(HasSignature)
+ end
class ImportNode < RootNode
attr_accessor :imported_filename unless method_defined? :imported_filename
end
diff --git a/examples/blueprint_plugins/src/link_icons.scss b/examples/blueprint_plugins/src/link_icons.scss
index 53274cf3..c4e28a75 100644
--- a/examples/blueprint_plugins/src/link_icons.scss
+++ b/examples/blueprint_plugins/src/link_icons.scss
@@ -10,4 +10,4 @@ body {
// Not all links have a url structure that can be detected,
// So you can set them explicitly yourself like so:
a#this-is-a-pdf-link {
- @include link-icon(unquote("pdf.png")); } }
+ @include link-icon("pdf.png"); } }
diff --git a/examples/blueprint_semantic/src/liquid.scss b/examples/blueprint_semantic/src/liquid.scss
index 79ca5dc2..0668be8d 100644
--- a/examples/blueprint_semantic/src/liquid.scss
+++ b/examples/blueprint_semantic/src/liquid.scss
@@ -20,11 +20,11 @@ body.blueprint {
body#index {
#page-header {
- @include span(6); }
+ width: span(6); }
#files-header {
- @include span(8); }
+ width: span(8); }
#description-header {
- @include span(10); }
+ width: span(10); }
#info {
@include box;
ul {
diff --git a/examples/blueprint_semantic/src/screen.scss b/examples/blueprint_semantic/src/screen.scss
index 889f12c7..bc2a1c5d 100644
--- a/examples/blueprint_semantic/src/screen.scss
+++ b/examples/blueprint_semantic/src/screen.scss
@@ -9,7 +9,7 @@ body.blueprint {
.container {
@include container; }
.showgrid {
- background: inline_image(unquote("grid.png")); }
+ background: inline_image("grid.png"); }
hr {
@include colruler; }
hr.space {
@@ -20,11 +20,11 @@ body.blueprint {
body#index {
#page-header {
- @include span(6); }
+ width: span(6); }
#files-header {
- @include span(8); }
+ width: span(8); }
#description-header {
- @include span(10); }
+ width: span(10); }
#info {
@include box;
ul {
diff --git a/examples/compass/config.rb b/examples/compass/config.rb
index bbb651ed..9c3646d5 100644
--- a/examples/compass/config.rb
+++ b/examples/compass/config.rb
@@ -5,3 +5,4 @@ sass_dir = "src"
images_dir = "images"
output_style = :compact
relative_assets = true
+line_comments = false
diff --git a/examples/compass/images/.gitignore b/examples/compass/images/.gitignore
new file mode 100644
index 00000000..6bdf2a8d
--- /dev/null
+++ b/examples/compass/images/.gitignore
@@ -0,0 +1,2 @@
+flag-*.png
+emblem-*.png
diff --git a/examples/compass/images/emblem/favorite.png b/examples/compass/images/emblem/favorite.png
new file mode 100644
index 00000000..8482a047
Binary files /dev/null and b/examples/compass/images/emblem/favorite.png differ
diff --git a/examples/compass/images/emblem/important.png b/examples/compass/images/emblem/important.png
new file mode 100644
index 00000000..260bd900
Binary files /dev/null and b/examples/compass/images/emblem/important.png differ
diff --git a/examples/compass/images/emblem/photos.png b/examples/compass/images/emblem/photos.png
new file mode 100644
index 00000000..3e991907
Binary files /dev/null and b/examples/compass/images/emblem/photos.png differ
diff --git a/examples/compass/images/emblem/readonly.png b/examples/compass/images/emblem/readonly.png
new file mode 100644
index 00000000..1e6e08fb
Binary files /dev/null and b/examples/compass/images/emblem/readonly.png differ
diff --git a/examples/compass/images/emblem/symbolic-link.png b/examples/compass/images/emblem/symbolic-link.png
new file mode 100644
index 00000000..7ee44a05
Binary files /dev/null and b/examples/compass/images/emblem/symbolic-link.png differ
diff --git a/examples/compass/images/emblem/system.png b/examples/compass/images/emblem/system.png
new file mode 100644
index 00000000..aed44b10
Binary files /dev/null and b/examples/compass/images/emblem/system.png differ
diff --git a/examples/compass/images/emblem/unreadable.png b/examples/compass/images/emblem/unreadable.png
new file mode 100644
index 00000000..9e74190f
Binary files /dev/null and b/examples/compass/images/emblem/unreadable.png differ
diff --git a/examples/compass/images/flag/ad.png b/examples/compass/images/flag/ad.png
new file mode 100644
index 00000000..1904b78f
Binary files /dev/null and b/examples/compass/images/flag/ad.png differ
diff --git a/examples/compass/images/flag/ae.png b/examples/compass/images/flag/ae.png
new file mode 100644
index 00000000..c53e2f05
Binary files /dev/null and b/examples/compass/images/flag/ae.png differ
diff --git a/examples/compass/images/flag/af.png b/examples/compass/images/flag/af.png
new file mode 100644
index 00000000..3e628e75
Binary files /dev/null and b/examples/compass/images/flag/af.png differ
diff --git a/examples/compass/images/flag/ag.png b/examples/compass/images/flag/ag.png
new file mode 100644
index 00000000..29d0e184
Binary files /dev/null and b/examples/compass/images/flag/ag.png differ
diff --git a/examples/compass/images/flag/ai.png b/examples/compass/images/flag/ai.png
new file mode 100644
index 00000000..f36c86f9
Binary files /dev/null and b/examples/compass/images/flag/ai.png differ
diff --git a/examples/compass/images/flag/al.png b/examples/compass/images/flag/al.png
new file mode 100644
index 00000000..c21fe404
Binary files /dev/null and b/examples/compass/images/flag/al.png differ
diff --git a/examples/compass/images/flag/am.png b/examples/compass/images/flag/am.png
new file mode 100644
index 00000000..25af545b
Binary files /dev/null and b/examples/compass/images/flag/am.png differ
diff --git a/examples/compass/images/flag/an.png b/examples/compass/images/flag/an.png
new file mode 100644
index 00000000..0a985185
Binary files /dev/null and b/examples/compass/images/flag/an.png differ
diff --git a/examples/compass/images/flag/ao.png b/examples/compass/images/flag/ao.png
new file mode 100644
index 00000000..a44327fd
Binary files /dev/null and b/examples/compass/images/flag/ao.png differ
diff --git a/examples/compass/images/flag/ar.png b/examples/compass/images/flag/ar.png
new file mode 100644
index 00000000..d5bf27c4
Binary files /dev/null and b/examples/compass/images/flag/ar.png differ
diff --git a/examples/compass/images/flag/as.png b/examples/compass/images/flag/as.png
new file mode 100644
index 00000000..32222843
Binary files /dev/null and b/examples/compass/images/flag/as.png differ
diff --git a/examples/compass/images/flag/at.png b/examples/compass/images/flag/at.png
new file mode 100644
index 00000000..247acd2c
Binary files /dev/null and b/examples/compass/images/flag/at.png differ
diff --git a/examples/compass/images/flag/au.png b/examples/compass/images/flag/au.png
new file mode 100644
index 00000000..6268b886
Binary files /dev/null and b/examples/compass/images/flag/au.png differ
diff --git a/examples/compass/images/flag/aw.png b/examples/compass/images/flag/aw.png
new file mode 100644
index 00000000..a7fbdc7b
Binary files /dev/null and b/examples/compass/images/flag/aw.png differ
diff --git a/examples/compass/images/flag/ax.png b/examples/compass/images/flag/ax.png
new file mode 100644
index 00000000..a099b4f3
Binary files /dev/null and b/examples/compass/images/flag/ax.png differ
diff --git a/examples/compass/images/flag/az.png b/examples/compass/images/flag/az.png
new file mode 100644
index 00000000..60bea4eb
Binary files /dev/null and b/examples/compass/images/flag/az.png differ
diff --git a/examples/compass/images/flag/ba.png b/examples/compass/images/flag/ba.png
new file mode 100644
index 00000000..5b1ebbe9
Binary files /dev/null and b/examples/compass/images/flag/ba.png differ
diff --git a/examples/compass/images/flag/bb.png b/examples/compass/images/flag/bb.png
new file mode 100644
index 00000000..c2faae67
Binary files /dev/null and b/examples/compass/images/flag/bb.png differ
diff --git a/examples/compass/images/flag/bd.png b/examples/compass/images/flag/bd.png
new file mode 100644
index 00000000..34a6c33c
Binary files /dev/null and b/examples/compass/images/flag/bd.png differ
diff --git a/examples/compass/images/flag/be.png b/examples/compass/images/flag/be.png
new file mode 100644
index 00000000..6eb9b6a4
Binary files /dev/null and b/examples/compass/images/flag/be.png differ
diff --git a/examples/compass/images/flag/bf.png b/examples/compass/images/flag/bf.png
new file mode 100644
index 00000000..7a4b5893
Binary files /dev/null and b/examples/compass/images/flag/bf.png differ
diff --git a/examples/compass/images/flag/bg.png b/examples/compass/images/flag/bg.png
new file mode 100644
index 00000000..c30d8856
Binary files /dev/null and b/examples/compass/images/flag/bg.png differ
diff --git a/examples/compass/images/flag/bh.png b/examples/compass/images/flag/bh.png
new file mode 100644
index 00000000..d559ce08
Binary files /dev/null and b/examples/compass/images/flag/bh.png differ
diff --git a/examples/compass/images/flag/bi.png b/examples/compass/images/flag/bi.png
new file mode 100644
index 00000000..622ed1cd
Binary files /dev/null and b/examples/compass/images/flag/bi.png differ
diff --git a/examples/compass/images/flag/bj.png b/examples/compass/images/flag/bj.png
new file mode 100644
index 00000000..17398e41
Binary files /dev/null and b/examples/compass/images/flag/bj.png differ
diff --git a/examples/compass/images/flag/bm.png b/examples/compass/images/flag/bm.png
new file mode 100644
index 00000000..325f631b
Binary files /dev/null and b/examples/compass/images/flag/bm.png differ
diff --git a/examples/compass/images/flag/bn.png b/examples/compass/images/flag/bn.png
new file mode 100644
index 00000000..63a008a8
Binary files /dev/null and b/examples/compass/images/flag/bn.png differ
diff --git a/examples/compass/images/flag/bo.png b/examples/compass/images/flag/bo.png
new file mode 100644
index 00000000..e56d84b2
Binary files /dev/null and b/examples/compass/images/flag/bo.png differ
diff --git a/examples/compass/images/flag/br.png b/examples/compass/images/flag/br.png
new file mode 100644
index 00000000..2c8b73e5
Binary files /dev/null and b/examples/compass/images/flag/br.png differ
diff --git a/examples/compass/images/flag/bs.png b/examples/compass/images/flag/bs.png
new file mode 100644
index 00000000..ffc2fa81
Binary files /dev/null and b/examples/compass/images/flag/bs.png differ
diff --git a/examples/compass/images/flag/bt.png b/examples/compass/images/flag/bt.png
new file mode 100644
index 00000000..a8702183
Binary files /dev/null and b/examples/compass/images/flag/bt.png differ
diff --git a/examples/compass/images/flag/bv.png b/examples/compass/images/flag/bv.png
new file mode 100644
index 00000000..29aaa169
Binary files /dev/null and b/examples/compass/images/flag/bv.png differ
diff --git a/examples/compass/images/flag/bw.png b/examples/compass/images/flag/bw.png
new file mode 100644
index 00000000..b273c857
Binary files /dev/null and b/examples/compass/images/flag/bw.png differ
diff --git a/examples/compass/images/flag/by.png b/examples/compass/images/flag/by.png
new file mode 100644
index 00000000..19d06f17
Binary files /dev/null and b/examples/compass/images/flag/by.png differ
diff --git a/examples/compass/images/flag/bz.png b/examples/compass/images/flag/bz.png
new file mode 100644
index 00000000..8f6eead8
Binary files /dev/null and b/examples/compass/images/flag/bz.png differ
diff --git a/examples/compass/images/flag/ca.png b/examples/compass/images/flag/ca.png
new file mode 100644
index 00000000..fa22e45a
Binary files /dev/null and b/examples/compass/images/flag/ca.png differ
diff --git a/examples/compass/images/flag/catalonia.png b/examples/compass/images/flag/catalonia.png
new file mode 100644
index 00000000..85082e1a
Binary files /dev/null and b/examples/compass/images/flag/catalonia.png differ
diff --git a/examples/compass/images/flag/cc.png b/examples/compass/images/flag/cc.png
new file mode 100644
index 00000000..ecf92ff0
Binary files /dev/null and b/examples/compass/images/flag/cc.png differ
diff --git a/examples/compass/images/flag/cd.png b/examples/compass/images/flag/cd.png
new file mode 100644
index 00000000..369769c3
Binary files /dev/null and b/examples/compass/images/flag/cd.png differ
diff --git a/examples/compass/images/flag/cf.png b/examples/compass/images/flag/cf.png
new file mode 100644
index 00000000..380455ac
Binary files /dev/null and b/examples/compass/images/flag/cf.png differ
diff --git a/examples/compass/images/flag/cg.png b/examples/compass/images/flag/cg.png
new file mode 100644
index 00000000..684ce2dc
Binary files /dev/null and b/examples/compass/images/flag/cg.png differ
diff --git a/examples/compass/images/flag/ch.png b/examples/compass/images/flag/ch.png
new file mode 100644
index 00000000..2c16c9c5
Binary files /dev/null and b/examples/compass/images/flag/ch.png differ
diff --git a/examples/compass/images/flag/ci.png b/examples/compass/images/flag/ci.png
new file mode 100644
index 00000000..4b55ff8a
Binary files /dev/null and b/examples/compass/images/flag/ci.png differ
diff --git a/examples/compass/images/flag/ck.png b/examples/compass/images/flag/ck.png
new file mode 100644
index 00000000..5195a330
Binary files /dev/null and b/examples/compass/images/flag/ck.png differ
diff --git a/examples/compass/images/flag/cl.png b/examples/compass/images/flag/cl.png
new file mode 100644
index 00000000..88500b56
Binary files /dev/null and b/examples/compass/images/flag/cl.png differ
diff --git a/examples/compass/images/flag/cm.png b/examples/compass/images/flag/cm.png
new file mode 100644
index 00000000..a3208d65
Binary files /dev/null and b/examples/compass/images/flag/cm.png differ
diff --git a/examples/compass/images/flag/cn.png b/examples/compass/images/flag/cn.png
new file mode 100644
index 00000000..dec0f326
Binary files /dev/null and b/examples/compass/images/flag/cn.png differ
diff --git a/examples/compass/images/flag/co.png b/examples/compass/images/flag/co.png
new file mode 100644
index 00000000..8584ca4c
Binary files /dev/null and b/examples/compass/images/flag/co.png differ
diff --git a/examples/compass/images/flag/cr.png b/examples/compass/images/flag/cr.png
new file mode 100644
index 00000000..cd207131
Binary files /dev/null and b/examples/compass/images/flag/cr.png differ
diff --git a/examples/compass/images/flag/cs.png b/examples/compass/images/flag/cs.png
new file mode 100644
index 00000000..fbc2cce1
Binary files /dev/null and b/examples/compass/images/flag/cs.png differ
diff --git a/examples/compass/images/flag/cu.png b/examples/compass/images/flag/cu.png
new file mode 100644
index 00000000..40f26a67
Binary files /dev/null and b/examples/compass/images/flag/cu.png differ
diff --git a/examples/compass/images/flag/cv.png b/examples/compass/images/flag/cv.png
new file mode 100644
index 00000000..1e7dcd50
Binary files /dev/null and b/examples/compass/images/flag/cv.png differ
diff --git a/examples/compass/images/flag/cx.png b/examples/compass/images/flag/cx.png
new file mode 100644
index 00000000..40bf9f3f
Binary files /dev/null and b/examples/compass/images/flag/cx.png differ
diff --git a/examples/compass/images/flag/cy.png b/examples/compass/images/flag/cy.png
new file mode 100644
index 00000000..c975f51a
Binary files /dev/null and b/examples/compass/images/flag/cy.png differ
diff --git a/examples/compass/images/flag/cz.png b/examples/compass/images/flag/cz.png
new file mode 100644
index 00000000..780400b4
Binary files /dev/null and b/examples/compass/images/flag/cz.png differ
diff --git a/examples/compass/images/flag/de.png b/examples/compass/images/flag/de.png
new file mode 100644
index 00000000..25aa1a27
Binary files /dev/null and b/examples/compass/images/flag/de.png differ
diff --git a/examples/compass/images/flag/dj.png b/examples/compass/images/flag/dj.png
new file mode 100644
index 00000000..55668b12
Binary files /dev/null and b/examples/compass/images/flag/dj.png differ
diff --git a/examples/compass/images/flag/dk.png b/examples/compass/images/flag/dk.png
new file mode 100644
index 00000000..5f660619
Binary files /dev/null and b/examples/compass/images/flag/dk.png differ
diff --git a/examples/compass/images/flag/dm.png b/examples/compass/images/flag/dm.png
new file mode 100644
index 00000000..71ca1d8a
Binary files /dev/null and b/examples/compass/images/flag/dm.png differ
diff --git a/examples/compass/images/flag/do.png b/examples/compass/images/flag/do.png
new file mode 100644
index 00000000..7b815041
Binary files /dev/null and b/examples/compass/images/flag/do.png differ
diff --git a/examples/compass/images/flag/dz.png b/examples/compass/images/flag/dz.png
new file mode 100644
index 00000000..7864df5c
Binary files /dev/null and b/examples/compass/images/flag/dz.png differ
diff --git a/examples/compass/images/flag/ec.png b/examples/compass/images/flag/ec.png
new file mode 100644
index 00000000..700cc5c4
Binary files /dev/null and b/examples/compass/images/flag/ec.png differ
diff --git a/examples/compass/images/flag/ee.png b/examples/compass/images/flag/ee.png
new file mode 100644
index 00000000..ae4e1dbf
Binary files /dev/null and b/examples/compass/images/flag/ee.png differ
diff --git a/examples/compass/images/flag/eg.png b/examples/compass/images/flag/eg.png
new file mode 100644
index 00000000..4cbfe4cc
Binary files /dev/null and b/examples/compass/images/flag/eg.png differ
diff --git a/examples/compass/images/flag/eh.png b/examples/compass/images/flag/eh.png
new file mode 100644
index 00000000..cbd6b1e0
Binary files /dev/null and b/examples/compass/images/flag/eh.png differ
diff --git a/examples/compass/images/flag/england.png b/examples/compass/images/flag/england.png
new file mode 100644
index 00000000..65998bcf
Binary files /dev/null and b/examples/compass/images/flag/england.png differ
diff --git a/examples/compass/images/flag/er.png b/examples/compass/images/flag/er.png
new file mode 100644
index 00000000..9e48d4c5
Binary files /dev/null and b/examples/compass/images/flag/er.png differ
diff --git a/examples/compass/images/flag/es.png b/examples/compass/images/flag/es.png
new file mode 100644
index 00000000..98a61873
Binary files /dev/null and b/examples/compass/images/flag/es.png differ
diff --git a/examples/compass/images/flag/et.png b/examples/compass/images/flag/et.png
new file mode 100644
index 00000000..c010f6c8
Binary files /dev/null and b/examples/compass/images/flag/et.png differ
diff --git a/examples/compass/images/flag/europeanunion.png b/examples/compass/images/flag/europeanunion.png
new file mode 100644
index 00000000..ff4b8b4a
Binary files /dev/null and b/examples/compass/images/flag/europeanunion.png differ
diff --git a/examples/compass/images/flag/fam.png b/examples/compass/images/flag/fam.png
new file mode 100644
index 00000000..bae6182a
Binary files /dev/null and b/examples/compass/images/flag/fam.png differ
diff --git a/examples/compass/images/flag/fi.png b/examples/compass/images/flag/fi.png
new file mode 100644
index 00000000..93c61230
Binary files /dev/null and b/examples/compass/images/flag/fi.png differ
diff --git a/examples/compass/images/flag/fj.png b/examples/compass/images/flag/fj.png
new file mode 100644
index 00000000..4334dac1
Binary files /dev/null and b/examples/compass/images/flag/fj.png differ
diff --git a/examples/compass/images/flag/fk.png b/examples/compass/images/flag/fk.png
new file mode 100644
index 00000000..3a850fb1
Binary files /dev/null and b/examples/compass/images/flag/fk.png differ
diff --git a/examples/compass/images/flag/fm.png b/examples/compass/images/flag/fm.png
new file mode 100644
index 00000000..9a598a63
Binary files /dev/null and b/examples/compass/images/flag/fm.png differ
diff --git a/examples/compass/images/flag/fo.png b/examples/compass/images/flag/fo.png
new file mode 100644
index 00000000..6db42e53
Binary files /dev/null and b/examples/compass/images/flag/fo.png differ
diff --git a/examples/compass/images/flag/fr.png b/examples/compass/images/flag/fr.png
new file mode 100644
index 00000000..156c8932
Binary files /dev/null and b/examples/compass/images/flag/fr.png differ
diff --git a/examples/compass/images/flag/ga.png b/examples/compass/images/flag/ga.png
new file mode 100644
index 00000000..ee3ff2dc
Binary files /dev/null and b/examples/compass/images/flag/ga.png differ
diff --git a/examples/compass/images/flag/gb.png b/examples/compass/images/flag/gb.png
new file mode 100644
index 00000000..29c8cd11
Binary files /dev/null and b/examples/compass/images/flag/gb.png differ
diff --git a/examples/compass/images/flag/gd.png b/examples/compass/images/flag/gd.png
new file mode 100644
index 00000000..eb2d526f
Binary files /dev/null and b/examples/compass/images/flag/gd.png differ
diff --git a/examples/compass/images/flag/ge.png b/examples/compass/images/flag/ge.png
new file mode 100644
index 00000000..98bedf24
Binary files /dev/null and b/examples/compass/images/flag/ge.png differ
diff --git a/examples/compass/images/flag/gf.png b/examples/compass/images/flag/gf.png
new file mode 100644
index 00000000..156c8932
Binary files /dev/null and b/examples/compass/images/flag/gf.png differ
diff --git a/examples/compass/images/flag/gh.png b/examples/compass/images/flag/gh.png
new file mode 100644
index 00000000..073874c9
Binary files /dev/null and b/examples/compass/images/flag/gh.png differ
diff --git a/examples/compass/images/flag/gi.png b/examples/compass/images/flag/gi.png
new file mode 100644
index 00000000..b1b46d35
Binary files /dev/null and b/examples/compass/images/flag/gi.png differ
diff --git a/examples/compass/images/flag/gl.png b/examples/compass/images/flag/gl.png
new file mode 100644
index 00000000..19cc57c9
Binary files /dev/null and b/examples/compass/images/flag/gl.png differ
diff --git a/examples/compass/images/flag/gm.png b/examples/compass/images/flag/gm.png
new file mode 100644
index 00000000..88289320
Binary files /dev/null and b/examples/compass/images/flag/gm.png differ
diff --git a/examples/compass/images/flag/gn.png b/examples/compass/images/flag/gn.png
new file mode 100644
index 00000000..b379ada3
Binary files /dev/null and b/examples/compass/images/flag/gn.png differ
diff --git a/examples/compass/images/flag/gp.png b/examples/compass/images/flag/gp.png
new file mode 100644
index 00000000..902edaff
Binary files /dev/null and b/examples/compass/images/flag/gp.png differ
diff --git a/examples/compass/images/flag/gq.png b/examples/compass/images/flag/gq.png
new file mode 100644
index 00000000..8a6e6dc0
Binary files /dev/null and b/examples/compass/images/flag/gq.png differ
diff --git a/examples/compass/images/flag/gr.png b/examples/compass/images/flag/gr.png
new file mode 100644
index 00000000..ee698841
Binary files /dev/null and b/examples/compass/images/flag/gr.png differ
diff --git a/examples/compass/images/flag/gs.png b/examples/compass/images/flag/gs.png
new file mode 100644
index 00000000..1ef34a85
Binary files /dev/null and b/examples/compass/images/flag/gs.png differ
diff --git a/examples/compass/images/flag/gt.png b/examples/compass/images/flag/gt.png
new file mode 100644
index 00000000..e45bb09b
Binary files /dev/null and b/examples/compass/images/flag/gt.png differ
diff --git a/examples/compass/images/flag/gu.png b/examples/compass/images/flag/gu.png
new file mode 100644
index 00000000..0bc97ca0
Binary files /dev/null and b/examples/compass/images/flag/gu.png differ
diff --git a/examples/compass/images/flag/gw.png b/examples/compass/images/flag/gw.png
new file mode 100644
index 00000000..77100c30
Binary files /dev/null and b/examples/compass/images/flag/gw.png differ
diff --git a/examples/compass/images/flag/gy.png b/examples/compass/images/flag/gy.png
new file mode 100644
index 00000000..507e00fe
Binary files /dev/null and b/examples/compass/images/flag/gy.png differ
diff --git a/examples/compass/images/flag/hk.png b/examples/compass/images/flag/hk.png
new file mode 100644
index 00000000..351b5e8d
Binary files /dev/null and b/examples/compass/images/flag/hk.png differ
diff --git a/examples/compass/images/flag/hm.png b/examples/compass/images/flag/hm.png
new file mode 100644
index 00000000..98180040
Binary files /dev/null and b/examples/compass/images/flag/hm.png differ
diff --git a/examples/compass/images/flag/hn.png b/examples/compass/images/flag/hn.png
new file mode 100644
index 00000000..bf13f415
Binary files /dev/null and b/examples/compass/images/flag/hn.png differ
diff --git a/examples/compass/images/flag/hr.png b/examples/compass/images/flag/hr.png
new file mode 100644
index 00000000..411479ac
Binary files /dev/null and b/examples/compass/images/flag/hr.png differ
diff --git a/examples/compass/images/flag/ht.png b/examples/compass/images/flag/ht.png
new file mode 100644
index 00000000..9dbf4c33
Binary files /dev/null and b/examples/compass/images/flag/ht.png differ
diff --git a/examples/compass/images/flag/hu.png b/examples/compass/images/flag/hu.png
new file mode 100644
index 00000000..bad18553
Binary files /dev/null and b/examples/compass/images/flag/hu.png differ
diff --git a/examples/compass/images/flag/id-2.png b/examples/compass/images/flag/id-2.png
new file mode 100644
index 00000000..3328dd4b
Binary files /dev/null and b/examples/compass/images/flag/id-2.png differ
diff --git a/examples/compass/images/flag/ie.png b/examples/compass/images/flag/ie.png
new file mode 100644
index 00000000..8772d26e
Binary files /dev/null and b/examples/compass/images/flag/ie.png differ
diff --git a/examples/compass/images/flag/il.png b/examples/compass/images/flag/il.png
new file mode 100644
index 00000000..d48dd796
Binary files /dev/null and b/examples/compass/images/flag/il.png differ
diff --git a/examples/compass/images/flag/in.png b/examples/compass/images/flag/in.png
new file mode 100644
index 00000000..edcad05b
Binary files /dev/null and b/examples/compass/images/flag/in.png differ
diff --git a/examples/compass/images/flag/io.png b/examples/compass/images/flag/io.png
new file mode 100644
index 00000000..70f3d1cd
Binary files /dev/null and b/examples/compass/images/flag/io.png differ
diff --git a/examples/compass/images/flag/iq.png b/examples/compass/images/flag/iq.png
new file mode 100644
index 00000000..d2ec06ad
Binary files /dev/null and b/examples/compass/images/flag/iq.png differ
diff --git a/examples/compass/images/flag/ir.png b/examples/compass/images/flag/ir.png
new file mode 100644
index 00000000..b3b81d2d
Binary files /dev/null and b/examples/compass/images/flag/ir.png differ
diff --git a/examples/compass/images/flag/is.png b/examples/compass/images/flag/is.png
new file mode 100644
index 00000000..c0112f50
Binary files /dev/null and b/examples/compass/images/flag/is.png differ
diff --git a/examples/compass/images/flag/it.png b/examples/compass/images/flag/it.png
new file mode 100644
index 00000000..1958bde6
Binary files /dev/null and b/examples/compass/images/flag/it.png differ
diff --git a/examples/compass/images/flag/jm.png b/examples/compass/images/flag/jm.png
new file mode 100644
index 00000000..d520d791
Binary files /dev/null and b/examples/compass/images/flag/jm.png differ
diff --git a/examples/compass/images/flag/jo.png b/examples/compass/images/flag/jo.png
new file mode 100644
index 00000000..0a267049
Binary files /dev/null and b/examples/compass/images/flag/jo.png differ
diff --git a/examples/compass/images/flag/jp.png b/examples/compass/images/flag/jp.png
new file mode 100644
index 00000000..fcf1c582
Binary files /dev/null and b/examples/compass/images/flag/jp.png differ
diff --git a/examples/compass/images/flag/ke.png b/examples/compass/images/flag/ke.png
new file mode 100644
index 00000000..63254a93
Binary files /dev/null and b/examples/compass/images/flag/ke.png differ
diff --git a/examples/compass/images/flag/kg.png b/examples/compass/images/flag/kg.png
new file mode 100644
index 00000000..a8ca53d8
Binary files /dev/null and b/examples/compass/images/flag/kg.png differ
diff --git a/examples/compass/images/flag/kh.png b/examples/compass/images/flag/kh.png
new file mode 100644
index 00000000..ba7dda0e
Binary files /dev/null and b/examples/compass/images/flag/kh.png differ
diff --git a/examples/compass/images/flag/ki.png b/examples/compass/images/flag/ki.png
new file mode 100644
index 00000000..fbca54ec
Binary files /dev/null and b/examples/compass/images/flag/ki.png differ
diff --git a/examples/compass/images/flag/km.png b/examples/compass/images/flag/km.png
new file mode 100644
index 00000000..b3056cb3
Binary files /dev/null and b/examples/compass/images/flag/km.png differ
diff --git a/examples/compass/images/flag/kn.png b/examples/compass/images/flag/kn.png
new file mode 100644
index 00000000..9f1d929c
Binary files /dev/null and b/examples/compass/images/flag/kn.png differ
diff --git a/examples/compass/images/flag/kp.png b/examples/compass/images/flag/kp.png
new file mode 100644
index 00000000..0ee0167c
Binary files /dev/null and b/examples/compass/images/flag/kp.png differ
diff --git a/examples/compass/images/flag/kr.png b/examples/compass/images/flag/kr.png
new file mode 100644
index 00000000..dff624cd
Binary files /dev/null and b/examples/compass/images/flag/kr.png differ
diff --git a/examples/compass/images/flag/kw.png b/examples/compass/images/flag/kw.png
new file mode 100644
index 00000000..72bb4f51
Binary files /dev/null and b/examples/compass/images/flag/kw.png differ
diff --git a/examples/compass/images/flag/ky.png b/examples/compass/images/flag/ky.png
new file mode 100644
index 00000000..fb3c4688
Binary files /dev/null and b/examples/compass/images/flag/ky.png differ
diff --git a/examples/compass/images/flag/kz.png b/examples/compass/images/flag/kz.png
new file mode 100644
index 00000000..1ed4b915
Binary files /dev/null and b/examples/compass/images/flag/kz.png differ
diff --git a/examples/compass/images/flag/la.png b/examples/compass/images/flag/la.png
new file mode 100644
index 00000000..2c11f0bd
Binary files /dev/null and b/examples/compass/images/flag/la.png differ
diff --git a/examples/compass/images/flag/lb.png b/examples/compass/images/flag/lb.png
new file mode 100644
index 00000000..3f78e349
Binary files /dev/null and b/examples/compass/images/flag/lb.png differ
diff --git a/examples/compass/images/flag/lc.png b/examples/compass/images/flag/lc.png
new file mode 100644
index 00000000..2dbff64f
Binary files /dev/null and b/examples/compass/images/flag/lc.png differ
diff --git a/examples/compass/images/flag/li.png b/examples/compass/images/flag/li.png
new file mode 100644
index 00000000..990bd3d8
Binary files /dev/null and b/examples/compass/images/flag/li.png differ
diff --git a/examples/compass/images/flag/lk.png b/examples/compass/images/flag/lk.png
new file mode 100644
index 00000000..bb955c3f
Binary files /dev/null and b/examples/compass/images/flag/lk.png differ
diff --git a/examples/compass/images/flag/lr.png b/examples/compass/images/flag/lr.png
new file mode 100644
index 00000000..2e07be31
Binary files /dev/null and b/examples/compass/images/flag/lr.png differ
diff --git a/examples/compass/images/flag/ls.png b/examples/compass/images/flag/ls.png
new file mode 100644
index 00000000..585d4052
Binary files /dev/null and b/examples/compass/images/flag/ls.png differ
diff --git a/examples/compass/images/flag/lt.png b/examples/compass/images/flag/lt.png
new file mode 100644
index 00000000..2089c091
Binary files /dev/null and b/examples/compass/images/flag/lt.png differ
diff --git a/examples/compass/images/flag/lu.png b/examples/compass/images/flag/lu.png
new file mode 100644
index 00000000..c3a14f48
Binary files /dev/null and b/examples/compass/images/flag/lu.png differ
diff --git a/examples/compass/images/flag/lv.png b/examples/compass/images/flag/lv.png
new file mode 100644
index 00000000..bd844b2b
Binary files /dev/null and b/examples/compass/images/flag/lv.png differ
diff --git a/examples/compass/images/flag/ly.png b/examples/compass/images/flag/ly.png
new file mode 100644
index 00000000..654896aa
Binary files /dev/null and b/examples/compass/images/flag/ly.png differ
diff --git a/examples/compass/images/flag/ma.png b/examples/compass/images/flag/ma.png
new file mode 100644
index 00000000..12616153
Binary files /dev/null and b/examples/compass/images/flag/ma.png differ
diff --git a/examples/compass/images/flag/mc.png b/examples/compass/images/flag/mc.png
new file mode 100644
index 00000000..f941984e
Binary files /dev/null and b/examples/compass/images/flag/mc.png differ
diff --git a/examples/compass/images/flag/md.png b/examples/compass/images/flag/md.png
new file mode 100644
index 00000000..0bf4eb09
Binary files /dev/null and b/examples/compass/images/flag/md.png differ
diff --git a/examples/compass/images/flag/me.png b/examples/compass/images/flag/me.png
new file mode 100644
index 00000000..bb8e0708
Binary files /dev/null and b/examples/compass/images/flag/me.png differ
diff --git a/examples/compass/images/flag/mg.png b/examples/compass/images/flag/mg.png
new file mode 100644
index 00000000..407f9dc8
Binary files /dev/null and b/examples/compass/images/flag/mg.png differ
diff --git a/examples/compass/images/flag/mh.png b/examples/compass/images/flag/mh.png
new file mode 100644
index 00000000..6f4574c2
Binary files /dev/null and b/examples/compass/images/flag/mh.png differ
diff --git a/examples/compass/images/flag/mk.png b/examples/compass/images/flag/mk.png
new file mode 100644
index 00000000..808028fc
Binary files /dev/null and b/examples/compass/images/flag/mk.png differ
diff --git a/examples/compass/images/flag/ml.png b/examples/compass/images/flag/ml.png
new file mode 100644
index 00000000..22382d25
Binary files /dev/null and b/examples/compass/images/flag/ml.png differ
diff --git a/examples/compass/images/flag/mm.png b/examples/compass/images/flag/mm.png
new file mode 100644
index 00000000..2c60244e
Binary files /dev/null and b/examples/compass/images/flag/mm.png differ
diff --git a/examples/compass/images/flag/mn.png b/examples/compass/images/flag/mn.png
new file mode 100644
index 00000000..36349d93
Binary files /dev/null and b/examples/compass/images/flag/mn.png differ
diff --git a/examples/compass/images/flag/mo.png b/examples/compass/images/flag/mo.png
new file mode 100644
index 00000000..bd458be2
Binary files /dev/null and b/examples/compass/images/flag/mo.png differ
diff --git a/examples/compass/images/flag/mp.png b/examples/compass/images/flag/mp.png
new file mode 100644
index 00000000..99116289
Binary files /dev/null and b/examples/compass/images/flag/mp.png differ
diff --git a/examples/compass/images/flag/mq.png b/examples/compass/images/flag/mq.png
new file mode 100644
index 00000000..42d7fb94
Binary files /dev/null and b/examples/compass/images/flag/mq.png differ
diff --git a/examples/compass/images/flag/mr.png b/examples/compass/images/flag/mr.png
new file mode 100644
index 00000000..a09c7d06
Binary files /dev/null and b/examples/compass/images/flag/mr.png differ
diff --git a/examples/compass/images/flag/ms.png b/examples/compass/images/flag/ms.png
new file mode 100644
index 00000000..88cb1c10
Binary files /dev/null and b/examples/compass/images/flag/ms.png differ
diff --git a/examples/compass/images/flag/mt.png b/examples/compass/images/flag/mt.png
new file mode 100644
index 00000000..cbbc712d
Binary files /dev/null and b/examples/compass/images/flag/mt.png differ
diff --git a/examples/compass/images/flag/mu.png b/examples/compass/images/flag/mu.png
new file mode 100644
index 00000000..fe0dec2a
Binary files /dev/null and b/examples/compass/images/flag/mu.png differ
diff --git a/examples/compass/images/flag/mv.png b/examples/compass/images/flag/mv.png
new file mode 100644
index 00000000..5e600ffc
Binary files /dev/null and b/examples/compass/images/flag/mv.png differ
diff --git a/examples/compass/images/flag/mw.png b/examples/compass/images/flag/mw.png
new file mode 100644
index 00000000..4a8d2aca
Binary files /dev/null and b/examples/compass/images/flag/mw.png differ
diff --git a/examples/compass/images/flag/mx.png b/examples/compass/images/flag/mx.png
new file mode 100644
index 00000000..6d88eeb4
Binary files /dev/null and b/examples/compass/images/flag/mx.png differ
diff --git a/examples/compass/images/flag/my.png b/examples/compass/images/flag/my.png
new file mode 100644
index 00000000..54b6832d
Binary files /dev/null and b/examples/compass/images/flag/my.png differ
diff --git a/examples/compass/images/flag/mz.png b/examples/compass/images/flag/mz.png
new file mode 100644
index 00000000..6eb8dcdf
Binary files /dev/null and b/examples/compass/images/flag/mz.png differ
diff --git a/examples/compass/images/flag/na.png b/examples/compass/images/flag/na.png
new file mode 100644
index 00000000..77b8abdc
Binary files /dev/null and b/examples/compass/images/flag/na.png differ
diff --git a/examples/compass/images/flag/nc.png b/examples/compass/images/flag/nc.png
new file mode 100644
index 00000000..0c64457a
Binary files /dev/null and b/examples/compass/images/flag/nc.png differ
diff --git a/examples/compass/images/flag/ne.png b/examples/compass/images/flag/ne.png
new file mode 100644
index 00000000..d0220a48
Binary files /dev/null and b/examples/compass/images/flag/ne.png differ
diff --git a/examples/compass/images/flag/nf.png b/examples/compass/images/flag/nf.png
new file mode 100644
index 00000000..5941921f
Binary files /dev/null and b/examples/compass/images/flag/nf.png differ
diff --git a/examples/compass/images/flag/ng.png b/examples/compass/images/flag/ng.png
new file mode 100644
index 00000000..00d8a20b
Binary files /dev/null and b/examples/compass/images/flag/ng.png differ
diff --git a/examples/compass/images/flag/ni.png b/examples/compass/images/flag/ni.png
new file mode 100644
index 00000000..c890247e
Binary files /dev/null and b/examples/compass/images/flag/ni.png differ
diff --git a/examples/compass/images/flag/nl.png b/examples/compass/images/flag/nl.png
new file mode 100644
index 00000000..2379dc30
Binary files /dev/null and b/examples/compass/images/flag/nl.png differ
diff --git a/examples/compass/images/flag/no.png b/examples/compass/images/flag/no.png
new file mode 100644
index 00000000..68f0675b
Binary files /dev/null and b/examples/compass/images/flag/no.png differ
diff --git a/examples/compass/images/flag/np.png b/examples/compass/images/flag/np.png
new file mode 100644
index 00000000..38d85088
Binary files /dev/null and b/examples/compass/images/flag/np.png differ
diff --git a/examples/compass/images/flag/nr.png b/examples/compass/images/flag/nr.png
new file mode 100644
index 00000000..5424a5d5
Binary files /dev/null and b/examples/compass/images/flag/nr.png differ
diff --git a/examples/compass/images/flag/nu.png b/examples/compass/images/flag/nu.png
new file mode 100644
index 00000000..4d6ed5b2
Binary files /dev/null and b/examples/compass/images/flag/nu.png differ
diff --git a/examples/compass/images/flag/nz.png b/examples/compass/images/flag/nz.png
new file mode 100644
index 00000000..cd82b8de
Binary files /dev/null and b/examples/compass/images/flag/nz.png differ
diff --git a/examples/compass/images/flag/om.png b/examples/compass/images/flag/om.png
new file mode 100644
index 00000000..aedacd1d
Binary files /dev/null and b/examples/compass/images/flag/om.png differ
diff --git a/examples/compass/images/flag/pa.png b/examples/compass/images/flag/pa.png
new file mode 100644
index 00000000..a7c18406
Binary files /dev/null and b/examples/compass/images/flag/pa.png differ
diff --git a/examples/compass/images/flag/pe.png b/examples/compass/images/flag/pe.png
new file mode 100644
index 00000000..ca6677cb
Binary files /dev/null and b/examples/compass/images/flag/pe.png differ
diff --git a/examples/compass/images/flag/pf.png b/examples/compass/images/flag/pf.png
new file mode 100644
index 00000000..1e026441
Binary files /dev/null and b/examples/compass/images/flag/pf.png differ
diff --git a/examples/compass/images/flag/pg.png b/examples/compass/images/flag/pg.png
new file mode 100644
index 00000000..d86d76f8
Binary files /dev/null and b/examples/compass/images/flag/pg.png differ
diff --git a/examples/compass/images/flag/ph.png b/examples/compass/images/flag/ph.png
new file mode 100644
index 00000000..b2bdc9ae
Binary files /dev/null and b/examples/compass/images/flag/ph.png differ
diff --git a/examples/compass/images/flag/pk.png b/examples/compass/images/flag/pk.png
new file mode 100644
index 00000000..eaa20ce1
Binary files /dev/null and b/examples/compass/images/flag/pk.png differ
diff --git a/examples/compass/images/flag/pl.png b/examples/compass/images/flag/pl.png
new file mode 100644
index 00000000..d461399f
Binary files /dev/null and b/examples/compass/images/flag/pl.png differ
diff --git a/examples/compass/images/flag/pm.png b/examples/compass/images/flag/pm.png
new file mode 100644
index 00000000..55348fd0
Binary files /dev/null and b/examples/compass/images/flag/pm.png differ
diff --git a/examples/compass/images/flag/pn.png b/examples/compass/images/flag/pn.png
new file mode 100644
index 00000000..cc8b0dc9
Binary files /dev/null and b/examples/compass/images/flag/pn.png differ
diff --git a/examples/compass/images/flag/pr.png b/examples/compass/images/flag/pr.png
new file mode 100644
index 00000000..bd5b2687
Binary files /dev/null and b/examples/compass/images/flag/pr.png differ
diff --git a/examples/compass/images/flag/ps.png b/examples/compass/images/flag/ps.png
new file mode 100644
index 00000000..10ac07c2
Binary files /dev/null and b/examples/compass/images/flag/ps.png differ
diff --git a/examples/compass/images/flag/pt.png b/examples/compass/images/flag/pt.png
new file mode 100644
index 00000000..f48a3181
Binary files /dev/null and b/examples/compass/images/flag/pt.png differ
diff --git a/examples/compass/images/flag/pw.png b/examples/compass/images/flag/pw.png
new file mode 100644
index 00000000..5a3522a5
Binary files /dev/null and b/examples/compass/images/flag/pw.png differ
diff --git a/examples/compass/images/flag/py.png b/examples/compass/images/flag/py.png
new file mode 100644
index 00000000..d2260599
Binary files /dev/null and b/examples/compass/images/flag/py.png differ
diff --git a/examples/compass/images/flag/qa.png b/examples/compass/images/flag/qa.png
new file mode 100644
index 00000000..388e6b3e
Binary files /dev/null and b/examples/compass/images/flag/qa.png differ
diff --git a/examples/compass/images/flag/re.png b/examples/compass/images/flag/re.png
new file mode 100644
index 00000000..507d28f0
Binary files /dev/null and b/examples/compass/images/flag/re.png differ
diff --git a/examples/compass/images/flag/ro.png b/examples/compass/images/flag/ro.png
new file mode 100644
index 00000000..4941caff
Binary files /dev/null and b/examples/compass/images/flag/ro.png differ
diff --git a/examples/compass/images/flag/rs.png b/examples/compass/images/flag/rs.png
new file mode 100644
index 00000000..9108bb58
Binary files /dev/null and b/examples/compass/images/flag/rs.png differ
diff --git a/examples/compass/images/flag/ru.png b/examples/compass/images/flag/ru.png
new file mode 100644
index 00000000..f10a7933
Binary files /dev/null and b/examples/compass/images/flag/ru.png differ
diff --git a/examples/compass/images/flag/rw.png b/examples/compass/images/flag/rw.png
new file mode 100644
index 00000000..e2b3e719
Binary files /dev/null and b/examples/compass/images/flag/rw.png differ
diff --git a/examples/compass/images/flag/sa.png b/examples/compass/images/flag/sa.png
new file mode 100644
index 00000000..60a31818
Binary files /dev/null and b/examples/compass/images/flag/sa.png differ
diff --git a/examples/compass/images/flag/sb.png b/examples/compass/images/flag/sb.png
new file mode 100644
index 00000000..118c5c7d
Binary files /dev/null and b/examples/compass/images/flag/sb.png differ
diff --git a/examples/compass/images/flag/sc.png b/examples/compass/images/flag/sc.png
new file mode 100644
index 00000000..d1080752
Binary files /dev/null and b/examples/compass/images/flag/sc.png differ
diff --git a/examples/compass/images/flag/scotland.png b/examples/compass/images/flag/scotland.png
new file mode 100644
index 00000000..7d66e7ff
Binary files /dev/null and b/examples/compass/images/flag/scotland.png differ
diff --git a/examples/compass/images/flag/sd.png b/examples/compass/images/flag/sd.png
new file mode 100644
index 00000000..968716c8
Binary files /dev/null and b/examples/compass/images/flag/sd.png differ
diff --git a/examples/compass/images/flag/se.png b/examples/compass/images/flag/se.png
new file mode 100644
index 00000000..a3eee573
Binary files /dev/null and b/examples/compass/images/flag/se.png differ
diff --git a/examples/compass/images/flag/sg.png b/examples/compass/images/flag/sg.png
new file mode 100644
index 00000000..788eb6b7
Binary files /dev/null and b/examples/compass/images/flag/sg.png differ
diff --git a/examples/compass/images/flag/sh.png b/examples/compass/images/flag/sh.png
new file mode 100644
index 00000000..c97eae88
Binary files /dev/null and b/examples/compass/images/flag/sh.png differ
diff --git a/examples/compass/images/flag/si.png b/examples/compass/images/flag/si.png
new file mode 100644
index 00000000..3e35926b
Binary files /dev/null and b/examples/compass/images/flag/si.png differ
diff --git a/examples/compass/images/flag/sj.png b/examples/compass/images/flag/sj.png
new file mode 100644
index 00000000..c9e89041
Binary files /dev/null and b/examples/compass/images/flag/sj.png differ
diff --git a/examples/compass/images/flag/sk.png b/examples/compass/images/flag/sk.png
new file mode 100644
index 00000000..ec9ee781
Binary files /dev/null and b/examples/compass/images/flag/sk.png differ
diff --git a/examples/compass/images/flag/sl.png b/examples/compass/images/flag/sl.png
new file mode 100644
index 00000000..c30da74c
Binary files /dev/null and b/examples/compass/images/flag/sl.png differ
diff --git a/examples/compass/images/flag/sm.png b/examples/compass/images/flag/sm.png
new file mode 100644
index 00000000..e2ac0286
Binary files /dev/null and b/examples/compass/images/flag/sm.png differ
diff --git a/examples/compass/images/flag/sn.png b/examples/compass/images/flag/sn.png
new file mode 100644
index 00000000..e48d2fa5
Binary files /dev/null and b/examples/compass/images/flag/sn.png differ
diff --git a/examples/compass/images/flag/so.png b/examples/compass/images/flag/so.png
new file mode 100644
index 00000000..ef8648ce
Binary files /dev/null and b/examples/compass/images/flag/so.png differ
diff --git a/examples/compass/images/flag/sr.png b/examples/compass/images/flag/sr.png
new file mode 100644
index 00000000..05170cf4
Binary files /dev/null and b/examples/compass/images/flag/sr.png differ
diff --git a/examples/compass/images/flag/st.png b/examples/compass/images/flag/st.png
new file mode 100644
index 00000000..76ca2d23
Binary files /dev/null and b/examples/compass/images/flag/st.png differ
diff --git a/examples/compass/images/flag/sv.png b/examples/compass/images/flag/sv.png
new file mode 100644
index 00000000..96764f36
Binary files /dev/null and b/examples/compass/images/flag/sv.png differ
diff --git a/examples/compass/images/flag/sy.png b/examples/compass/images/flag/sy.png
new file mode 100644
index 00000000..c2069a36
Binary files /dev/null and b/examples/compass/images/flag/sy.png differ
diff --git a/examples/compass/images/flag/sz.png b/examples/compass/images/flag/sz.png
new file mode 100644
index 00000000..7464eade
Binary files /dev/null and b/examples/compass/images/flag/sz.png differ
diff --git a/examples/compass/images/flag/tc.png b/examples/compass/images/flag/tc.png
new file mode 100644
index 00000000..a2743ab5
Binary files /dev/null and b/examples/compass/images/flag/tc.png differ
diff --git a/examples/compass/images/flag/td.png b/examples/compass/images/flag/td.png
new file mode 100644
index 00000000..fca8258e
Binary files /dev/null and b/examples/compass/images/flag/td.png differ
diff --git a/examples/compass/images/flag/tf.png b/examples/compass/images/flag/tf.png
new file mode 100644
index 00000000..8a87c0da
Binary files /dev/null and b/examples/compass/images/flag/tf.png differ
diff --git a/examples/compass/images/flag/tg.png b/examples/compass/images/flag/tg.png
new file mode 100644
index 00000000..76f5aa0d
Binary files /dev/null and b/examples/compass/images/flag/tg.png differ
diff --git a/examples/compass/images/flag/th.png b/examples/compass/images/flag/th.png
new file mode 100644
index 00000000..f48a1cd8
Binary files /dev/null and b/examples/compass/images/flag/th.png differ
diff --git a/examples/compass/images/flag/tj.png b/examples/compass/images/flag/tj.png
new file mode 100644
index 00000000..67e6a75a
Binary files /dev/null and b/examples/compass/images/flag/tj.png differ
diff --git a/examples/compass/images/flag/tk.png b/examples/compass/images/flag/tk.png
new file mode 100644
index 00000000..e778334a
Binary files /dev/null and b/examples/compass/images/flag/tk.png differ
diff --git a/examples/compass/images/flag/tl.png b/examples/compass/images/flag/tl.png
new file mode 100644
index 00000000..5492bf96
Binary files /dev/null and b/examples/compass/images/flag/tl.png differ
diff --git a/examples/compass/images/flag/tm.png b/examples/compass/images/flag/tm.png
new file mode 100644
index 00000000..85eda048
Binary files /dev/null and b/examples/compass/images/flag/tm.png differ
diff --git a/examples/compass/images/flag/tn.png b/examples/compass/images/flag/tn.png
new file mode 100644
index 00000000..fd04bbe2
Binary files /dev/null and b/examples/compass/images/flag/tn.png differ
diff --git a/examples/compass/images/flag/to.png b/examples/compass/images/flag/to.png
new file mode 100644
index 00000000..9dd7709b
Binary files /dev/null and b/examples/compass/images/flag/to.png differ
diff --git a/examples/compass/images/flag/tr.png b/examples/compass/images/flag/tr.png
new file mode 100644
index 00000000..f64e102f
Binary files /dev/null and b/examples/compass/images/flag/tr.png differ
diff --git a/examples/compass/images/flag/tt.png b/examples/compass/images/flag/tt.png
new file mode 100644
index 00000000..73f52178
Binary files /dev/null and b/examples/compass/images/flag/tt.png differ
diff --git a/examples/compass/images/flag/tv.png b/examples/compass/images/flag/tv.png
new file mode 100644
index 00000000..c65b6e31
Binary files /dev/null and b/examples/compass/images/flag/tv.png differ
diff --git a/examples/compass/images/flag/tw.png b/examples/compass/images/flag/tw.png
new file mode 100644
index 00000000..5808bdf5
Binary files /dev/null and b/examples/compass/images/flag/tw.png differ
diff --git a/examples/compass/images/flag/tz.png b/examples/compass/images/flag/tz.png
new file mode 100644
index 00000000..b966c8c4
Binary files /dev/null and b/examples/compass/images/flag/tz.png differ
diff --git a/examples/compass/images/flag/ua.png b/examples/compass/images/flag/ua.png
new file mode 100644
index 00000000..7a187e6a
Binary files /dev/null and b/examples/compass/images/flag/ua.png differ
diff --git a/examples/compass/images/flag/ug.png b/examples/compass/images/flag/ug.png
new file mode 100644
index 00000000..348b5818
Binary files /dev/null and b/examples/compass/images/flag/ug.png differ
diff --git a/examples/compass/images/flag/um.png b/examples/compass/images/flag/um.png
new file mode 100644
index 00000000..829fd6e2
Binary files /dev/null and b/examples/compass/images/flag/um.png differ
diff --git a/examples/compass/images/flag/us.png b/examples/compass/images/flag/us.png
new file mode 100644
index 00000000..18353b27
Binary files /dev/null and b/examples/compass/images/flag/us.png differ
diff --git a/examples/compass/images/flag/uy.png b/examples/compass/images/flag/uy.png
new file mode 100644
index 00000000..8a174a4d
Binary files /dev/null and b/examples/compass/images/flag/uy.png differ
diff --git a/examples/compass/images/flag/uz.png b/examples/compass/images/flag/uz.png
new file mode 100644
index 00000000..28ec49bb
Binary files /dev/null and b/examples/compass/images/flag/uz.png differ
diff --git a/examples/compass/images/flag/va.png b/examples/compass/images/flag/va.png
new file mode 100644
index 00000000..a8c15e84
Binary files /dev/null and b/examples/compass/images/flag/va.png differ
diff --git a/examples/compass/images/flag/vc.png b/examples/compass/images/flag/vc.png
new file mode 100644
index 00000000..212e211d
Binary files /dev/null and b/examples/compass/images/flag/vc.png differ
diff --git a/examples/compass/images/flag/ve.png b/examples/compass/images/flag/ve.png
new file mode 100644
index 00000000..af53d70b
Binary files /dev/null and b/examples/compass/images/flag/ve.png differ
diff --git a/examples/compass/images/flag/vg.png b/examples/compass/images/flag/vg.png
new file mode 100644
index 00000000..50593af6
Binary files /dev/null and b/examples/compass/images/flag/vg.png differ
diff --git a/examples/compass/images/flag/vi.png b/examples/compass/images/flag/vi.png
new file mode 100644
index 00000000..461f4199
Binary files /dev/null and b/examples/compass/images/flag/vi.png differ
diff --git a/examples/compass/images/flag/vn.png b/examples/compass/images/flag/vn.png
new file mode 100644
index 00000000..0b920b39
Binary files /dev/null and b/examples/compass/images/flag/vn.png differ
diff --git a/examples/compass/images/flag/vu.png b/examples/compass/images/flag/vu.png
new file mode 100644
index 00000000..f70d27f6
Binary files /dev/null and b/examples/compass/images/flag/vu.png differ
diff --git a/examples/compass/images/flag/wales.png b/examples/compass/images/flag/wales.png
new file mode 100644
index 00000000..05838f9f
Binary files /dev/null and b/examples/compass/images/flag/wales.png differ
diff --git a/examples/compass/images/flag/wf.png b/examples/compass/images/flag/wf.png
new file mode 100644
index 00000000..6434e110
Binary files /dev/null and b/examples/compass/images/flag/wf.png differ
diff --git a/examples/compass/images/flag/ws.png b/examples/compass/images/flag/ws.png
new file mode 100644
index 00000000..47c0eb03
Binary files /dev/null and b/examples/compass/images/flag/ws.png differ
diff --git a/examples/compass/images/flag/ye.png b/examples/compass/images/flag/ye.png
new file mode 100644
index 00000000..54b83d0c
Binary files /dev/null and b/examples/compass/images/flag/ye.png differ
diff --git a/examples/compass/images/flag/yt.png b/examples/compass/images/flag/yt.png
new file mode 100644
index 00000000..045a76f9
Binary files /dev/null and b/examples/compass/images/flag/yt.png differ
diff --git a/examples/compass/images/flag/za.png b/examples/compass/images/flag/za.png
new file mode 100644
index 00000000..27161f17
Binary files /dev/null and b/examples/compass/images/flag/za.png differ
diff --git a/examples/compass/images/flag/zm.png b/examples/compass/images/flag/zm.png
new file mode 100644
index 00000000..c6ab90f5
Binary files /dev/null and b/examples/compass/images/flag/zm.png differ
diff --git a/examples/compass/images/flag/zw.png b/examples/compass/images/flag/zw.png
new file mode 100644
index 00000000..f8941950
Binary files /dev/null and b/examples/compass/images/flag/zw.png differ
diff --git a/examples/compass/sprites.html.haml b/examples/compass/sprites.html.haml
new file mode 100644
index 00000000..c33bdc72
--- /dev/null
+++ b/examples/compass/sprites.html.haml
@@ -0,0 +1,37 @@
+!!!
+%html
+ %head
+ %link{:href => "stylesheets/sprites.css", :rel => "stylesheet", :type => "text/css"}
+ %body
+ %h1 Flags
+ %table#flags
+ %tr
+ %td.us
+ %td.de
+ %td.ca
+ %tr
+ %td.au
+ %td.cn
+ %td.cz
+ %tr
+ %td.nz
+ %td.jp
+ %td.scotland
+ %tr
+ %td.tw
+ %td.rs
+ %td.gb
+ %h1 Emblems
+ %table#emblems
+ %tr
+ %td.favorite
+ %td.important
+ %td.photos
+ %tr
+ %td.readonly
+ %td.symbolic-link
+ %td.system
+ %tr
+ %td.unreadable
+ %td
+ %td
diff --git a/examples/compass/src/sprites.scss b/examples/compass/src/sprites.scss
new file mode 100644
index 00000000..e791f095
--- /dev/null
+++ b/examples/compass/src/sprites.scss
@@ -0,0 +1,25 @@
+@import "flag/*.png";
+@import "emblem/*.png";
+
+.flag-sprite {
+ width: image-width("flag/us.png");
+ height: image-height("flag/us.png");
+ padding: 0;
+}
+
+.emblem-sprite {
+ width: image-width("emblem/favorite.png");
+ height: image-height("emblem/favorite.png");
+ padding: 0;
+}
+
+#flags {
+ @include sprites($flag-sprites,
+ us de ca au cn cz nz jp scotland tw rs gb,
+ $flag-sprite-base-class,
+ $prefix: false);
+}
+
+#emblems {
+ @include all-emblem-sprites($prefix: false);
+}
\ No newline at end of file
diff --git a/examples/compass/src/sticky_footer.scss b/examples/compass/src/sticky_footer.scss
index 4f3f807f..3c5bd4e0 100644
--- a/examples/compass/src/sticky_footer.scss
+++ b/examples/compass/src/sticky_footer.scss
@@ -1,7 +1,7 @@
@import "compass/reset";
@import "compass/layout";
-@include sticky-footer(72px, unquote("#layout"), unquote("#layout_footer"), unquote("#footer"));
+@include sticky-footer(72px, "#layout", "#layout_footer", "#footer");
#header {
background: #999999;
diff --git a/examples/compass/src/utilities.scss b/examples/compass/src/utilities.scss
index b15702f8..069c067b 100644
--- a/examples/compass/src/utilities.scss
+++ b/examples/compass/src/utilities.scss
@@ -57,7 +57,7 @@ h2 {
ul.comma-delimited {
@include comma-delimited-list; }
ol.pretty {
- @include pretty-bullets(unquote("blue_arrow.gif"), 5px, 7px, 18px); } }
+ @include pretty-bullets("blue_arrow.gif", 5px, 7px, 18px); } }
#tables {
@include column(16);
diff --git a/examples/css3/src/gradients.scss b/examples/css3/src/gradients.scss
index 6b39b710..ca55c6c7 100644
--- a/examples/css3/src/gradients.scss
+++ b/examples/css3/src/gradients.scss
@@ -11,76 +11,76 @@ thead th {
@include text-shadow(white); }
th.linear {
- @include linear-gradient(color-stops(white, red 50%, yellow 75%, lime)); }
+ @include background-image(linear-gradient(white, red 50%, yellow 75%, lime)); }
th.radial {
- @include radial-gradient(color-stops(white, red 20px, yellow 30px, lime 40px)); }
+ @include background-image(radial-gradient(white, red 20px, yellow 30px, lime 40px)); }
tr.default {
td.linear {
- @include linear-gradient(color-stops(#cc0000, #0000cc)); }
+ @include background-image(linear-gradient(#cc0000, #0000cc)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000, #0000cc)); }
+ @include background-image(radial-gradient(#cc0000, #0000cc)); }
td.linear-code:before {
- content: "+linear-gradient(color-stops(#c00, #00c))"; }
+ content: "+background-image(linear-gradient(#c00, #00c))"; }
td.radial-code:before {
- content: "+radial-gradient(color-stops(#c00, #00c))"; } }
+ content: "+background-image(radial-gradient(#c00, #00c))"; } }
tr.top-left {
td.linear {
- @include linear-gradient(color-stops(#cc0000, #0000cc), unquote("top left")); }
+ @include background-image(linear-gradient(top left, #cc0000, #0000cc)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000, #0000cc), unquote("top left")); }
+ @include background-image(radial-gradient(top left, #cc0000, #0000cc)); }
td.linear-code:before {
- content: '+linear-gradient(color-stops(#c00, #00c), "top left")'; }
+ content: '+background-image(linear-gradient(top left, #c00, #00c))'; }
td.radial-code:before {
- content: '+radial-gradient(color-stops(#c00, #00c), "top left")'; } }
+ content: '+background-image(radial-gradient(top left, #c00, #00c))'; } }
tr.bottom-right {
td.linear {
- @include linear-gradient(color-stops(#cc0000, #0000cc), unquote("bottom right")); }
+ @include background-image(linear-gradient(bottom right, #cc0000, #0000cc)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000, #0000cc), unquote("bottom right")); }
+ @include background-image(radial-gradient(bottom right, #cc0000, #0000cc)); }
td.linear-code:before {
- content: '+linear-gradient(color-stops(#c00, #00c), "bottom right")'; }
+ content: '+background-image(linear-gradient(bottom right, #c00, #00c))'; }
td.radial-code:before {
- content: '+radial-gradient(color-stops(#c00, #00c), "bottom right")'; } }
+ content: '+background-image(radial-gradient(bottom right, #c00, #00c))'; } }
tr.three-color {
td.linear {
- @include linear-gradient(color-stops(#cc0000, white, #0000cc)); }
+ @include background-image(linear-gradient(#cc0000, white, #0000cc)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000, white, #0000cc 50px)); }
+ @include background-image(radial-gradient(#cc0000, white, #0000cc 50px)); }
td.linear-code:before {
- content: "+linear-gradient(color-stops(#c00, #fff, #00c))"; }
+ content: "+background-image(linear-gradient(#c00, #fff, #00c))"; }
td.radial-code:before {
- content: "+radial-gradient(color-stops(#c00, #fff, #00c 50px))"; } }
+ content: "+background-image(radial-gradient(#c00, #fff, #00c 50px))"; } }
tr.four-color {
td.linear {
- @include linear-gradient(color-stops(#cc0000, #00cc00 25%, #00cccc 75%, #0000cc)); }
+ @include background-image(linear-gradient(#cc0000, #00cc00 25%, #00cccc 75%, #0000cc)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000, #00cc00 25%, #00cccc 75%, #0000cc 50px)); }
+ @include background-image(radial-gradient(#cc0000, #00cc00 25%, #00cccc 75%, #0000cc 50px)); }
td.linear-code:before {
- content: "+linear-gradient(color-stops(#c00, #0c0 25%, #0cc 75%, #00c))"; }
+ content: "+background-image(linear-gradient(#c00, #0c0 25%, #0cc 75%, #00c))"; }
td.radial-code:before {
- content: "+radial-gradient(color-stops(#c00, #0c0 25%, #0cc 75%, #00c 50px))"; } }
+ content: "+background-image(radial-gradient(#c00, #0c0 25%, #0cc 75%, #00c 50px))"; } }
tr.filled-in {
td.linear {
- @include linear-gradient(color-stops(#cc0000 33%, #0000cc 66%)); }
+ @include background-image(linear-gradient(#cc0000 33%, #0000cc 66%)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000 25px, #0000cc 75px)); }
+ @include background-image(radial-gradient(#cc0000 25px, #0000cc 75px)); }
td.linear-code:before {
- content: "+linear-gradient(color-stops(#c00 33%, #00c 66%))"; }
+ content: "+background-image(linear-gradient(#c00 33%, #00c 66%))"; }
td.radial-code:before {
- content: "+radial-gradient(color-stops(#c00 25px, #00c 75px))"; } }
+ content: "+background-image(radial-gradient(#c00 25px, #00c 75px))"; } }
tr.with-bg {
td.linear {
- @include linear-gradient(color-stops(#cc0000 33%, #0000cc 66%), top, image-url("button_bg.png")); }
+ @include background-image(image-url("button_bg.png"), linear-gradient(top, #c00 33%, #00c 66%)); }
td.radial {
- @include radial-gradient(color-stops(#cc0000 25px, #0000cc 75px), center center, image-url("button_bg.png")); }
+ @include background-image(image-url("button_bg.png"), radial-gradient(center center, #c00 25px, #00c 75px)); }
td.linear-code:before {
- content: "+linear-gradient(color-stops(#cc0000 33%, #0000cc 66%), top, image-url(\"button_bg.png\"))"; }
+ content: "+background-image(image-url(\"button_bg.png\"), linear-gradient(top, #c00 33%, #00c 66%))"; }
td.radial-code:before {
- content: "+radial-gradient(color-stops(#cc0000 25px, #0000cc 75px), center center, image-url(\"button_bg.png\"))"; } }
\ No newline at end of file
+ content: "+background-image(image-url(\"button_bg.png\"), radial-gradient(center center, #c00 25px, #00c 75px))"; } }
\ No newline at end of file
diff --git a/examples/css3/src/main.scss b/examples/css3/src/main.scss
index 5396a0c1..57d0d2f3 100644
--- a/examples/css3/src/main.scss
+++ b/examples/css3/src/main.scss
@@ -26,14 +26,14 @@ h1 {
min-width: $min_width;
border: 4px solid #{$border_color};
@include border-radius(0.667em);
- @include box-shadow(darken($border_color, 40), 5px, 5px, 2px);
+ @include single-box-shadow(darken($border_color, 40), 5px, 5px, 2px);
margin-bottom: 1em;
h2 {
margin: 0.5em 0 1em;
text-align: center; } }
.inset {
- @include box-shadow(darken($border_color, 40), 5px, 5px, 2px, 3px, inset);
+ @include single-box-shadow(darken($border_color, 40), 5px, 5px, 2px, 3px, inset);
}
.gutter {
@@ -44,7 +44,7 @@ h1 {
content: " "; }
.example {
- @include linear-gradient(color_stops(white, #cccccc));
+ @include background-image(linear-gradient(white, #cccccc));
pre {
padding: 1em;
margin: 1em;
@@ -76,39 +76,33 @@ h1 {
#gradients {
.horizontal {
- @include linear-gradient(color_stops(#d92626, #2626d9), left); }
+ @include background-image(left, linear-gradient(#d92626, #2626d9)); }
.vertical {
- @include linear-gradient(color_stops(#d92626, #2626d9)); }
+ @include background-image(linear-gradient(#d92626, #2626d9)); }
.diagonal {
- @include linear-gradient(color_stops(#d92626, #2626d9), unquote("right top")); }
+ @include background-image(linear-gradient(right top, #d92626, #2626d9)); }
.radial {
/* +radial-gradient(color_stops(#d92626 0, #2626d9 1)) */
- @include radial-gradient(color_stops(#d92626 10px, #2626d9 150px));
+ @include background-image(radial-gradient(#d92626 10px, #2626d9 150px));
// +radial-gradient("center center, 10, center center, 100", #d92626, #2626d9)
// background-image: -moz-radial-gradient(20px center, circle, #d92626 10px, #2626d9 100px)
// background-color: #2626d9
}
.radial-1 {
// A default radial gradient:
- /* +radial-gradient(color_stops(#ddd, #aaa)) */
- @include radial-gradient(color_stops(#dddddd, #aaaaaa)); }
+ @include background-image(radial-gradient(#dddddd, #aaaaaa)); }
.radial-2 {
// A centered gradient
- /* +radial-gradient(color_stops(#ddd, #aaa)) */
- @include radial-gradient(color_stops(#dddddd, #aaaaaa)); }
+ @include background-image(radial-gradient(#dddddd, #aaaaaa)); }
.radial-3 {
// A centered radial gradient at the top
- /* +radial-gradient(color_stops(#ddd, #aaa), "top center") */
- @include radial-gradient(color_stops(#dddddd, #aaaaaa), unquote("top center")); }
+ @include background-image(radial-gradient(top center, #dddddd, #aaaaaa)); }
.radial-4 {
// A centered radial gradient with fixed color stops
- /* +radial-gradient(color_stops(#ddd 20px, #aaa 50px)) */
- @include radial-gradient(color_stops(#dddddd 20px, #aaaaaa 50px)); }
+ @include background-image(radial-gradient(#dddddd 20px, #aaaaaa 50px)); }
.radial-5 {
// A centered gradient with several color stops
- /* +radial-gradient(color_stops(#ddd 20%, #aaa 50%, #c00)) */
- @include radial-gradient(color_stops(#dddddd 20px, #aaaaaa 50%, #cc0000 200px)); }
+ @include background-image(radial-gradient(#dddddd 20px, #aaaaaa 50%, #cc0000 200px)); }
.radial-6 {
// A centered gradient with color stops
- /* +radial-gradient(color_stops(#0c0, #ddd 20%, #aaa 50%, #00c)) */
- @include radial-gradient(color_stops(#00cc00 0px, #dddddd 20px, #aaaaaa 50px, #0000cc 100px)); } }
+ @include background-image(radial-gradient(#00cc00 0px, #dddddd 20px, #aaaaaa 50px, #0000cc 100px)); } }
diff --git a/frameworks/blueprint/stylesheets/blueprint/_grid.scss b/frameworks/blueprint/stylesheets/blueprint/_grid.scss
index 30a38e06..2b35b331 100644
--- a/frameworks/blueprint/stylesheets/blueprint/_grid.scss
+++ b/frameworks/blueprint/stylesheets/blueprint/_grid.scss
@@ -54,15 +54,15 @@ $blueprint-container-size: $blueprint-grid-outer-width * $blueprint-grid-columns
@for $n from 1 to $blueprint-grid-columns {
.span-#{$n} {
@extend .column;
- @include span($n); } }
+ width: span($n); } }
.span-#{$blueprint-grid-columns} {
@extend .column;
- @include span($blueprint-grid-columns);
+ width: span($blueprint-grid-columns);
margin: 0; }
input, textarea, select {
@for $n from 1 through $blueprint-grid-columns {
&.span-#{$n} {
- @include span($n, true); } } }
+ width: span($n); } } }
// Add these to a column to append empty cols.
@for $n from 1 to $blueprint-grid-columns {
.append-#{$n} {
@@ -106,18 +106,25 @@ $blueprint-container-size: $blueprint-grid-outer-width * $blueprint-grid-columns
// Use this mixins to set the width of n columns.
@mixin column($n, $last: false) {
@include column-base($last);
- @include span($n); }
+ width: span($n); }
+
+// Return the width in pixels of `$n` columns.
+@function span($n) {
+ @return $blueprint-grid-width * $n + $blueprint-grid-margin * ($n - 1);
+}
// Set only the width of an element to align it with the grid.
// Most of the time you'll want to use `+column` instead.
//
// This mixin is especially useful for aligning tables to the grid.
-@mixin span($n, $override: false) {
- $width: $blueprint-grid-width * $n + $blueprint-grid-margin * ($n - 1);
- @if $override {
- width: $width !important; }
+//
+// @deprecated Please use the span function with the width property instead.
+@mixin span($n, $important: false) {
+ @warn "The span mixin is deprecated. Please use the span function instead. E.g. width: span(#{$n})";
+ @if $important {
+ width: span($n) !important; }
@else {
- width: $width; } }
+ width: span($n); } }
// The basic set of styles needed to make an element
// behave like a column:
diff --git a/frameworks/blueprint/stylesheets/blueprint/_liquid.scss b/frameworks/blueprint/stylesheets/blueprint/_liquid.scss
index 2c7e774c..ebe0e070 100644
--- a/frameworks/blueprint/stylesheets/blueprint/_liquid.scss
+++ b/frameworks/blueprint/stylesheets/blueprint/_liquid.scss
@@ -55,8 +55,7 @@ $blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-l
@include container; }
// Use these classes (or mixins) to set the width of a column.
@for $n from 1 to $blueprint-liquid-grid-columns + 1 {
- .span-#{$n} {
- @include span($n); }
+ .span-#{$n} { width: span-fluid($n); }
div {
&.span-#{$n} {
@include column($n, $n == $blueprint-liquid-grid-columns); } } }
@@ -86,9 +85,15 @@ $blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-l
margin: 0 auto;
@include clearfix; }
-@mixin span($n, $override: false) {
- $width: $blueprint-liquid-grid-width * $n + $blueprint-liquid-grid-margin * ($n - 1);
- @if $override {
+// Return the width of `$n` columns in percents.
+@function span-fluid($n) {
+ @return $blueprint-liquid-grid-width * $n + $blueprint-liquid-grid-margin * ($n - 1);
+}
+
+@mixin span($n, $important: false) {
+ @warn "The span mixin is deprecated. Please use the span-fluid function instead. E.g. width: span-fluid(#{$n})";
+ $width: span-fluid($n);
+ @if $important {
width: $width !important; }
@else {
width: $width; } }
@@ -99,7 +104,7 @@ $blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-l
@mixin column($n, $last: false) {
@include float-left;
overflow: hidden;
- @include span($n);
+ width: span-fluid($n);
@if $last {
@include last; }
@else {
diff --git a/frameworks/compass/stylesheets/compass/css3/_transform.scss b/frameworks/compass/stylesheets/compass/css3/_transform.scss
index 064f7ce3..e6fa3b4b 100644
--- a/frameworks/compass/stylesheets/compass/css3/_transform.scss
+++ b/frameworks/compass/stylesheets/compass/css3/_transform.scss
@@ -47,31 +47,45 @@
// Defaults ------------------------------------------------------------------
// @doc on
-// Transform Origin
+// The default x-origin for transforms
$default-origin-x : 50% !default;
+// The default y-origin for transforms
$default-origin-y : 50% !default;
+// The default z-origin for transforms
$default-origin-z : 50% !default;
-// Scale
+
+// The default x-multiplier for scaling
$default-scale-x : 1.25 !default;
+// The default y-multiplier for scaling
$default-scale-y : $default-scale-x !default;
+// The default z-multiplier for scaling
$default-scale-z : $default-scale-x !default;
-// Rotate
+
+// The default angle for rotations
$default-rotate : 45deg !default;
-// Rotate3d
+
+// The default x-vector for the axis of 3d rotations
$default-vector-x : 1 !default;
+// The default y-vector for the axis of 3d rotations
$default-vector-y : 1 !default;
+// The default z-vector for the axis of 3d rotations
$default-vector-z : 1 !default;
-// Translate
+
+// The default x-length for translations
$default-translate-x : 1em !default;
+// The default y-length for translations
$default-translate-y : $default-translate-x !default;
+// The default z-length for translations
$default-translate-z : $default-translate-x !default;
-// Skew
+
+// The default x-angle for skewing
$default-skew-x : 5deg !default;
+// The default y-angle for skewing
$default-skew-y : 5deg !default;
diff --git a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss
index fc095761..bc749162 100644
--- a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss
+++ b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss
@@ -30,9 +30,10 @@
// 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) {
+@mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map)) {
@each $sprite-name in $sprite-names {
- .#{sprite-map-name($map)}-#{$sprite-name} {
+ $full-sprite-name: if($prefix and $prefix != "", "#{$prefix}-#{$sprite-name}", $sprite-name);
+ .#{$full-sprite-name} {
@if $base-class { @extend #{$base-class}; }
@include sprite($map, $sprite-name, $dimensions);
}
diff --git a/lib/compass.rb b/lib/compass.rb
index bb85f181..2f0b7ec7 100644
--- a/lib/compass.rb
+++ b/lib/compass.rb
@@ -1,7 +1,7 @@
module Compass
end
-%w(dependencies util sass_extensions core_ext version errors quick_cache).each do |lib|
+%w(dependencies util browser_support sass_extensions core_ext version errors quick_cache).each do |lib|
require "compass/#{lib}"
end
diff --git a/lib/compass/browser_support.rb b/lib/compass/browser_support.rb
new file mode 100644
index 00000000..cbe617f0
--- /dev/null
+++ b/lib/compass/browser_support.rb
@@ -0,0 +1,62 @@
+module Compass
+ module BrowserSupport
+ extend self
+
+ ASPECTS = %w(webkit moz o ms svg pie css2)
+
+ SIMPLE_FUNCTIONS = {
+ "image" => %w(), # No browsers implement this yet.
+ "cross-fade" => %w() # No browsers implement this yet.
+ }
+
+ # Adds support for one or more aspects for the given simple function
+ # Example:
+ #
+ # Compass::BrowserSupport.add_support("image", "moz", "webkit")
+ # # => Adds support for moz and webkit to the image() function.
+ #
+ # This function can be called one or more times in a compass configuration
+ # file in order to add support for new, simple browser functions without
+ # waiting for a new compass release.
+ def add_support(function, *aspects)
+ aspects.each do |aspect|
+ unless ASPECTS.include?(aspect)
+ Compass::Util.compass_warn "Unknown support aspect: #{aspect}"
+ next
+ end
+ unless supports?(function, aspect)
+ SIMPLE_FUNCTIONS[function.to_s] ||= []
+ SIMPLE_FUNCTIONS[function.to_s] << aspect.to_s
+ end
+ end
+ end
+
+ # Removes support for one or more aspects for the given simple function
+ # Example:
+ #
+ # Compass::BrowserSupport.remove_support("image", "o", "ms")
+ # # => Adds support for moz and webkit to the image() function.
+ #
+ # This function can be called one or more times in a compass configuration
+ # file in order to remove support for simple functions that no longer need to
+ # a prefix without waiting for a new compass release.
+ def remove_support(function, *aspects)
+ aspects.each do |aspect|
+ unless ASPECTS.include?(aspect)
+ Compass::Util.compass_warn "Unknown support aspect: #{aspect}"
+ next
+ end
+ SIMPLE_FUNCTIONS[function.to_s].reject!{|a| a == aspect.to_s}
+ end
+ end
+
+ def supports?(function, aspect)
+ SIMPLE_FUNCTIONS.has_key?(function.to_s) && SIMPLE_FUNCTIONS[function.to_s].include?(aspect.to_s)
+ end
+
+ def has_aspect?(function)
+ SIMPLE_FUNCTIONS.has_key?(function.to_s) && SIMPLE_FUNCTIONS[function.to_s].size > 0
+ end
+
+ end
+end
diff --git a/lib/compass/sass_extensions/functions.rb b/lib/compass/sass_extensions/functions.rb
index 895455ed..99cf687a 100644
--- a/lib/compass/sass_extensions/functions.rb
+++ b/lib/compass/sass_extensions/functions.rb
@@ -4,7 +4,7 @@ end
%w(
selectors enumerate urls display
inline_image image_size constants gradient_support
- font_files lists colors trig sprites
+ font_files lists colors trig sprites cross_browser_support
).each do |func|
require "compass/sass_extensions/functions/#{func}"
end
@@ -23,6 +23,7 @@ module Sass::Script::Functions
include Compass::SassExtensions::Functions::Colors
include Compass::SassExtensions::Functions::Trig
include Compass::SassExtensions::Functions::Sprites
+ include Compass::SassExtensions::Functions::CrossBrowserSupport
end
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug?
diff --git a/lib/compass/sass_extensions/functions/colors.rb b/lib/compass/sass_extensions/functions/colors.rb
index f7ba0173..70be6162 100644
--- a/lib/compass/sass_extensions/functions/colors.rb
+++ b/lib/compass/sass_extensions/functions/colors.rb
@@ -1,11 +1,10 @@
module Compass::SassExtensions::Functions::Colors
- include Compass::Util
# a genericized version of lighten/darken so that negative values can be used.
def adjust_lightness(color, amount)
assert_type color, :Color
assert_type amount, :Number
- color.with(:lightness => restrict(color.lightness + amount.value, 0..100))
+ color.with(:lightness => Compass::Util.restrict(color.lightness + amount.value, 0..100))
end
# Scales a color's lightness by some percentage.
@@ -21,7 +20,7 @@ module Compass::SassExtensions::Functions::Colors
def adjust_saturation(color, amount)
assert_type color, :Color
assert_type amount, :Number
- color.with(:saturation => restrict(color.saturation + amount.value, 0..100))
+ color.with(:saturation => Compass::Util.restrict(color.saturation + amount.value, 0..100))
end
# Scales a color's saturation by some percentage.
diff --git a/lib/compass/sass_extensions/functions/cross_browser_support.rb b/lib/compass/sass_extensions/functions/cross_browser_support.rb
new file mode 100644
index 00000000..92bab46e
--- /dev/null
+++ b/lib/compass/sass_extensions/functions/cross_browser_support.rb
@@ -0,0 +1,39 @@
+module Compass::SassExtensions::Functions::CrossBrowserSupport
+ # Check if any of the arguments passed require a vendor prefix.
+ def prefixed(prefix, *args)
+ aspect = prefix.value.sub(/^-/,"")
+ needed = args.any?{|a| a.respond_to?(:supports?) && a.supports?(aspect)}
+ Sass::Script::Bool.new(needed)
+ end
+
+ %w(webkit moz o ms svg pie css2).each do |prefix|
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
+ # Syntactic sugar to apply the given prefix
+ # -moz($arg) is the same as calling prefix(-moz, $arg)
+ def _#{prefix}(*args)
+ prefix("#{prefix}", *args)
+ end
+ RUBY
+ end
+
+ def prefix(prefix, *objects)
+ prefix = prefix.value if prefix.is_a?(Sass::Script::String)
+ prefix = prefix[1..-1] if prefix[0] == ?-
+ if objects.size > 1
+ self.prefix(prefix, Sass::Script::List.new(objects, :comma))
+ else
+ object = objects.first
+ if object.is_a?(Sass::Script::List)
+ Sass::Script::List.new(object.value.map{|e|
+ self.prefix(prefix, e)
+ }, object.separator)
+ elsif object.respond_to?(:supports?) && object.supports?(prefix) && object.respond_to?(:"to_#{prefix}")
+ object.options = options
+ object.send(:"to_#{prefix}")
+ else
+ object
+ end
+ end
+ end
+
+end
diff --git a/lib/compass/sass_extensions/functions/gradient_support.rb b/lib/compass/sass_extensions/functions/gradient_support.rb
index ee3d27d3..1aadd511 100644
--- a/lib/compass/sass_extensions/functions/gradient_support.rb
+++ b/lib/compass/sass_extensions/functions/gradient_support.rb
@@ -1,322 +1,6 @@
module Compass::SassExtensions::Functions::GradientSupport
- module ListFreeSassSupport
- class List < Sass::Script::Literal
- attr_accessor :values
- def children
- values
- end
- def value
- # duck type to a Sass List
- values
- end
- def initialize(*values)
- self.values = values
- end
- def join_with
- ", "
- end
- def inspect
- to_s
- end
- def to_s(options = self.options)
- values.map {|v| v.to_s }.join(join_with)
- end
- def size
- values.size
- end
- end
-
- class SpaceList < List
- def join_with
- " "
- end
- end
-
- # given a position list, return a corresponding position in percents
- def grad_point(position)
- position = position.is_a?(Sass::Script::String) ? position.value : position.to_s
- position = if position[" "]
- if position =~ /(top|bottom|center) (left|right|center)/
- "#{$2} #{$1}"
- else
- position
- end
- else
- case position
- when /top|bottom/
- "center #{position}"
- when /left|right/
- "#{position} center"
- when /center/
- "center center"
- else
- "#{position} center"
- end
- end
- position = position.
- gsub(/top/, "0%").
- gsub(/bottom/, "100%").
- gsub(/left/,"0%").
- gsub(/right/,"100%").
- gsub(/center/, "50%")
- SpaceList.new(*position.split(/ /).map{|s| Sass::Script::String.new(s)})
- end
-
- def color_stops(*args)
- List.new(*args.map do |arg|
- case arg
- when ColorStop
- arg
- when Sass::Script::Color
- ColorStop.new(arg)
- when Sass::Script::String
- # We get a string as the result of concatenation
- # So we have to reparse the expression
- parse_color_stop(arg)
- else
- raise Sass::SyntaxError, "Not a valid color stop: #{arg.class.name}: #{arg}"
- end
- end)
- end
-
- # Returns a comma-delimited list after removing any non-true values
- def compact(*args)
- List.new(*args.reject{|a| !a.to_bool})
- end
-
- # Returns a list object from a value that was passed.
- # This can be used to unpack a space separated list that got turned
- # into a string by sass before it was passed to a mixin.
- def _compass_list(arg)
- return arg if arg.is_a?(List)
- values = case arg
- when Sass::Script::String
- expr = Sass::Script::Parser.parse(arg.value, 0, 0)
- if expr.is_a?(Sass::Script::Operation)
- extract_list_values(expr)
- elsif expr.is_a?(Sass::Script::Funcall)
- expr.perform(Sass::Environment.new) #we already evaluated the args in context so no harm in using a fake env
- else
- [arg]
- end
- else
- [arg]
- end
-
- SpaceList.new(*values)
- end
-
- def _compass_space_list(list)
- if list.is_a?(List) && !list.is_a?(SpaceList)
- SpaceList.new(*list.values)
- elsif list.is_a?(SpaceList)
- list
- else
- SpaceList.new(list)
- end
- end
-
- def _compass_list_size(list)
- Sass::Script::Number.new(list.size)
- end
-
- # slice a sublist from a list
- def _compass_slice(list, start_index, end_index = nil)
- end_index ||= Sass::Script::Number.new(-1)
- start_index = start_index.value
- end_index = end_index.value
- start_index -= 1 unless start_index < 0
- end_index -= 1 unless end_index < 0
- list.class.new *list.values[start_index..end_index]
- end
-
- # Check if any of the arguments passed have a tendency towards vendor prefixing.
- def prefixed(prefix, *args)
- method = prefix.value.sub(/^-/,"to_").to_sym
- args.map!{|a| a.is_a?(List) ? a.values : a}.flatten!
- Sass::Script::Bool.new(args.any?{|a| a.respond_to?(method)})
- end
-
- %w(webkit moz o ms svg pie css2).each do |prefix|
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
- def _#{prefix}(*args)
- List.new(*args.map! {|a| add_prefix(:to_#{prefix}, a)})
- end
- RUBY
- end
-
- protected
-
- def add_prefix(prefix_method, object)
- if object.is_a?(List)
- object.class.new(object.value.map{|e|
- add_prefix(prefix_method, e)
- })
- elsif object.respond_to?(prefix_method)
- object.options = options
- object.send(prefix_method)
- else
- object
- end
- end
-
- def color_stop?(arg)
- parse_color_stop(arg)
- rescue
- nil
- end
-
- def assert_list(value)
- unless value.is_a?(List)
- raise ArgumentError.new("#{value.inspect} is not a list")
- end
- end
-
- end
-
- module ListBasedSassSupport
- # given a position list, return a corresponding position in percents
- def grad_point(position)
- position = unless position.is_a?(Sass::Script::List)
- Sass::Script::List.new([position], :space)
- else
- Sass::Script::List.new(position.value.dup, position.separator)
- end
- position.value.reject!{|p| p.is_a?(Sass::Script::Number) && p.numerator_units.include?("deg")}
- if (position.value.first.value =~ /top|bottom/) or (position.value.last.value =~ /left|right/)
- # browsers are pretty forgiving of reversed positions so we are too.
- position.value.reverse!
- end
- if position.value.size == 1
- if position.value.first.value =~ /top|bottom/
- position.value.unshift Sass::Script::String.new("center")
- elsif position.value.first.value =~ /left|right/
- position.value.push Sass::Script::String.new("center")
- end
- end
- position.value.map! do |p|
- case p.value
- when /top|left/
- Sass::Script::Number.new(0, ["%"])
- when /bottom|right/
- Sass::Script::Number.new(100, ["%"])
- when /center/
- Sass::Script::Number.new(50, ["%"])
- else
- p
- end
- end
- position
- end
-
- def color_stops(*args)
- Sass::Script::List.new(args.map do |arg|
- case arg
- when ColorStop
- arg
- when Sass::Script::Color
- ColorStop.new(arg)
- when Sass::Script::List
- ColorStop.new(*arg.value)
- else
- raise Sass::SyntaxError, "Not a valid color stop: #{arg.class.name}: #{arg}"
- end
- end, :comma)
- end
-
- # Returns a comma-delimited list after removing any non-true values
- def compact(*args)
- sep = :comma
- if args.size == 1 && args.first.is_a?(Sass::Script::List)
- args = args.first.value
- sep = args.first.separator
- end
- Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
- end
-
- # Returns a list object from a value that was passed.
- # This can be used to unpack a space separated list that got turned
- # into a string by sass before it was passed to a mixin.
- def _compass_list(arg)
- if arg.is_a?(Sass::Script::List)
- Sass::Script::List.new(arg.value.dup, arg.separator)
- else
- Sass::Script::List.new([arg], :space)
- end
- end
-
- def _compass_space_list(list)
- if list.is_a?(Sass::Script::List)
- Sass::Script::List.new(list.value.dup, :space)
- else
- Sass::Script::List.new([list], :space)
- end
- end
-
- def _compass_list_size(list)
- assert_list list
- Sass::Script::Number.new(list.value.size)
- end
-
- # slice a sublist from a list
- def _compass_slice(list, start_index, end_index = nil)
- end_index ||= Sass::Script::Number.new(-1)
- start_index = start_index.value
- end_index = end_index.value
- start_index -= 1 unless start_index < 0
- end_index -= 1 unless end_index < 0
- Sass::Script::List.new list.values[start_index..end_index], list.separator
- end
-
- # Check if any of the arguments passed have a tendency towards vendor prefixing.
- def prefixed(prefix, *args)
- method = prefix.value.sub(/^-/,"to_").to_sym
- 2.times do
- args.map!{|a| a.is_a?(Sass::Script::List) ? a.value : a}.flatten!
- end
- Sass::Script::Bool.new(args.any?{|a| a.respond_to?(method)})
- end
-
- %w(webkit moz o ms svg pie css2).each do |prefix|
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
- def _#{prefix}(*args)
- Sass::Script::List.new(args.map! {|a| add_prefix(:to_#{prefix}, a)}, :comma)
- end
- RUBY
- end
-
- protected
-
- def add_prefix(prefix_method, object)
- if object.is_a?(Sass::Script::List)
- Sass::Script::List.new(object.value.map{|e|
- add_prefix(prefix_method, e)
- }, object.separator)
- elsif object.respond_to?(prefix_method)
- object.options = options
- object.send(prefix_method)
- else
- object
- end
- end
-
- def color_stop?(arg)
- arg.is_a?(ColorStop) ||
- (arg.is_a?(Sass::Script::List) && ColorStop.new(*arg.value)) ||
- ColorStop.new(arg)
- rescue
- nil
- end
-
- def assert_list(value)
- unless value.is_a?(Sass::Script::List)
- raise ArgumentError.new("#{value.inspect} is not a list")
- end
- end
-
- end
-
+ GRADIENT_ASPECTS = %w(webkit moz svg pie css2).freeze
class ColorStop < Sass::Script::Literal
attr_accessor :color, :stop
@@ -372,6 +56,12 @@ module Compass::SassExtensions::Functions::GradientSupport
s << color_stops.to_s(options)
s << ")"
end
+ def supports?(aspect)
+ GRADIENT_ASPECTS.include?(aspect)
+ end
+ def has_aspect?
+ true
+ end
def to_webkit(options = self.options)
args = [
grad_point(position_and_angle || _center_position),
@@ -421,6 +111,12 @@ module Compass::SassExtensions::Functions::GradientSupport
s << color_stops.to_s(options)
s << ")"
end
+ def supports?(aspect)
+ GRADIENT_ASPECTS.include?(aspect)
+ end
+ def has_aspect?
+ true
+ end
def to_webkit(options = self.options)
args = []
args << grad_point(position_and_angle || Sass::Script::String.new("top"))
@@ -447,11 +143,53 @@ module Compass::SassExtensions::Functions::GradientSupport
module Functions
- # While supporting sass 3.1 and older versions, we need two different implementations.
- if defined?(Sass::Script::List)
- include ListBasedSassSupport
- else
- include ListFreeSassSupport
+ # given a position list, return a corresponding position in percents
+ def grad_point(position)
+ position = unless position.is_a?(Sass::Script::List)
+ Sass::Script::List.new([position], :space)
+ else
+ Sass::Script::List.new(position.value.dup, position.separator)
+ end
+ position.value.reject!{|p| p.is_a?(Sass::Script::Number) && p.numerator_units.include?("deg")}
+ if (position.value.first.value =~ /top|bottom/) or (position.value.last.value =~ /left|right/)
+ # browsers are pretty forgiving of reversed positions so we are too.
+ position.value.reverse!
+ end
+ if position.value.size == 1
+ if position.value.first.value =~ /top|bottom/
+ position.value.unshift Sass::Script::String.new("center")
+ elsif position.value.first.value =~ /left|right/
+ position.value.push Sass::Script::String.new("center")
+ end
+ end
+ position.value.map! do |p|
+ case p.value
+ when /top|left/
+ Sass::Script::Number.new(0, ["%"])
+ when /bottom|right/
+ Sass::Script::Number.new(100, ["%"])
+ when /center/
+ Sass::Script::Number.new(50, ["%"])
+ else
+ p
+ end
+ end
+ position
+ end
+
+ def color_stops(*args)
+ Sass::Script::List.new(args.map do |arg|
+ case arg
+ when ColorStop
+ arg
+ when Sass::Script::Color
+ ColorStop.new(arg)
+ when Sass::Script::List
+ ColorStop.new(*arg.value)
+ else
+ raise Sass::SyntaxError, "Not a valid color stop: #{arg.class.name}: #{arg}"
+ end
+ end, :comma)
end
def radial_gradient(position_and_angle, shape_and_size, *color_stops)
@@ -508,7 +246,7 @@ module Compass::SassExtensions::Functions::GradientSupport
end
def color_stops_in_percentages(color_list)
- assert_list(color_list)
+ assert_type color_list, :List
color_list = normalize_stops(color_list)
max = color_list.value.last.stop
last_value = nil
@@ -527,13 +265,13 @@ module Compass::SassExtensions::Functions::GradientSupport
# returns the end position of the gradient from the color stop
def grad_end_position(color_list, radial = Sass::Script::Bool.new(false))
- assert_list(color_list)
+ assert_type color_list, :List
default = Sass::Script::Number.new(100)
grad_position(color_list, Sass::Script::Number.new(color_list.value.size), default, radial)
end
def grad_position(color_list, index, default, radial = Sass::Script::Bool.new(false))
- assert_list(color_list)
+ assert_type color_list, :List
stop = color_list.value[index.value - 1].stop
if stop && radial.to_bool
orig_stop = stop
@@ -576,55 +314,16 @@ module Compass::SassExtensions::Functions::GradientSupport
inline_image_string(svg.gsub(/\s+/, ' '), 'image/svg+xml')
end
- # Get the nth value from a list
- def _compass_nth(list, place)
- assert_list list
- if place.value == "first"
- list.value.first
- elsif place.value == "last"
- list.value.last
- else
- list.value[place.value - 1]
- end
- end
-
- def blank(obj)
- case obj
- when Sass::Script::Bool
- Sass::Script::Bool.new !obj.to_bool
- when Sass::Script::String
- Sass::Script::Bool.new obj.value.strip.size == 0
- when Sass::Script::List
- Sass::Script::Bool.new obj.value.size == 0 || obj.value.all?{|el| blank(el).to_bool}
- else
- Sass::Script::Bool.new false
- end
- end
-
private
- # After using the sass script parser to parse a string, this reconstructs
- # a list from operands to the space/concat operation
- def extract_list_values(operation)
- left = operation.instance_variable_get("@operand1")
- right = operation.instance_variable_get("@operand2")
- left = extract_list_values(left) if left.is_a?(Sass::Script::Operation)
- right = extract_list_values(right) if right.is_a?(Sass::Script::Operation)
- left = literalize(left) unless left.is_a?(Array)
- right = literalize(right) unless right.is_a?(Array)
- Array(left) + Array(right)
- end
- # Makes a literal from other various script nodes.
- def literalize(node)
- case node
- when Sass::Script::Literal
- node
- when Sass::Script::Funcall
- node.perform(Sass::Environment.new)
- else
- Sass::Script::String.new(node.to_s)
- end
+ def color_stop?(arg)
+ arg.is_a?(ColorStop) ||
+ (arg.is_a?(Sass::Script::List) && ColorStop.new(*arg.value)) ||
+ ColorStop.new(arg)
+ rescue
+ nil
end
+
def normalize_stops(color_list)
positions = color_list.value.map{|obj| obj.dup}
# fill in the start and end positions, if unspecified
@@ -715,23 +414,32 @@ EOS
end
def _center_position
- if defined?(Sass::Script::List)
- Sass::Script::List.new([
- Sass::Script::String.new("center"),
- Sass::Script::String.new("center")
- ],:space)
- else
- Sass::Script::String.new("center center")
- end
+ Sass::Script::List.new([
+ Sass::Script::String.new("center"),
+ Sass::Script::String.new("center")
+ ],:space)
end
end
+
+ module Assertions
+ def assert_type(value, type, name = nil)
+ return if value.is_a?(Sass::Script.const_get(type))
+ err = "#{value.inspect} is not a #{type.to_s.downcase}"
+ err = "$#{name}: " + err if name
+ raise ArgumentError.new(err)
+ end
+ end
+
class LinearGradient < Sass::Script::Literal
+ include Assertions
include Functions
include Compass::SassExtensions::Functions::Constants
include Compass::SassExtensions::Functions::InlineImage
end
+
class RadialGradient < Sass::Script::Literal
+ include Assertions
include Functions
include Compass::SassExtensions::Functions::Constants
include Compass::SassExtensions::Functions::InlineImage
diff --git a/lib/compass/sass_extensions/functions/lists.rb b/lib/compass/sass_extensions/functions/lists.rb
index 5b1a7e53..e82a6757 100644
--- a/lib/compass/sass_extensions/functions/lists.rb
+++ b/lib/compass/sass_extensions/functions/lists.rb
@@ -1,4 +1,79 @@
module Compass::SassExtensions::Functions::Lists
+
+ # Returns true when the object is false, an empty string, or an empty list
+ def blank(obj)
+ case obj
+ when Sass::Script::Bool
+ Sass::Script::Bool.new !obj.to_bool
+ when Sass::Script::String
+ Sass::Script::Bool.new obj.value.strip.size == 0
+ when Sass::Script::List
+ Sass::Script::Bool.new obj.value.size == 0 || obj.value.all?{|el| blank(el).to_bool}
+ else
+ Sass::Script::Bool.new false
+ end
+ end
+
+ # Returns a new list after removing any non-true values
+ def compact(*args)
+ sep = :comma
+ if args.size == 1 && args.first.is_a?(Sass::Script::List)
+ args = args.first.value
+ sep = args.first.separator
+ end
+ Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
+ end
+
+ # Get the nth value from a list
+ def _compass_nth(list, place)
+ assert_type list, :List
+ if place.value == "first"
+ list.value.first
+ elsif place.value == "last"
+ list.value.last
+ else
+ list.value[place.value - 1]
+ end
+ end
+
+ # Returns a list object from a value that was passed.
+ # This can be used to unpack a space separated list that got turned
+ # into a string by sass before it was passed to a mixin.
+ def _compass_list(arg)
+ if arg.is_a?(Sass::Script::List)
+ Sass::Script::List.new(arg.value.dup, arg.separator)
+ else
+ Sass::Script::List.new([arg], :space)
+ end
+ end
+
+ # If the argument is a list, it will return a new list that is space delimited
+ # Otherwise it returns a new, single element, space-delimited list.
+ def _compass_space_list(list)
+ if list.is_a?(Sass::Script::List)
+ Sass::Script::List.new(list.value.dup, :space)
+ else
+ Sass::Script::List.new([list], :space)
+ end
+ end
+
+ # Returns the size of the list.
+ def _compass_list_size(list)
+ assert_list list
+ Sass::Script::Number.new(list.value.size)
+ end
+
+ # slice a sublist from a list
+ def _compass_slice(list, start_index, end_index = nil)
+ end_index ||= Sass::Script::Number.new(-1)
+ start_index = start_index.value
+ end_index = end_index.value
+ start_index -= 1 unless start_index < 0
+ end_index -= 1 unless end_index < 0
+ Sass::Script::List.new list.values[start_index..end_index], list.separator
+ end
+
+ # returns the first value of a space delimited list.
def first_value_of(list)
if list.is_a?(Sass::Script::String)
Sass::Script::String.new(list.value.split(/\s+/).first)
@@ -8,4 +83,13 @@ module Compass::SassExtensions::Functions::Lists
list
end
end
+
+ protected
+
+ def assert_list(value)
+ unless value.is_a?(Sass::Script::List)
+ raise ArgumentError.new("#{value.inspect} is not a list")
+ end
+ end
+
end
diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb
index b660514a..7df04e20 100644
--- a/lib/compass/sass_extensions/functions/sprites.rb
+++ b/lib/compass/sass_extensions/functions/sprites.rb
@@ -331,7 +331,7 @@ module Compass::SassExtensions::Functions::Sprites
if offset_x.unit_str == "%"
x = offset_x # CE: Shouldn't this be a percentage of the total width?
else
- x = offset_x.value + image[:left]
+ x = offset_x.value - image[:left]
x = Sass::Script::Number.new(x, x == 0 ? [] : ["px"])
end
y = offset_y.value - image[:top]
diff --git a/lib/compass/sass_extensions/monkey_patches.rb b/lib/compass/sass_extensions/monkey_patches.rb
index f0c04196..9762ac31 100644
--- a/lib/compass/sass_extensions/monkey_patches.rb
+++ b/lib/compass/sass_extensions/monkey_patches.rb
@@ -1,3 +1,3 @@
-%w(traversal).each do |patch|
+%w(traversal browser_support).each do |patch|
require "compass/sass_extensions/monkey_patches/#{patch}"
end
diff --git a/lib/compass/sass_extensions/monkey_patches/browser_support.rb b/lib/compass/sass_extensions/monkey_patches/browser_support.rb
new file mode 100644
index 00000000..c1b55e58
--- /dev/null
+++ b/lib/compass/sass_extensions/monkey_patches/browser_support.rb
@@ -0,0 +1,89 @@
+require 'sass/script/node'
+require 'sass/script/literal'
+require 'sass/script/funcall'
+
+module Sass::Script
+ module HasSimpleCrossBrowserFunctionSupport
+ def supports?(aspect)
+ return true if Compass::BrowserSupport.supports?(name, aspect)
+ children.any? {|child| child.respond_to?(:supports?) && child.supports?(aspect) }
+ end
+
+ def has_aspect?(children = nil)
+ children ||= self.children
+ return true if Compass::BrowserSupport.has_aspect?(name)
+ children.any? {|child| child.respond_to?(:has_aspect?) && child.has_aspect? }
+ end
+ end
+
+ class CrossBrowserFunctionCall < Literal
+
+ attr_accessor :name, :args
+
+ include HasSimpleCrossBrowserFunctionSupport
+
+ def initialize(name, args)
+ self.name = name
+ self.args = args
+ end
+
+ def children
+ args
+ end
+
+ def inspect
+ to_s
+ end
+
+ def to_s(options = self.options)
+ s = "#{name}(#{args.join(", ")})"
+ end
+
+ %w(webkit moz o ms svg pie css2).each do |prefix|
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
+ def to_#{prefix}(options = self.options)
+ prefixed_args = args.map do |arg|
+ arg.respond_to?(:to_#{prefix}) ? arg.to_#{prefix}(options) : arg
+ end
+ prefixed_name = if Compass::BrowserSupport.supports?(name, "#{prefix}")
+ "-#{prefix}-\#{name}"
+ else
+ name
+ end
+ contents = prefixed_args.join(', ')
+ if contents.size > 0
+ opts(Sass::Script::String.new("\#{prefixed_name}(\#{contents})"))
+ else
+ opts(Sass::Script::String.new(""))
+ end
+ end
+ RUBY
+ end
+
+ end
+
+ class Funcall < Node
+ include HasSimpleCrossBrowserFunctionSupport
+
+ alias sass_to_literal to_literal
+
+ def to_literal(args)
+ if has_aspect?(args)
+ CrossBrowserFunctionCall.new(name, args)
+ else
+ sass_to_literal(args)
+ end
+ end
+ end
+
+ class List < Literal
+ def supports?(aspect)
+ children.any? {|child| child.respond_to?(:supports?) && child.supports?(aspect) }
+ end
+
+ def has_aspect?
+ children.any? {|child| child.respond_to?(:has_aspect?) && child.has_aspect? }
+ end
+ end
+
+end
diff --git a/lib/compass/sprites.rb b/lib/compass/sprites.rb
index 2d5d0bf7..707d9bdb 100644
--- a/lib/compass/sprites.rb
+++ b/lib/compass/sprites.rb
@@ -88,13 +88,13 @@ end.join(",\n")});
@include sprite($#{name}-sprites, $name, $dimensions, $offset-x, $offset-y)
}
-@mixin #{name}-sprites($sprite-names, $dimensions: $#{name}-sprite-dimensions) {
- @include sprites($#{name}-sprites, $sprite-names, $#{name}-sprite-base-class, $dimensions)
+@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) {
- @include #{name}-sprites(#{images.join(" ")}, $dimensions);
+@mixin all-#{name}-sprites($dimensions: $#{name}-sprite-dimensions, $prefix: sprite-map-name($#{name}-sprites)) {
+ @include #{name}-sprites(#{images.join(" ")}, $dimensions, $prefix);
}
SCSS
end
diff --git a/spec/sprites_spec.rb b/spec/sprites_spec.rb
index 331729d7..ee26a915 100644
--- a/spec/sprites_spec.rb
+++ b/spec/sprites_spec.rb
@@ -277,7 +277,7 @@ describe Compass::Sprites do
}
.adjusted-px-1 {
- background-position: 14px 0;
+ background-position: -6px 0;
}
.adjusted-px-2 {
@@ -315,7 +315,7 @@ describe Compass::Sprites do
}
.adjusted-px-1 {
- background-position: 14px 0;
+ background-position: -6px 0;
}
.adjusted-px-2 {
@@ -362,11 +362,11 @@ describe Compass::Sprites do
}
.squares-ten-by-ten {
- background-position: 10px 0;
+ background-position: -10px 0;
}
.squares-twenty-by-twenty {
- background-position: 10px -10px;
+ background-position: -10px -10px;
}
CSS
image_size('squares-*.png').should == [30, 30]
diff --git a/test/fixtures/stylesheets/blueprint/css/screen.css b/test/fixtures/stylesheets/blueprint/css/screen.css
index 8f301369..db7e3410 100644
--- a/test/fixtures/stylesheets/blueprint/css/screen.css
+++ b/test/fixtures/stylesheets/blueprint/css/screen.css
@@ -315,53 +315,53 @@ caption {
margin: 0; }
input.span-1, textarea.span-1, select.span-1 {
- width: 30px !important; }
+ width: 30px; }
input.span-2, textarea.span-2, select.span-2 {
- width: 70px !important; }
+ width: 70px; }
input.span-3, textarea.span-3, select.span-3 {
- width: 110px !important; }
+ width: 110px; }
input.span-4, textarea.span-4, select.span-4 {
- width: 150px !important; }
+ width: 150px; }
input.span-5, textarea.span-5, select.span-5 {
- width: 190px !important; }
+ width: 190px; }
input.span-6, textarea.span-6, select.span-6 {
- width: 230px !important; }
+ width: 230px; }
input.span-7, textarea.span-7, select.span-7 {
- width: 270px !important; }
+ width: 270px; }
input.span-8, textarea.span-8, select.span-8 {
- width: 310px !important; }
+ width: 310px; }
input.span-9, textarea.span-9, select.span-9 {
- width: 350px !important; }
+ width: 350px; }
input.span-10, textarea.span-10, select.span-10 {
- width: 390px !important; }
+ width: 390px; }
input.span-11, textarea.span-11, select.span-11 {
- width: 430px !important; }
+ width: 430px; }
input.span-12, textarea.span-12, select.span-12 {
- width: 470px !important; }
+ width: 470px; }
input.span-13, textarea.span-13, select.span-13 {
- width: 510px !important; }
+ width: 510px; }
input.span-14, textarea.span-14, select.span-14 {
- width: 550px !important; }
+ width: 550px; }
input.span-15, textarea.span-15, select.span-15 {
- width: 590px !important; }
+ width: 590px; }
input.span-16, textarea.span-16, select.span-16 {
- width: 630px !important; }
+ width: 630px; }
input.span-17, textarea.span-17, select.span-17 {
- width: 670px !important; }
+ width: 670px; }
input.span-18, textarea.span-18, select.span-18 {
- width: 710px !important; }
+ width: 710px; }
input.span-19, textarea.span-19, select.span-19 {
- width: 750px !important; }
+ width: 750px; }
input.span-20, textarea.span-20, select.span-20 {
- width: 790px !important; }
+ width: 790px; }
input.span-21, textarea.span-21, select.span-21 {
- width: 830px !important; }
+ width: 830px; }
input.span-22, textarea.span-22, select.span-22 {
- width: 870px !important; }
+ width: 870px; }
input.span-23, textarea.span-23, select.span-23 {
- width: 910px !important; }
+ width: 910px; }
input.span-24, textarea.span-24, select.span-24 {
- width: 950px !important; }
+ width: 950px; }
.append-1 {
padding-right: 40px; }
diff --git a/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css b/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css
index a0174227..e017275e 100644
--- a/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css
+++ b/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css
@@ -88,53 +88,53 @@
margin: 0; }
input.span-1, textarea.span-1, select.span-1 {
- width: 30px !important; }
+ width: 30px; }
input.span-2, textarea.span-2, select.span-2 {
- width: 70px !important; }
+ width: 70px; }
input.span-3, textarea.span-3, select.span-3 {
- width: 110px !important; }
+ width: 110px; }
input.span-4, textarea.span-4, select.span-4 {
- width: 150px !important; }
+ width: 150px; }
input.span-5, textarea.span-5, select.span-5 {
- width: 190px !important; }
+ width: 190px; }
input.span-6, textarea.span-6, select.span-6 {
- width: 230px !important; }
+ width: 230px; }
input.span-7, textarea.span-7, select.span-7 {
- width: 270px !important; }
+ width: 270px; }
input.span-8, textarea.span-8, select.span-8 {
- width: 310px !important; }
+ width: 310px; }
input.span-9, textarea.span-9, select.span-9 {
- width: 350px !important; }
+ width: 350px; }
input.span-10, textarea.span-10, select.span-10 {
- width: 390px !important; }
+ width: 390px; }
input.span-11, textarea.span-11, select.span-11 {
- width: 430px !important; }
+ width: 430px; }
input.span-12, textarea.span-12, select.span-12 {
- width: 470px !important; }
+ width: 470px; }
input.span-13, textarea.span-13, select.span-13 {
- width: 510px !important; }
+ width: 510px; }
input.span-14, textarea.span-14, select.span-14 {
- width: 550px !important; }
+ width: 550px; }
input.span-15, textarea.span-15, select.span-15 {
- width: 590px !important; }
+ width: 590px; }
input.span-16, textarea.span-16, select.span-16 {
- width: 630px !important; }
+ width: 630px; }
input.span-17, textarea.span-17, select.span-17 {
- width: 670px !important; }
+ width: 670px; }
input.span-18, textarea.span-18, select.span-18 {
- width: 710px !important; }
+ width: 710px; }
input.span-19, textarea.span-19, select.span-19 {
- width: 750px !important; }
+ width: 750px; }
input.span-20, textarea.span-20, select.span-20 {
- width: 790px !important; }
+ width: 790px; }
input.span-21, textarea.span-21, select.span-21 {
- width: 830px !important; }
+ width: 830px; }
input.span-22, textarea.span-22, select.span-22 {
- width: 870px !important; }
+ width: 870px; }
input.span-23, textarea.span-23, select.span-23 {
- width: 910px !important; }
+ width: 910px; }
input.span-24, textarea.span-24, select.span-24 {
- width: 950px !important; }
+ width: 950px; }
.append-1 {
padding-right: 40px; }
diff --git a/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css b/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css
index a49ae0ce..c8b84ff6 100644
--- a/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css
+++ b/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css
@@ -90,53 +90,53 @@
margin: 0; }
input.span-1, textarea.span-1, select.span-1 {
- width: 30px !important; }
+ width: 30px; }
input.span-2, textarea.span-2, select.span-2 {
- width: 70px !important; }
+ width: 70px; }
input.span-3, textarea.span-3, select.span-3 {
- width: 110px !important; }
+ width: 110px; }
input.span-4, textarea.span-4, select.span-4 {
- width: 150px !important; }
+ width: 150px; }
input.span-5, textarea.span-5, select.span-5 {
- width: 190px !important; }
+ width: 190px; }
input.span-6, textarea.span-6, select.span-6 {
- width: 230px !important; }
+ width: 230px; }
input.span-7, textarea.span-7, select.span-7 {
- width: 270px !important; }
+ width: 270px; }
input.span-8, textarea.span-8, select.span-8 {
- width: 310px !important; }
+ width: 310px; }
input.span-9, textarea.span-9, select.span-9 {
- width: 350px !important; }
+ width: 350px; }
input.span-10, textarea.span-10, select.span-10 {
- width: 390px !important; }
+ width: 390px; }
input.span-11, textarea.span-11, select.span-11 {
- width: 430px !important; }
+ width: 430px; }
input.span-12, textarea.span-12, select.span-12 {
- width: 470px !important; }
+ width: 470px; }
input.span-13, textarea.span-13, select.span-13 {
- width: 510px !important; }
+ width: 510px; }
input.span-14, textarea.span-14, select.span-14 {
- width: 550px !important; }
+ width: 550px; }
input.span-15, textarea.span-15, select.span-15 {
- width: 590px !important; }
+ width: 590px; }
input.span-16, textarea.span-16, select.span-16 {
- width: 630px !important; }
+ width: 630px; }
input.span-17, textarea.span-17, select.span-17 {
- width: 670px !important; }
+ width: 670px; }
input.span-18, textarea.span-18, select.span-18 {
- width: 710px !important; }
+ width: 710px; }
input.span-19, textarea.span-19, select.span-19 {
- width: 750px !important; }
+ width: 750px; }
input.span-20, textarea.span-20, select.span-20 {
- width: 790px !important; }
+ width: 790px; }
input.span-21, textarea.span-21, select.span-21 {
- width: 830px !important; }
+ width: 830px; }
input.span-22, textarea.span-22, select.span-22 {
- width: 870px !important; }
+ width: 870px; }
input.span-23, textarea.span-23, select.span-23 {
- width: 910px !important; }
+ width: 910px; }
input.span-24, textarea.span-24, select.span-24 {
- width: 950px !important; }
+ width: 950px; }
.append-1 {
padding-left: 40px; }
diff --git a/test/fixtures/stylesheets/compass/css/gradients.css b/test/fixtures/stylesheets/compass/css/gradients.css
index 60f1cdba..c3586f46 100644
--- a/test/fixtures/stylesheets/compass/css/gradients.css
+++ b/test/fixtures/stylesheets/compass/css/gradients.css
@@ -96,6 +96,21 @@
background-image: -moz-radial-gradient(#dddddd, #aaaaaa 100px);
background-image: radial-gradient(#dddddd, #aaaaaa 100px); }
+.image-fallback {
+ background-image: image(-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)), url('/images/4x6.png?busted=true'), #cc0000);
+ background-image: image(-moz-radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true'), #cc0000);
+ background-image: image(radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true'), #cc0000); }
+
+.cross-fade {
+ background-image: cross-fade(-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)), url('/images/4x6.png?busted=true'));
+ background-image: cross-fade(-moz-radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true'));
+ background-image: cross-fade(radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true')); }
+
+.unknown-function-wrapper {
+ background: foo(-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 100, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)));
+ background: foo(-moz-radial-gradient(#dddddd, #aaaaaa 100px));
+ background: foo(radial-gradient(#dddddd, #aaaaaa 100px)); }
+
.linear-1 {
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa));
background-image: -moz-linear-gradient(top, #dddddd, #aaaaaa);
diff --git a/test/fixtures/stylesheets/compass/css/pie.css b/test/fixtures/stylesheets/compass/css/pie.css
index d7898353..c911df07 100644
--- a/test/fixtures/stylesheets/compass/css/pie.css
+++ b/test/fixtures/stylesheets/compass/css/pie.css
@@ -1,4 +1,3 @@
-@charset "UTF-8";
.pie-element, .bordered, .gradient {
behavior: url('/tmp/PIE.htc');
position: relative; }
diff --git a/test/fixtures/stylesheets/compass/sass/gradients.sass b/test/fixtures/stylesheets/compass/sass/gradients.sass
index 8c8a656c..fd0ec96a 100644
--- a/test/fixtures/stylesheets/compass/sass/gradients.sass
+++ b/test/fixtures/stylesheets/compass/sass/gradients.sass
@@ -58,6 +58,15 @@ $experimental-support-for-svg: false
.bg-radial-gradient-no-position
+background-image(radial-gradient(#ddd, #aaa 100px))
+.image-fallback
+ +background-image(image(radial-gradient(#ddd, #aaa 100px), image-url("4x6.png"), #c00))
+
+.cross-fade
+ +background-image(cross-fade(radial-gradient(#ddd, #aaa 100px), image-url("4x6.png")))
+
+.unknown-function-wrapper
+ +background(foo(radial-gradient(#ddd, #aaa 100px)))
+
.linear-1
+linear-gradient(color-stops(#dddddd, #aaaaaa))