File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11CHANGES
22=======
33
4+ dev
5+ ---
6+
7+ Improvements:
8+ - Overwrite the width/height if its computed value is ` 0px `
9+
4101.0.6
511-----
612
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ function setDefaultContainerStyle(container) {
1919 const style = getComputedStyle ( container ) ;
2020
2121 if ( ! style . display ) container . style . display = 'block' ;
22- if ( ! style . width ) container . style . width = '65vw' ;
22+ if ( ! style . width || style . width === '0px' ) container . style . width = '65vw' ;
2323 if ( ! style . maxWidth ) container . style . maxWidth = '400px' ;
24- if ( ! style . height ) container . style . height = '65vw' ;
24+ if ( ! style . height || style . height === '0px' ) container . style . height = '65vw' ;
2525 if ( ! style . maxHeight ) container . style . maxHeight = '400px' ;
2626 // Avoid overflow when a tick numbers is out of the parent element.
2727 if ( ! style . paddingTop ) container . style . paddingTop = '5px' ;
You can’t perform that action at this time.
0 commit comments