From fdb30f32790857797ae91520995b02316d2d3673 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 26 Oct 2013 11:49:02 +0200 Subject: Fix CSS selector modifications when nested in @media blocks --- tests/Framework/Utils.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/Framework/Utils.php') diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php index 3f7f48c3a..2f4aec32e 100644 --- a/tests/Framework/Utils.php +++ b/tests/Framework/Utils.php @@ -171,6 +171,12 @@ class Framework_Utils extends PHPUnit_Framework_TestCase $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'); } /** -- cgit v1.2.3