@@ -505,7 +505,7 @@ public void mediaRulePrint() throws Exception {
505
505
506
506
Assert .assertEquals (1 , rules .getLength ());
507
507
final AbstractCSSRuleImpl cssRule = rules .getRules ().get (0 );
508
- Assert .assertEquals ("@media print {h1 { color: red } }" , cssRule .getCssText ());
508
+ Assert .assertEquals ("@media print {\n h1 { color: red }\n }" , cssRule .getCssText ());
509
509
510
510
final MediaListImpl mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
511
511
@@ -525,7 +525,7 @@ public void mediaRulePrintAndScreen() throws Exception {
525
525
526
526
Assert .assertEquals (1 , rules .getLength ());
527
527
final AbstractCSSRuleImpl cssRule = rules .getRules ().get (0 );
528
- Assert .assertEquals ("@media print, screen {h1 { color: red } }" , cssRule .getCssText ());
528
+ Assert .assertEquals ("@media print, screen {\n h1 { color: red }\n }" , cssRule .getCssText ());
529
529
530
530
final MediaListImpl mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
531
531
@@ -547,8 +547,8 @@ public void nestedMediaRule() throws Exception {
547
547
548
548
Assert .assertEquals (1 , rules .getLength ());
549
549
AbstractCSSRuleImpl cssRule = rules .getRules ().get (0 );
550
- Assert .assertEquals ("@media print {*#navigation { display: none } "
551
- + "@media all and (max-width: 12cm) {*.note { float: none } } }" , cssRule .getCssText ());
550
+ Assert .assertEquals ("@media print {\n *#navigation { display: none }"
551
+ + "\n @media (max-width: 12cm) {\n *.note { float: none }\n } \n }" , cssRule .getCssText ());
552
552
553
553
MediaListImpl mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
554
554
Assert .assertEquals (1 , mediaList .getLength ());
@@ -561,11 +561,11 @@ public void nestedMediaRule() throws Exception {
561
561
Assert .assertEquals ("*#navigation { display: none }" , cssRule .getCssText ());
562
562
563
563
cssRule = innerRules .getRules ().get (1 );
564
- Assert .assertEquals ("@media all and (max-width: 12cm) {*.note { float: none } }" , cssRule .getCssText ());
564
+ Assert .assertEquals ("@media (max-width: 12cm) {\n *.note { float: none }\n }" , cssRule .getCssText ());
565
565
566
566
mediaList = ((CSSMediaRuleImpl ) cssRule ).getMediaList ();
567
567
Assert .assertEquals (1 , mediaList .getLength ());
568
- Assert .assertEquals ("all and (max-width: 12cm)" , mediaList .getMediaText ());
568
+ Assert .assertEquals ("(max-width: 12cm)" , mediaList .getMediaText ());
569
569
}
570
570
571
571
/**
@@ -810,7 +810,7 @@ public void atRules2() throws Exception {
810
810
Assert .assertEquals ("@import url(\" subs.css\" );" , rule .getCssText ());
811
811
812
812
rule = rules .getRules ().get (1 );
813
- Assert .assertEquals ("@media print {body { font-size: 10pt } }" , rule .getCssText ());
813
+ Assert .assertEquals ("@media print {\n body { font-size: 10pt }\n }" , rule .getCssText ());
814
814
815
815
rule = rules .getRules ().get (2 );
816
816
Assert .assertEquals ("h1 { color: blue }" , rule .getCssText ());
@@ -855,7 +855,7 @@ public void atRules2b() throws Exception {
855
855
Assert .assertEquals ("@import url(\" subs.css\" );" , rule .getCssText ());
856
856
857
857
rule = rules .getRules ().get (1 );
858
- Assert .assertEquals ("@media print {body { font-size: 10pt } }" , rule .getCssText ());
858
+ Assert .assertEquals ("@media print {\n body { font-size: 10pt }\n }" , rule .getCssText ());
859
859
860
860
rule = rules .getRules ().get (2 );
861
861
Assert .assertEquals ("h1 { color: blue }" , rule .getCssText ());
@@ -1834,7 +1834,7 @@ public void unexpectedEndOfStyleSheet() throws Exception {
1834
1834
Assert .assertEquals (1 , rules .getLength ());
1835
1835
1836
1836
final AbstractCSSRuleImpl rule = rules .getRules ().get (0 );
1837
- Assert .assertEquals ("@media screen {p:before { content: Hello } }" , rule .getCssText ());
1837
+ Assert .assertEquals ("@media screen {\n p:before { content: Hello }\n }" , rule .getCssText ());
1838
1838
}
1839
1839
1840
1840
/**
@@ -1870,7 +1870,7 @@ public void unexpectedEndOfMediaRule() throws Exception {
1870
1870
Assert .assertEquals (1 , rules .getLength ());
1871
1871
1872
1872
final AbstractCSSRuleImpl rule = rules .getRules ().get (0 );
1873
- Assert .assertEquals ("@media screen {p:before { content: Hello } }" , rule .getCssText ());
1873
+ Assert .assertEquals ("@media screen {\n p:before { content: Hello }\n }" , rule .getCssText ());
1874
1874
}
1875
1875
1876
1876
/**
@@ -3457,7 +3457,7 @@ public void unicode() throws Exception {
3457
3457
*/
3458
3458
@ Test
3459
3459
public void unicodeEscaping () throws Exception {
3460
- unicode ("@media paper\\ 7b { }" , "@media paper{ {}" );
3460
+ unicode ("@media paper\\ 7b { }" , "@media paper{ {\n }" );
3461
3461
unicode (".class\\ 7b { color: blue }" , "*.class{ { color: blue }" );
3462
3462
unicode ("@page :pseu\\ 64o { color: blue }" , "@page :pseudo {color: blue}" );
3463
3463
unicode ("h1:first-l\\ 69ne { color: blue }" , "h1:first-line { color: blue }" );
@@ -3647,26 +3647,26 @@ public void realWorldMicrosoft() throws Exception {
3647
3647
@ Test
3648
3648
public void realWorldOracle () throws Exception {
3649
3649
realWorld ("realworld/compass-homestyle.css" , 735 , 2160 ,
3650
- "all and (max-height: 600px);"
3651
- + "all and (max-width: 600px);"
3652
- + "all and (max-width: 770px);"
3653
- + "all and (min-width: 0) and (max-width: 1012px);"
3654
- + "all and (min-width: 0) and (max-width: 1018px);"
3655
- + "all and (min-width: 0) and (max-width: 1111px);"
3656
- + "all and (min-width: 0) and (max-width: 1312px);"
3657
- + "all and (min-width: 0) and (max-width: 390px);"
3658
- + "all and (min-width: 0) and (max-width: 400px);"
3659
- + "all and (min-width: 0) and (max-width: 410px);"
3660
- + "all and (min-width: 0) and (max-width: 450px);"
3661
- + "all and (min-width: 0) and (max-width: 600px);"
3662
- + "all and (min-width: 0) and (max-width: 640px);"
3663
- + "all and (min-width: 0) and (max-width: 680px);"
3664
- + "all and (min-width: 0) and (max-width: 720px);"
3665
- + "all and (min-width: 0) and (max-width: 770px);"
3666
- + "all and (min-width: 0) and (max-width: 870px);"
3667
- + "all and (min-width: 0) and (max-width: 974px);"
3668
- + "all and (min-width: 601px);"
3669
- + "all and (min-width: 771px) and (max-width: 990px);"
3650
+ "(max-height: 600px);"
3651
+ + "(max-width: 600px);"
3652
+ + "(max-width: 770px);"
3653
+ + "(min-width: 0) and (max-width: 1012px);"
3654
+ + "(min-width: 0) and (max-width: 1018px);"
3655
+ + "(min-width: 0) and (max-width: 1111px);"
3656
+ + "(min-width: 0) and (max-width: 1312px);"
3657
+ + "(min-width: 0) and (max-width: 390px);"
3658
+ + "(min-width: 0) and (max-width: 400px);"
3659
+ + "(min-width: 0) and (max-width: 410px);"
3660
+ + "(min-width: 0) and (max-width: 450px);"
3661
+ + "(min-width: 0) and (max-width: 600px);"
3662
+ + "(min-width: 0) and (max-width: 640px);"
3663
+ + "(min-width: 0) and (max-width: 680px);"
3664
+ + "(min-width: 0) and (max-width: 720px);"
3665
+ + "(min-width: 0) and (max-width: 770px);"
3666
+ + "(min-width: 0) and (max-width: 870px);"
3667
+ + "(min-width: 0) and (max-width: 974px);"
3668
+ + "(min-width: 601px);"
3669
+ + "(min-width: 771px) and (max-width: 990px);"
3670
3670
+ "only screen and (max-width: 974px);"
3671
3671
+ "only screen and (min-width: 0) and (max-width: 1024px);"
3672
3672
+ "only screen and (min-width: 0) and (max-width: 320px);"
@@ -3766,14 +3766,14 @@ public void realWorldBlueprint() throws Exception {
3766
3766
*/
3767
3767
@ Test
3768
3768
public void realWorldBootstrap337 () throws Exception {
3769
- final String media = "all and (-webkit-transform-3d);"
3770
- + "all and (max-device-width: 480px) and (orientation: landscape);"
3771
- + "all and (max-width: 767px);"
3772
- + "all and (min-width: 1200px);"
3773
- + "all and (min-width: 768px);"
3774
- + "all and (min-width: 768px) and (max-width: 991px);all and (min-width: 992px);"
3775
- + "all and (min-width: 992px) and (max-width: 1199px);"
3776
- + "all and (transform-3d);print;"
3769
+ final String media = "(-webkit-transform-3d);"
3770
+ + "(max-device-width: 480px) and (orientation: landscape);"
3771
+ + "(max-width: 767px);"
3772
+ + "(min-width: 1200px);"
3773
+ + "(min-width: 768px);"
3774
+ + "(min-width: 768px) and (max-width: 991px);(min-width: 992px);"
3775
+ + "(min-width: 992px) and (max-width: 1199px);"
3776
+ + "(transform-3d);print;"
3777
3777
+ "screen and (-webkit-min-device-pixel-ratio: 0);"
3778
3778
+ "screen and (max-width: 767px);"
3779
3779
+ "screen and (min-width: 768px);" ;
@@ -3785,14 +3785,14 @@ public void realWorldBootstrap337() throws Exception {
3785
3785
*/
3786
3786
@ Test
3787
3787
public void realWorldBootstrap400 () throws Exception {
3788
- final String media = "all and (max-width: 1199.98px);"
3789
- + "all and (max-width: 575.98px);"
3790
- + "all and (max-width: 767.98px);"
3791
- + "all and (max-width: 991.98px);"
3792
- + "all and (min-width: 1200px);"
3793
- + "all and (min-width: 576px);"
3794
- + "all and (min-width: 768px);"
3795
- + "all and (min-width: 992px);"
3788
+ final String media = "(max-width: 1199.98px);"
3789
+ + "(max-width: 575.98px);"
3790
+ + "(max-width: 767.98px);"
3791
+ + "(max-width: 991.98px);"
3792
+ + "(min-width: 1200px);"
3793
+ + "(min-width: 576px);"
3794
+ + "(min-width: 768px);"
3795
+ + "(min-width: 992px);"
3796
3796
+ "print;" ;
3797
3797
realWorld ("realworld/bootstrap_4_0_0.css" , 1033 , 2470 , media , 0 , 0 );
3798
3798
realWorld ("realworld/bootstrap_4_0_0_min.css" , 1033 , 2470 , media , 0 , 0 );
@@ -3825,18 +3825,18 @@ public void realStackoverflow() throws Exception {
3825
3825
*/
3826
3826
@ Test
3827
3827
public void realMui () throws Exception {
3828
- final String media = "all and (-ms-high-contrast: active);"
3829
- + "all and (-ms-high-contrast: none);"
3830
- + "all and (max-width: 543px);"
3831
- + "all and (min-width: 1200px);"
3832
- + "all and (min-width: 480px);"
3833
- + "all and (min-width: 544px);"
3834
- + "all and (min-width: 544px) and (max-width: 767px);"
3835
- + "all and (min-width: 768px);"
3836
- + "all and (min-width: 768px) and (max-width: 991px);"
3837
- + "all and (min-width: 992px);"
3838
- + "all and (min-width: 992px) and (max-width: 1199px);"
3839
- + "all and (orientation: landscape) and (max-height: 480px);" ;
3828
+ final String media = "(-ms-high-contrast: active);"
3829
+ + "(-ms-high-contrast: none);"
3830
+ + "(max-width: 543px);"
3831
+ + "(min-width: 1200px);"
3832
+ + "(min-width: 480px);"
3833
+ + "(min-width: 544px);"
3834
+ + "(min-width: 544px) and (max-width: 767px);"
3835
+ + "(min-width: 768px);"
3836
+ + "(min-width: 768px) and (max-width: 991px);"
3837
+ + "(min-width: 992px);"
3838
+ + "(min-width: 992px) and (max-width: 1199px);"
3839
+ + "(orientation: landscape) and (max-height: 480px);" ;
3840
3840
realWorld ("realworld/mui.css" , 342 , 752 , media , 0 , 0 );
3841
3841
}
3842
3842
0 commit comments