@@ -55,7 +55,7 @@ function testColorParsing() {
55
55
$ this ->assertEquals (array ('r ' => new Size (35.0 , null , true ), 'g ' => new Size (35.0 , null , true ), 'b ' => new Size (35.0 , null , true )), $ aValues [0 ][0 ]->getColor ());
56
56
$ aColorRule = $ oRuleSet ->getRules ('border-color ' );
57
57
$ aValues = $ aColorRule [0 ]->getValues ();
58
- $ this ->assertEquals (array ('r ' => new Size (10.0 , null , true ), 'g ' => new Size (100.0 , null , true ), 'b ' => new Size (230.0 , null , true ), 'a ' => new Size (0.3 , null , true )), $ aValues [0 ][0 ]->getColor ());
58
+ $ this ->assertEquals (array ('r ' => new Size (10.0 , null , true ), 'g ' => new Size (100.0 , null , true ), 'b ' => new Size (230.0 , null , true ), 'a ' => new Size (" 0000.3 " , null , true )), $ aValues [0 ][0 ]->getColor ());
59
59
$ aColorRule = $ oRuleSet ->getRules ('outline-color ' );
60
60
$ aValues = $ aColorRule [0 ]->getValues ();
61
61
$ this ->assertEquals (array ('r ' => new Size (34.0 , null , true ), 'g ' => new Size (34.0 , null , true ), 'b ' => new Size (34.0 , null , true )), $ aValues [0 ][0 ]->getColor ());
@@ -149,7 +149,7 @@ function testSpecificity() {
149
149
150
150
function testManipulation () {
151
151
$ oDoc = $ this ->parsedStructureForFile ('atrules ' );
152
- $ this ->assertSame ('@charset "utf-8";@font-face {font-family: "CrassRoots";src: url("../media/cr.ttf");}html, body {font-size: -0 .6em;}
152
+ $ this ->assertSame ('@charset "utf-8";@font-face {font-family: "CrassRoots";src: url("../media/cr.ttf");}html, body {font-size: -.6em;}
153
153
@keyframes mymove {from {top: 0px;}
154
154
to {top: 200px;}
155
155
}@-moz-keyframes some-move {from {top: 0px;}
@@ -167,7 +167,7 @@ function testManipulation() {
167
167
$ oSelector ->setSelector ('#my_id ' . $ oSelector ->getSelector ());
168
168
}
169
169
}
170
- $ this ->assertSame ('@charset "utf-8";@font-face {font-family: "CrassRoots";src: url("../media/cr.ttf");}#my_id html, #my_id body {font-size: -0 .6em;}
170
+ $ this ->assertSame ('@charset "utf-8";@font-face {font-family: "CrassRoots";src: url("../media/cr.ttf");}#my_id html, #my_id body {font-size: -.6em;}
171
171
@keyframes mymove {from {top: 0px;}
172
172
to {top: 200px;}
173
173
}@-moz-keyframes some-move {from {top: 0px;}
@@ -181,12 +181,12 @@ function testManipulation() {
181
181
} ' , $ oDoc ->__toString ());
182
182
183
183
$ oDoc = $ this ->parsedStructureForFile ('values ' );
184
- $ this ->assertSame ('#header {margin: 10px 2em 1cm 2%;font-family: Verdana,Helvetica,"Gill Sans",sans-serif;font-size: 10px;color: red !important;background-color: green;background-color: rgba(0,128,0,0 .7);}
184
+ $ this ->assertSame ('#header {margin: 10px 2em 1cm 2%;font-family: Verdana,Helvetica,"Gill Sans",sans-serif;font-size: 10px;color: red !important;background-color: green;background-color: rgba(0,128,0,.7);}
185
185
body {color: green;font: 75% "Lucida Grande","Trebuchet MS",Verdana,sans-serif;} ' . "\n" , $ oDoc ->__toString ());
186
186
foreach ($ oDoc ->getAllRuleSets () as $ oRuleSet ) {
187
187
$ oRuleSet ->removeRule ('font- ' );
188
188
}
189
- $ this ->assertSame ('#header {margin: 10px 2em 1cm 2%;color: red !important;background-color: green;background-color: rgba(0,128,0,0 .7);}
189
+ $ this ->assertSame ('#header {margin: 10px 2em 1cm 2%;color: red !important;background-color: green;background-color: rgba(0,128,0,.7);}
190
190
body {color: green;} ' . "\n" , $ oDoc ->__toString ());
191
191
foreach ($ oDoc ->getAllRuleSets () as $ oRuleSet ) {
192
192
$ oRuleSet ->removeRule ('background- ' );
@@ -248,9 +248,9 @@ function testSlashedValues() {
248
248
function testFunctionSyntax () {
249
249
$ oDoc = $ this ->parsedStructureForFile ('functions ' );
250
250
$ sExpected = 'div.main {background-image: linear-gradient(rgb(0,0,0),rgb(255,255,255));}
251
- .collapser::before, .collapser::-moz-before, .collapser::-webkit-before {content: "»";font-size: 1.2em;margin-right: 0 .2em;-moz-transition-property: -moz-transform;-moz-transition-duration: 0 .2s;-moz-transform-origin: center 60%;}
251
+ .collapser::before, .collapser::-moz-before, .collapser::-webkit-before {content: "»";font-size: 1.2em;margin-right: .2em;-moz-transition-property: -moz-transform;-moz-transition-duration: .2s;-moz-transform-origin: center 60%;}
252
252
.collapser.expanded::before, .collapser.expanded::-moz-before, .collapser.expanded::-webkit-before {-moz-transform: rotate(90deg);}
253
- .collapser + * {height: 0;overflow: hidden;-moz-transition-property: height;-moz-transition-duration: 0 .3s;}
253
+ .collapser + * {height: 0;overflow: hidden;-moz-transition-property: height;-moz-transition-duration: .3s;}
254
254
.collapser.expanded + * {height: auto;} ' . "\n" ;
255
255
$ this ->assertSame ($ sExpected , $ oDoc ->__toString ());
256
256
@@ -259,15 +259,15 @@ function testFunctionSyntax() {
259
259
$ mValue ->setSize ($ mValue ->getSize () * 3 );
260
260
}
261
261
}
262
- $ sExpected = str_replace (array ('1.2em ' , '0 .2em ' , '60% ' ), array ('3.6em ' , '0 .6em ' , '180% ' ), $ sExpected );
262
+ $ sExpected = str_replace (array ('1.2em ' , '.2em ' , '60% ' ), array ('3.6em ' , '.6em ' , '180% ' ), $ sExpected );
263
263
$ this ->assertSame ($ sExpected , $ oDoc ->__toString ());
264
264
265
265
foreach ($ oDoc ->getAllValues (null , true ) as $ mValue ) {
266
266
if ($ mValue instanceof Size && !$ mValue ->isRelative () && !$ mValue ->isColorComponent ()) {
267
267
$ mValue ->setSize ($ mValue ->getSize () * 2 );
268
268
}
269
269
}
270
- $ sExpected = str_replace (array ('0 .2s ' , '0 .3s ' , '90deg ' ), array ('0 .4s ' , '0 .6s ' , '180deg ' ), $ sExpected );
270
+ $ sExpected = str_replace (array ('.2s ' , '.3s ' , '90deg ' ), array ('.4s ' , '.6s ' , '180deg ' ), $ sExpected );
271
271
$ this ->assertSame ($ sExpected , $ oDoc ->__toString ());
272
272
}
273
273
@@ -316,7 +316,7 @@ function testListValueRemoval() {
316
316
continue ;
317
317
}
318
318
}
319
- $ this ->assertSame ('html, body {font-size: -0 .6em;} ' . "\n" , $ oDoc ->__toString ());
319
+ $ this ->assertSame ('html, body {font-size: -.6em;} ' . "\n" , $ oDoc ->__toString ());
320
320
321
321
$ oDoc = $ this ->parsedStructureForFile ('nested ' );
322
322
foreach ($ oDoc ->getAllDeclarationBlocks () as $ oBlock ) {
0 commit comments