Merge branch 'stable'

Conflicts:
	VERSION.yml
	doc-src/content/CHANGELOG.markdown
	lib/compass/configuration/helpers.rb
	test/units/sass_extensions_test.rb
This commit is contained in:
Chris Eppstein 2011-12-23 17:16:44 -08:00
commit c4e9d00d61
5 changed files with 25 additions and 9 deletions

View File

@ -2,5 +2,5 @@
:major: 0 :major: 0
:minor: 12 :minor: 12
:state: alpha :state: alpha
:build: 2 :build: 3
:name: Alnilam :name: Alnilam

View File

@ -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 `generated-image-url()` helper function. These should rarely be needed and
will default to your corresponding image directories and paths. 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. * 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) 0.11.5 (07/10/2011)
------------------- -------------------

View File

@ -91,11 +91,11 @@
// Border image property support for vendor prefixing properties and values. // Border image property support for vendor prefixing properties and values.
@mixin border-image($value) { @mixin border-image($value) {
@if $experimental-support-for-mozilla { -moz-border-image: -moz(-compass-list($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(-compass-list($value)); } @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); }
@if $experimental-support-for-webkit { -webkit-border-image: -webkit(-compass-list($value)); } @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
@if $experimental-support-for-opera { -o-border-image: -o(-compass-list($value)); } @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); }
@if $experimental-support-for-svg { border-image: -svg(-compass-list($value)); } @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); }
border-image: $value; border-image: $value;
} }

View File

@ -74,6 +74,11 @@ module Compass::SassExtensions::Functions::Lists
Sass::Script::List.new list.values[start_index..end_index], list.separator Sass::Script::List.new list.values[start_index..end_index], list.separator
end 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. # returns the first value of a space delimited list.
def first_value_of(list) def first_value_of(list)
if list.is_a?(Sass::Script::String) if list.is_a?(Sass::Script::String)

View File

@ -152,6 +152,10 @@ class SassExtensionsTest < Test::Unit::TestCase
Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object) Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object)
end 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 protected
def evaluate(value) def evaluate(value)