Permalink
Browse files

Add failing test for @media bubbling.

  • Loading branch information...
1 parent 29cf7a6 commit 68cf28ec2870c91c2eef96718d37f017ee526604 @chriseppstein committed Sep 21, 2010
Showing with 36 additions and 0 deletions.
  1. +36 −0 test/sass/scss/scss_test.rb
View
36 test/sass/scss/scss_test.rb
@@ -1023,6 +1023,42 @@ def test_no_interpolation_in_unrecognized_directives
SCSS
end
+ # XXX TODO: test several medias in the same nesting level and at different nesting levels
+ # XXX TODO: media nesting
+ def test_media_directives_bubble_up_to_the_top_level
+ assert_equal <<CSS, render(<<SCSS)
+.outside {
+ color: red; }
+
+@media print {
+ .outside {
+ color: black;
+ }
+ .outside .inside {
+ border: 1px solid black; } }
+
+.outside {
+ background: blue; }
+
+.outside .middle {
+ display: block; }
+CSS
+.outside {
+ color: red;
+ @media print {
+ color: back;
+ .inside {
+ border: 1px solid black;
+ }
+ }
+ background: blue;
+ .middle {
+ display: block;
+ }
+}
+SCSS
+ end
+
# Regression
def test_weird_added_space

0 comments on commit 68cf28e

Please sign in to comment.