@@ -282,6 +282,37 @@ Deno.test('Render.applyLayout sets position relative when x or y present', () =>
282282 assertEquals ( style [ 'top' ] , '20px' )
283283} )
284284
285+ Deno . test ( 'Render.applyLayout sets display flex alignItems justifyContent minWidth overflow' , ( ) => {
286+ const style : Record < string , string > = { }
287+ const element = { style } as unknown as HTMLElement
288+ Render . applyLayout ( element , {
289+ display : 'flex' ,
290+ flexDirection : 'column' ,
291+ flexWrap : 'wrap' ,
292+ alignItems : 'center' ,
293+ justifyContent : 'space-between' ,
294+ minWidth : 200 ,
295+ maxWidth : '100%' ,
296+ minHeight : 100 ,
297+ maxHeight : '80vh' ,
298+ overflow : 'auto' ,
299+ overflowX : 'hidden' ,
300+ overflowY : 'scroll'
301+ } )
302+ assertEquals ( style [ 'display' ] , 'flex' )
303+ assertEquals ( style [ 'flexDirection' ] , 'column' )
304+ assertEquals ( style [ 'flexWrap' ] , 'wrap' )
305+ assertEquals ( style [ 'alignItems' ] , 'center' )
306+ assertEquals ( style [ 'justifyContent' ] , 'space-between' )
307+ assertEquals ( style [ 'minWidth' ] , '200px' )
308+ assertEquals ( style [ 'maxWidth' ] , '100%' )
309+ assertEquals ( style [ 'minHeight' ] , '100px' )
310+ assertEquals ( style [ 'maxHeight' ] , '80vh' )
311+ assertEquals ( style [ 'overflow' ] , 'auto' )
312+ assertEquals ( style [ 'overflowX' ] , 'hidden' )
313+ assertEquals ( style [ 'overflowY' ] , 'scroll' )
314+ } )
315+
285316Deno . test ( 'Render.applyStyle applies expanded style properties' , ( ) => {
286317 const style : Record < string , string > = { }
287318 const element = { style } as unknown as HTMLElement
@@ -317,6 +348,31 @@ Deno.test('Render.applyStyle applies fill stroke font border', () => {
317348 assertEquals ( style [ 'font' ] , '16px sans-serif' )
318349} )
319350
351+ Deno . test ( 'Render.applyStyle applies textAlign cursor visibility zIndex' , ( ) => {
352+ const style : Record < string , string > = { }
353+ const element = { style } as unknown as HTMLElement
354+ Render . applyStyle ( element , {
355+ textAlign : 'center' ,
356+ textDecoration : 'underline' ,
357+ letterSpacing : '0.5px' ,
358+ lineHeight : '1.5' ,
359+ cursor : 'pointer' ,
360+ visibility : 'visible' ,
361+ background : 'linear-gradient(#333, #111)' ,
362+ outline : '1px solid blue' ,
363+ zIndex : '10'
364+ } )
365+ assertEquals ( style [ 'textAlign' ] , 'center' )
366+ assertEquals ( style [ 'textDecoration' ] , 'underline' )
367+ assertEquals ( style [ 'letterSpacing' ] , '0.5px' )
368+ assertEquals ( style [ 'lineHeight' ] , '1.5' )
369+ assertEquals ( style [ 'cursor' ] , 'pointer' )
370+ assertEquals ( style [ 'visibility' ] , 'visible' )
371+ assertEquals ( style [ 'background' ] , 'linear-gradient(#333, #111)' )
372+ assertEquals ( style [ 'outline' ] , '1px solid blue' )
373+ assertEquals ( style [ 'zIndex' ] , '10' )
374+ } )
375+
320376Deno . test ( 'Render.applyStyleString parses declarations and calls setProperty' , ( ) => {
321377 const recordedSetPropertyCalls : [ string , string ] [ ] = [ ]
322378 const targetStyle = {
0 commit comments