test/sass/engine_test.rb in sass-3.4.19 vs test/sass/engine_test.rb in sass-3.4.20
- old
+ new
@@ -3320,9 +3320,37 @@
@import url("bar.css");
@import url("baz.css");
SASS
end
+ def test_compressed_output_of_nth_selectors
+ assert_equal(<<CSS, render(<<SASS, :syntax => :scss, :style => :compressed))
+:nth-of-type(2n-1),:nth-of-type(2n-1),:nth-of-type(2n-1),:nth-of-type(2n-1),:nth-of-type(2n-1){color:red}:nth-of-type(2n+1),:nth-of-type(2n+1),:nth-of-type(2n+1),:nth-of-type(2n+1),:nth-of-type(2n+1){color:red}
+CSS
+:nth-of-type(2n-1), :nth-of-type(2n- 1), :nth-of-type(2n -1), :nth-of-type(2n - 1), :nth-of-type( 2n - 1 ) {
+ color: red }
+:nth-of-type(2n+1), :nth-of-type(2n+ 1), :nth-of-type(2n +1), :nth-of-type(2n + 1), :nth-of-type( 2n + 1 ) {
+ color: red }
+SASS
+ end
+
+ def test_import_with_supports_clause_interp
+ assert_equal(<<CSS, render(<<'SASS', :style => :compressed))
+@import url("fallback-layout.css") supports(not (display: flex))
+CSS
+$display-type: flex
+@import url("fallback-layout.css") supports(not (display: #{$display-type}))
+SASS
+ end
+
+ def test_import_with_supports_clause
+ assert_equal(<<CSS, render(<<SASS, :style => :compressed))
+@import url("fallback-layout.css") supports(not (display: flex))
+CSS
+@import url("fallback-layout.css") supports(not (display: flex))
+SASS
+ end
+
private
def assert_hash_has(hash, expected)
expected.each {|k, v| assert_equal(v, hash[k])}
end