@@ -2237,6 +2237,16 @@ describe('border-image', () => {
2237
2237
longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
2238
2238
expect ( style . borderImage ) . toBe ( 'none' )
2239
2239
expect ( style . cssText ) . toBe ( 'border-image: none;' )
2240
+ style . borderImage = '100% / 0'
2241
+ longhands . forEach ( longhand =>
2242
+ expect ( style [ longhand ] ) . toBe ( longhand === 'border-image-width' ? '0' : initial ( longhand ) ) )
2243
+ expect ( style . borderImage ) . toBe ( '100% / 0' )
2244
+ expect ( style . cssText ) . toBe ( 'border-image: 100% / 0;' )
2245
+ style . borderImage = '100% / / 1'
2246
+ longhands . forEach ( longhand =>
2247
+ expect ( style [ longhand ] ) . toBe ( longhand === 'border-image-outset' ? '1' : initial ( longhand ) ) )
2248
+ expect ( style . borderImage ) . toBe ( '100% / 1 / 1' )
2249
+ expect ( style . cssText ) . toBe ( 'border-image: 100% / 1 / 1;' )
2240
2250
} )
2241
2251
test ( 'shorthand reification' , ( ) => {
2242
2252
@@ -2793,6 +2803,11 @@ describe('font', () => {
2793
2803
longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
2794
2804
expect ( style . font ) . toBe ( 'medium monospace' )
2795
2805
expect ( style . cssText ) . toBe ( 'font: medium monospace;' )
2806
+ style . font = 'medium / 1 monospace'
2807
+ longhands . forEach ( longhand =>
2808
+ expect ( style [ longhand ] ) . toBe ( longhand === 'line-height' ? '1' : initial ( longhand ) ) )
2809
+ expect ( style . font ) . toBe ( 'medium / 1 monospace' )
2810
+ expect ( style . cssText ) . toBe ( 'font: medium / 1 monospace;' )
2796
2811
2797
2812
// System font
2798
2813
style . font = 'caption'
@@ -3589,6 +3604,13 @@ describe('mask', () => {
3589
3604
expect ( style . mask ) . toBe ( 'no-clip' )
3590
3605
expect ( style . cssText ) . toBe ( 'mask: no-clip;' )
3591
3606
3607
+ // mask-position mask-size
3608
+ style . mask = '0% 0% / cover'
3609
+ longhands . forEach ( longhand =>
3610
+ expect ( style [ longhand ] ) . toBe ( longhand === 'mask-size' ? 'cover' : initial ( longhand ) ) )
3611
+ expect ( style . mask ) . toBe ( '0% 0% / cover' )
3612
+ expect ( style . cssText ) . toBe ( 'mask: 0% 0% / cover;' )
3613
+
3592
3614
// mask-origin mask-clip
3593
3615
style . mask = 'fill-box'
3594
3616
longhands . forEach ( longhand =>
@@ -3651,6 +3673,16 @@ describe('mask-border', () => {
3651
3673
longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
3652
3674
expect ( style . maskBorder ) . toBe ( 'none' )
3653
3675
expect ( style . cssText ) . toBe ( 'mask-border: none;' )
3676
+ style . maskBorder = '0 / 1'
3677
+ longhands . forEach ( longhand =>
3678
+ expect ( style [ longhand ] ) . toBe ( longhand === 'mask-border-width' ? '1' : initial ( longhand ) ) )
3679
+ expect ( style . maskBorder ) . toBe ( '0 / 1' )
3680
+ expect ( style . cssText ) . toBe ( 'mask-border: 0 / 1;' )
3681
+ style . maskBorder = '0 / / 1'
3682
+ longhands . forEach ( longhand =>
3683
+ expect ( style [ longhand ] ) . toBe ( longhand === 'mask-border-outset' ? '1' : initial ( longhand ) ) )
3684
+ expect ( style . maskBorder ) . toBe ( '0 / auto / 1' )
3685
+ expect ( style . cssText ) . toBe ( 'mask-border: 0 / auto / 1;' )
3654
3686
} )
3655
3687
test ( 'shorthand reification' , ( ) => {
3656
3688
@@ -3682,6 +3714,21 @@ describe('offset', () => {
3682
3714
longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
3683
3715
expect ( style . offset ) . toBe ( 'normal' )
3684
3716
expect ( style . cssText ) . toBe ( 'offset: normal;' )
3717
+ style . offset = 'circle()'
3718
+ longhands . forEach ( longhand =>
3719
+ expect ( style [ longhand ] ) . toBe ( longhand === 'offset-path' ? 'circle()' : initial ( longhand ) ) )
3720
+ expect ( style . offset ) . toBe ( 'circle()' )
3721
+ expect ( style . cssText ) . toBe ( 'offset: circle();' )
3722
+ style . offset = 'none 1px'
3723
+ longhands . forEach ( longhand =>
3724
+ expect ( style [ longhand ] ) . toBe ( longhand === 'offset-distance' ? '1px' : initial ( longhand ) ) )
3725
+ expect ( style . offset ) . toBe ( 'none 1px' )
3726
+ expect ( style . cssText ) . toBe ( 'offset: none 1px;' )
3727
+ style . offset = 'none reverse'
3728
+ longhands . forEach ( longhand =>
3729
+ expect ( style [ longhand ] ) . toBe ( longhand === 'offset-rotate' ? 'reverse' : initial ( longhand ) ) )
3730
+ expect ( style . offset ) . toBe ( 'none reverse' )
3731
+ expect ( style . cssText ) . toBe ( 'offset: none reverse;' )
3685
3732
style . offset = 'normal / left'
3686
3733
longhands . forEach ( longhand =>
3687
3734
expect ( style [ longhand ] ) . toBe ( longhand === 'offset-anchor' ? 'left center' : initial ( longhand ) ) )
0 commit comments