diff --git a/VERSION.yml b/VERSION.yml index c441c0f8..0ffe9867 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -2,5 +2,5 @@ :major: 0 :minor: 12 :state: alpha -:build: 2 +:build: 3 :name: Alnilam diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index 5ea39920..b1225bf8 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -61,11 +61,18 @@ The Documentation for the [latest preview release](http://beta.compass-style.org `generated-image-url()` helper function. These should rarely be needed and will default to your corresponding image directories and paths. -0.11.6 (UNRELEASED) +0.11.6 (12/23/2011) ------------------- * Added `user-select` mixin to control the selection model and granularity of an element. - It accepts one argument (`$select`) from the following options: `none` | `text` | `toggle` | `element` | `elements` | `all` | `inherit`. + It accepts one argument (`$select`) from the following options: + `none` | `text` | `toggle` | `element` | `elements` | `all` | `inherit`. +* The border-image property now takes a keyword called `fill` to + indicate that the image should also fill the element. If you pass the + `fill` keyword to the `border-image` mixin it will only be output in the + standard (non-prefixed) versions of the property. +* Don't use the deprecated callback method `on_updating_stylesheet` in Sass if + the new version is available. 0.11.5 (07/10/2011) ------------------- diff --git a/frameworks/compass/stylesheets/compass/css3/_images.scss b/frameworks/compass/stylesheets/compass/css3/_images.scss index b92ec6bd..3425b1be 100644 --- a/frameworks/compass/stylesheets/compass/css3/_images.scss +++ b/frameworks/compass/stylesheets/compass/css3/_images.scss @@ -91,12 +91,12 @@ // Border image property support for vendor prefixing properties and values. @mixin border-image($value) { - @if $experimental-support-for-mozilla { -moz-border-image: -moz(-compass-list($value)); } - @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(-compass-list($value)); } - @if $experimental-support-for-webkit { -webkit-border-image: -webkit(-compass-list($value)); } - @if $experimental-support-for-opera { -o-border-image: -o(-compass-list($value)); } - @if $experimental-support-for-svg { border-image: -svg(-compass-list($value)); } - border-image: $value; + @if $experimental-support-for-mozilla { -moz-border-image: -moz(reject(-compass-list($value), fill)); } + @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); } + @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); } + @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); } + @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); } + border-image: $value; } // List style image property support for vendor prefixing within values. diff --git a/lib/compass/sass_extensions/functions/lists.rb b/lib/compass/sass_extensions/functions/lists.rb index a9e15a0c..fd5a17ee 100644 --- a/lib/compass/sass_extensions/functions/lists.rb +++ b/lib/compass/sass_extensions/functions/lists.rb @@ -74,6 +74,11 @@ module Compass::SassExtensions::Functions::Lists Sass::Script::List.new list.values[start_index..end_index], list.separator end + # removes the given values from the list. + def reject(list, *values) + Sass::Script::List.new(list.value.reject{|v| values.any?{|o| v == o}}, list.separator) + end + # returns the first value of a space delimited list. def first_value_of(list) if list.is_a?(Sass::Script::String) diff --git a/test/units/sass_extensions_test.rb b/test/units/sass_extensions_test.rb index 5db28691..2c8fa172 100644 --- a/test/units/sass_extensions_test.rb +++ b/test/units/sass_extensions_test.rb @@ -152,6 +152,10 @@ class SassExtensionsTest < Test::Unit::TestCase Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object) end + def test_reject + assert_equal "b d", evaluate("reject(a b c d, a, c)") + assert_equal "a b c d", evaluate("reject(a b c d, e)") + end protected def evaluate(value)