Skip to content

Commit cf53796

Browse files
committed
fix(html): move background skin min dimensions to in-flow element
The skin absolutely-positions <background-video> (position: absolute; inset: 0), so min-* on its :host did not reserve layout space — the parent skin could still collapse and the video would overflow. Move the 300x150 floor onto background-video-skin, which is in flow (display: block; width: 100%; height: 100%), so the min-* actually reserves space when the parent is unsized. Refs #1497
1 parent a3439ca commit cf53796

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/html/src/define/background/skin.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ background-video-skin {
77
position: relative;
88
display: block;
99
width: 100%;
10+
min-width: 300px;
1011
height: 100%;
12+
min-height: 150px;
1113
object-fit: var(--media-object-fit);
1214
}
1315

packages/html/src/media/background-video/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ function getTemplateHTML(attrs: Record<string, string>) {
77
<style>
88
:host {
99
position: relative;
10-
min-width: 300px;
11-
min-height: 150px;
1210
}
1311
1412
video {

0 commit comments

Comments
 (0)