mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 23:55:20 +00:00
Fix an issue where iframe aspect ratio was not respected. (#2979)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@gitbook/react-contentkit": patch
|
||||
---
|
||||
|
||||
Fix an issue where iframe aspect ratio was not respected.
|
||||
@@ -176,15 +176,9 @@ export function ElementWebframe(props: ContentKitClientElementProps<ContentKitWe
|
||||
allow="clipboard-write"
|
||||
className="contentkit-webframe"
|
||||
style={{
|
||||
// If given an aspect ratio, use width as auto dimension and let height take precedence.
|
||||
...(aspectRatio
|
||||
? {
|
||||
width: 'auto',
|
||||
aspectRatio,
|
||||
}
|
||||
: { width: '100%' }),
|
||||
|
||||
width: '100%',
|
||||
maxWidth: '100%',
|
||||
aspectRatio,
|
||||
height: size.height ? Math.max(size.height, 32) : '100%',
|
||||
border: 'none',
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user