From fdb30f32790857797ae91520995b02316d2d3673 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sat, 26 Oct 2013 05:49:02 -0400
Subject: [PATCH] Fix CSS selector modifications when nested in @media blocks

---
 tests/Framework/Utils.php |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index 3f7f48c..2f4aec3 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -171,6 +171,12 @@
         $this->assertRegExp('/#rcmbody h1\s\{/', $mod, "Prefix tag styles (single)");
         $this->assertRegExp('/#rcmbody h1, #rcmbody h2, #rcmbody h3, #rcmbody textarea\s+\{/', $mod, "Prefix tag styles (multiple)");
         $this->assertRegExp('/#rcmbody \.noscript\s+\{/', $mod, "Prefix class styles");
+
+        $css = file_get_contents(TESTS_DIR . 'src/media.css');
+        $mod = rcube_utils::mod_css_styles($css, 'rcmbody');
+
+        $this->assertContains('#rcmbody table[class=w600]', $mod, 'Replace styles nested in @media block');
+        $this->assertContains('#rcmbody {width:600px', $mod, 'Replace body selector nested in @media block');
     }
 
     /**

--
Gitblit v1.9.1