File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
packages/qwik/src/optimizer/src/plugins Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @builder.io/qwik ' : patch
3+ ---
4+
5+ fix: remove usage of ` computedStyleMap `
Original file line number Diff line number Diff line change @@ -312,11 +312,11 @@ <h2 id="title"></h2>
312312 const browserArea = rect . width * rect . height ;
313313 if ( ! node . hasAttribute ( 'width' ) || ! node . hasAttribute ( 'height' ) ) {
314314 skip = true ;
315- const computedStyles = node . computedStyleMap ( ) ;
316- const hasAspect = computedStyles . get ( 'aspect-ratio' ) . toString ( ) !== 'auto' ;
317- const hasWidth = isDefinedUnit ( computedStyles . get ( 'width' ) . toString ( ) ) ;
318- const hasHeight = isDefinedUnit ( computedStyles . get ( 'height' ) . toString ( ) ) ;
319- const isAbsolute = computedStyles . get ( 'position' ) . toString ( ) === 'absolute' ;
315+ const computedStyles = getComputedStyle ( node ) ;
316+ const hasAspect = computedStyles . getPropertyValue ( 'aspect-ratio' ) . toString ( ) !== 'auto' ;
317+ const hasWidth = isDefinedUnit ( computedStyles . getPropertyValue ( 'width' ) . toString ( ) ) ;
318+ const hasHeight = isDefinedUnit ( computedStyles . getPropertyValue ( 'height' ) . toString ( ) ) ;
319+ const isAbsolute = computedStyles . getPropertyValue ( 'position' ) . toString ( ) === 'absolute' ;
320320 layoutInvalidation =
321321 browserArea > 1000 && ! isAbsolute && ! hasAspect && ( ! hasWidth || ! hasHeight ) ;
322322 }
You can’t perform that action at this time.
0 commit comments