mirror of
https://github.com/zhigang1992/sass.git
synced 2026-01-12 17:52:27 +08:00
@@ -7,6 +7,8 @@
|
||||
|
||||
* Parent selectors now work in selector pseudoclasses (for example, `:not(&)`).
|
||||
|
||||
* `@for` loops no longer crash when one bound is an integer-like float.
|
||||
|
||||
## 3.4.5 (19 September 2014)
|
||||
|
||||
* Fix `sass-convert --recursive`.
|
||||
|
||||
@@ -289,7 +289,7 @@ module Sass::Script::Value
|
||||
# @raise [Sass::SyntaxError] if the number isn't an integer
|
||||
def to_i
|
||||
super unless int?
|
||||
value
|
||||
value.to_i
|
||||
end
|
||||
|
||||
# @return [Boolean] Whether or not this number is an integer.
|
||||
|
||||
@@ -3570,6 +3570,34 @@ SCSS
|
||||
|
||||
# Regression
|
||||
|
||||
def test_for_directive_with_float_bounds
|
||||
assert_equal(<<CSS, render(<<SCSS))
|
||||
.a {
|
||||
b: 0;
|
||||
b: 1;
|
||||
b: 2;
|
||||
b: 3;
|
||||
b: 4;
|
||||
b: 5; }
|
||||
CSS
|
||||
.a {
|
||||
@for $i from 0.0 through 5.0 {b: $i}
|
||||
}
|
||||
SCSS
|
||||
|
||||
assert_raise_message(Sass::SyntaxError, "0.5 is not an integer.") {render(<<SCSS)}
|
||||
.a {
|
||||
@for $i from 0.5 through 5.0 {b: $i}
|
||||
}
|
||||
SCSS
|
||||
|
||||
assert_raise_message(Sass::SyntaxError, "5.5 is not an integer.") {render(<<SCSS)}
|
||||
.a {
|
||||
@for $i from 0.0 through 5.5 {b: $i}
|
||||
}
|
||||
SCSS
|
||||
end
|
||||
|
||||
def test_parent_selector_in_function_pseudo_selector
|
||||
assert_equal <<CSS, render(<<SCSS)
|
||||
.bar:not(.foo) {
|
||||
|
||||
Reference in New Issue
Block a user