@@ -225,10 +225,10 @@ mod shorthand_serialization {
225
225
let px_30 = BorderWidth :: from_length ( Length :: from_px ( 30f32 ) ) ;
226
226
let px_10 = BorderWidth :: from_length ( Length :: from_px ( 10f32 ) ) ;
227
227
228
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
229
- properties. push ( PropertyDeclaration :: BorderRightWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
230
- properties. push ( PropertyDeclaration :: BorderBottomWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
231
- properties. push ( PropertyDeclaration :: BorderLeftWidth ( Box :: new ( px_10. clone ( ) ) ) ) ;
228
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( px_30. clone ( ) ) ) ;
229
+ properties. push ( PropertyDeclaration :: BorderRightWidth ( px_30. clone ( ) ) ) ;
230
+ properties. push ( PropertyDeclaration :: BorderBottomWidth ( px_30. clone ( ) ) ) ;
231
+ properties. push ( PropertyDeclaration :: BorderLeftWidth ( px_10. clone ( ) ) ) ;
232
232
233
233
let blue = CSSColor {
234
234
parsed : ComputedColor :: RGBA ( RGBA :: new ( 0 , 0 , 255 , 255 ) ) ,
@@ -258,10 +258,10 @@ mod shorthand_serialization {
258
258
259
259
let px_30 = BorderWidth :: from_length ( Length :: from_px ( 30f32 ) ) ;
260
260
261
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
262
- properties. push ( PropertyDeclaration :: BorderRightWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
263
- properties. push ( PropertyDeclaration :: BorderBottomWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
264
- properties. push ( PropertyDeclaration :: BorderLeftWidth ( Box :: new ( px_30. clone ( ) ) ) ) ;
261
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( px_30. clone ( ) ) ) ;
262
+ properties. push ( PropertyDeclaration :: BorderRightWidth ( px_30. clone ( ) ) ) ;
263
+ properties. push ( PropertyDeclaration :: BorderBottomWidth ( px_30. clone ( ) ) ) ;
264
+ properties. push ( PropertyDeclaration :: BorderLeftWidth ( px_30. clone ( ) ) ) ;
265
265
266
266
let blue = CSSColor {
267
267
parsed : ComputedColor :: RGBA ( RGBA :: new ( 0 , 0 , 255 , 255 ) ) ,
@@ -302,10 +302,10 @@ mod shorthand_serialization {
302
302
let right_px = BorderWidth :: from_length ( Length :: from_px ( 15f32 ) ) ;
303
303
let left_px = BorderWidth :: from_length ( Length :: from_px ( 15f32 ) ) ;
304
304
305
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( top_px) ) ) ;
306
- properties. push ( PropertyDeclaration :: BorderRightWidth ( Box :: new ( right_px) ) ) ;
307
- properties. push ( PropertyDeclaration :: BorderBottomWidth ( Box :: new ( bottom_px) ) ) ;
308
- properties. push ( PropertyDeclaration :: BorderLeftWidth ( Box :: new ( left_px) ) ) ;
305
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( top_px) ) ;
306
+ properties. push ( PropertyDeclaration :: BorderRightWidth ( right_px) ) ;
307
+ properties. push ( PropertyDeclaration :: BorderBottomWidth ( bottom_px) ) ;
308
+ properties. push ( PropertyDeclaration :: BorderLeftWidth ( left_px) ) ;
309
309
310
310
let serialization = shorthand_properties_to_string ( properties) ;
311
311
assert_eq ! ( serialization, "border-width: 10px 15px;" ) ;
@@ -320,10 +320,10 @@ mod shorthand_serialization {
320
320
let bottom_px = BorderWidth :: Thick ;
321
321
let left_px = BorderWidth :: from_length ( Length :: from_px ( 15f32 ) ) ;
322
322
323
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( top_px) ) ) ;
324
- properties. push ( PropertyDeclaration :: BorderRightWidth ( Box :: new ( right_px) ) ) ;
325
- properties. push ( PropertyDeclaration :: BorderBottomWidth ( Box :: new ( bottom_px) ) ) ;
326
- properties. push ( PropertyDeclaration :: BorderLeftWidth ( Box :: new ( left_px) ) ) ;
323
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( top_px) ) ;
324
+ properties. push ( PropertyDeclaration :: BorderRightWidth ( right_px) ) ;
325
+ properties. push ( PropertyDeclaration :: BorderBottomWidth ( bottom_px) ) ;
326
+ properties. push ( PropertyDeclaration :: BorderLeftWidth ( left_px) ) ;
327
327
328
328
let serialization = shorthand_properties_to_string ( properties) ;
329
329
assert_eq ! ( serialization, "border-width: thin medium thick 15px;" ) ;
@@ -411,7 +411,7 @@ mod shorthand_serialization {
411
411
authored : None
412
412
} ;
413
413
414
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( width) ) ) ;
414
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( width) ) ;
415
415
properties. push ( PropertyDeclaration :: BorderTopStyle ( style) ) ;
416
416
properties. push ( PropertyDeclaration :: BorderTopColor ( color) ) ;
417
417
@@ -429,7 +429,7 @@ mod shorthand_serialization {
429
429
fn border_top_should_serialize_correctly ( ) {
430
430
let mut properties = Vec :: new ( ) ;
431
431
let ( width, style, color) = get_border_property_values ( ) ;
432
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( width) ) ) ;
432
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( width) ) ;
433
433
properties. push ( PropertyDeclaration :: BorderTopStyle ( style) ) ;
434
434
properties. push ( PropertyDeclaration :: BorderTopColor ( color) ) ;
435
435
@@ -441,7 +441,7 @@ mod shorthand_serialization {
441
441
fn border_right_should_serialize_correctly ( ) {
442
442
let mut properties = Vec :: new ( ) ;
443
443
let ( width, style, color) = get_border_property_values ( ) ;
444
- properties. push ( PropertyDeclaration :: BorderRightWidth ( Box :: new ( width) ) ) ;
444
+ properties. push ( PropertyDeclaration :: BorderRightWidth ( width) ) ;
445
445
properties. push ( PropertyDeclaration :: BorderRightStyle ( style) ) ;
446
446
properties. push ( PropertyDeclaration :: BorderRightColor ( color) ) ;
447
447
@@ -453,7 +453,7 @@ mod shorthand_serialization {
453
453
fn border_bottom_should_serialize_correctly ( ) {
454
454
let mut properties = Vec :: new ( ) ;
455
455
let ( width, style, color) = get_border_property_values ( ) ;
456
- properties. push ( PropertyDeclaration :: BorderBottomWidth ( Box :: new ( width) ) ) ;
456
+ properties. push ( PropertyDeclaration :: BorderBottomWidth ( width) ) ;
457
457
properties. push ( PropertyDeclaration :: BorderBottomStyle ( style) ) ;
458
458
properties. push ( PropertyDeclaration :: BorderBottomColor ( color) ) ;
459
459
@@ -465,7 +465,7 @@ mod shorthand_serialization {
465
465
fn border_left_should_serialize_correctly ( ) {
466
466
let mut properties = Vec :: new ( ) ;
467
467
let ( width, style, color) = get_border_property_values ( ) ;
468
- properties. push ( PropertyDeclaration :: BorderLeftWidth ( Box :: new ( width) ) ) ;
468
+ properties. push ( PropertyDeclaration :: BorderLeftWidth ( width) ) ;
469
469
properties. push ( PropertyDeclaration :: BorderLeftStyle ( style) ) ;
470
470
properties. push ( PropertyDeclaration :: BorderLeftColor ( color) ) ;
471
471
@@ -478,19 +478,19 @@ mod shorthand_serialization {
478
478
let mut properties = Vec :: new ( ) ;
479
479
let ( width, style, color) = get_border_property_values ( ) ;
480
480
481
- properties. push ( PropertyDeclaration :: BorderTopWidth ( Box :: new ( width. clone ( ) ) ) ) ;
481
+ properties. push ( PropertyDeclaration :: BorderTopWidth ( width. clone ( ) ) ) ;
482
482
properties. push ( PropertyDeclaration :: BorderTopStyle ( style. clone ( ) ) ) ;
483
483
properties. push ( PropertyDeclaration :: BorderTopColor ( color. clone ( ) ) ) ;
484
484
485
- properties. push ( PropertyDeclaration :: BorderRightWidth ( Box :: new ( width. clone ( ) ) ) ) ;
485
+ properties. push ( PropertyDeclaration :: BorderRightWidth ( width. clone ( ) ) ) ;
486
486
properties. push ( PropertyDeclaration :: BorderRightStyle ( style. clone ( ) ) ) ;
487
487
properties. push ( PropertyDeclaration :: BorderRightColor ( color. clone ( ) ) ) ;
488
488
489
- properties. push ( PropertyDeclaration :: BorderBottomWidth ( Box :: new ( width. clone ( ) ) ) ) ;
489
+ properties. push ( PropertyDeclaration :: BorderBottomWidth ( width. clone ( ) ) ) ;
490
490
properties. push ( PropertyDeclaration :: BorderBottomStyle ( style. clone ( ) ) ) ;
491
491
properties. push ( PropertyDeclaration :: BorderBottomColor ( color. clone ( ) ) ) ;
492
492
493
- properties. push ( PropertyDeclaration :: BorderLeftWidth ( Box :: new ( width. clone ( ) ) ) ) ;
493
+ properties. push ( PropertyDeclaration :: BorderLeftWidth ( width. clone ( ) ) ) ;
494
494
properties. push ( PropertyDeclaration :: BorderLeftStyle ( style. clone ( ) ) ) ;
495
495
properties. push ( PropertyDeclaration :: BorderLeftColor ( color. clone ( ) ) ) ;
496
496
@@ -575,7 +575,7 @@ mod shorthand_serialization {
575
575
let width = Either :: Second ( Auto ) ;
576
576
let count = Either :: Second ( Auto ) ;
577
577
578
- properties. push ( PropertyDeclaration :: ColumnWidth ( Box :: new ( width) ) ) ;
578
+ properties. push ( PropertyDeclaration :: ColumnWidth ( width) ) ;
579
579
properties. push ( PropertyDeclaration :: ColumnCount ( count) ) ;
580
580
581
581
let serialization = shorthand_properties_to_string ( properties) ;
0 commit comments