@@ -309,7 +309,17 @@ public function manipulation()
309
309
. "\n"
310
310
. ' domain(mozilla.org), '
311
311
. "\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;}} '
313
323
. "\n"
314
324
. '@media screen and (orientation: landscape) {@-ms-viewport {width: 1024px;height: 768px;}} '
315
325
. "\n"
@@ -348,7 +358,17 @@ public function manipulation()
348
358
. "\n"
349
359
. ' domain(mozilla.org), '
350
360
. "\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;}} '
352
372
. "\n"
353
373
. '@media screen and (orientation: landscape) {@-ms-viewport {width: 1024px;height: 768px;}} '
354
374
. "\n"
@@ -532,9 +552,9 @@ public function createShorthands()
532
552
public function namespaces ()
533
553
{
534
554
$ 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";
536
556
@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/");
538
558
@namespace foo url("http://www.example.com/");
539
559
foo|test {gaga: 1;}
540
560
|test {gaga: 2;} ' ;
@@ -626,9 +646,13 @@ public function selectorRemoval()
626
646
public function comments ()
627
647
{
628
648
$ 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 ;
632
656
self ::assertSame ($ sExpected , $ oDoc ->render ());
633
657
}
634
658
0 commit comments