@@ -2237,6 +2237,16 @@ describe('border-image', () => {
22372237 longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
22382238 expect ( style . borderImage ) . toBe ( 'none' )
22392239 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;' )
22402250 } )
22412251 test ( 'shorthand reification' , ( ) => {
22422252
@@ -2793,6 +2803,11 @@ describe('font', () => {
27932803 longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
27942804 expect ( style . font ) . toBe ( 'medium monospace' )
27952805 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;' )
27962811
27972812 // System font
27982813 style . font = 'caption'
@@ -3589,6 +3604,13 @@ describe('mask', () => {
35893604 expect ( style . mask ) . toBe ( 'no-clip' )
35903605 expect ( style . cssText ) . toBe ( 'mask: no-clip;' )
35913606
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+
35923614 // mask-origin mask-clip
35933615 style . mask = 'fill-box'
35943616 longhands . forEach ( longhand =>
@@ -3651,6 +3673,16 @@ describe('mask-border', () => {
36513673 longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
36523674 expect ( style . maskBorder ) . toBe ( 'none' )
36533675 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;' )
36543686 } )
36553687 test ( 'shorthand reification' , ( ) => {
36563688
@@ -3682,6 +3714,21 @@ describe('offset', () => {
36823714 longhands . forEach ( longhand => expect ( style [ longhand ] ) . toBe ( initial ( longhand ) ) )
36833715 expect ( style . offset ) . toBe ( 'normal' )
36843716 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;' )
36853732 style . offset = 'normal / left'
36863733 longhands . forEach ( longhand =>
36873734 expect ( style [ longhand ] ) . toBe ( longhand === 'offset-anchor' ? 'left center' : initial ( longhand ) ) )
0 commit comments