@@ -309,7 +309,17 @@ public function manipulation()
309309 . "\n"
310310 . ' domain(mozilla.org), '
311311 . "\n"
312- . ' regexp("https:.*") {body {color: purple;background: yellow;}} '
312+ . ' regexp("https:.*") {/* CSS rules here apply to: '
313+ . "\n"
314+ . ' + The page "https://www.w3.org/". '
315+ . "\n"
316+ . ' + Any page whose URL begins with "https://www.w3.org/Style/" '
317+ . "\n"
318+ . ' + Any page whose URL \'s host is "mozilla.org" or ends with '
319+ . "\n"
320+ . ' ".mozilla.org" '
321+ . "\n"
322+ . ' + Any page whose URL starts with "https:" *//* make the above-mentioned pages really ugly */body {color: purple;background: yellow;}} '
313323 . "\n"
314324 . '@media screen and (orientation: landscape) {@-ms-viewport {width: 1024px;height: 768px;}} '
315325 . "\n"
@@ -348,7 +358,17 @@ public function manipulation()
348358 . "\n"
349359 . ' domain(mozilla.org), '
350360 . "\n"
351- . ' regexp("https:.*") {#my_id body {color: purple;background: yellow;}} '
361+ . ' regexp("https:.*") {/* CSS rules here apply to: '
362+ . "\n"
363+ . ' + The page "https://www.w3.org/". '
364+ . "\n"
365+ . ' + Any page whose URL begins with "https://www.w3.org/Style/" '
366+ . "\n"
367+ . ' + Any page whose URL \'s host is "mozilla.org" or ends with '
368+ . "\n"
369+ . ' ".mozilla.org" '
370+ . "\n"
371+ . ' + Any page whose URL starts with "https:" *//* make the above-mentioned pages really ugly */#my_id body {color: purple;background: yellow;}} '
352372 . "\n"
353373 . '@media screen and (orientation: landscape) {@-ms-viewport {width: 1024px;height: 768px;}} '
354374 . "\n"
@@ -532,9 +552,9 @@ public function createShorthands()
532552 public function namespaces ()
533553 {
534554 $ oDoc = $ this ->parsedStructureForFile ('namespaces ' );
535- $ sExpected = '@namespace toto "http://toto.example.org";
555+ $ sExpected = '/* From the spec at https://www.w3.org/TR/css3-namespace/ */ @namespace toto "http://toto.example.org";
536556@namespace "http://example.com/foo";
537- @namespace foo url("http://www.example.com/");
557+ /* From an introduction at https://www.blooberry.com/indexdot/css/syntax/atrules/namespace.htm */ @namespace foo url("http://www.example.com/");
538558@namespace foo url("http://www.example.com/");
539559foo|test {gaga: 1;}
540560|test {gaga: 2;} ' ;
@@ -626,9 +646,13 @@ public function selectorRemoval()
626646 public function comments ()
627647 {
628648 $ oDoc = $ this ->parsedStructureForFile ('comments ' );
629- $ sExpected = '@import url("some/url.css") screen;
630- .foo, #bar {background-color: #000;}
631- @media screen {#foo.bar {position: absolute;}} ' ;
649+ $ sExpected = <<<EXPECTED
650+ /**
651+ * Comments Hell.
652+ */@import url("some/url.css") screen;
653+ .foo, #bar {/* Number 6 */background-color: #000;}
654+ @media screen {/** Number 10 **/#foo.bar {/** Number 10b **/position: absolute;}}
655+ EXPECTED ;
632656 self ::assertSame ($ sExpected , $ oDoc ->render ());
633657 }
634658
0 commit comments