perf: Improve performance of the carousel auto-height functionality (#2094)

This commit is contained in:
Dermot Duffy
2025-06-08 15:05:40 -07:00
committed by GitHub
parent 70f1d5fc8e
commit 2b92f84665
14 changed files with 316 additions and 488 deletions
-3
View File
@@ -2,9 +2,6 @@
display: block;
height: 100%;
width: 100%;
// Keep carousel controls relative to the media carousel itself.
position: relative;
}
.embla {
+5
View File
@@ -1,6 +1,11 @@
:host {
display: block;
--video-max-height: none;
transition: max-height 0.1s ease-in-out;
// Keep carousel controls relative to the media carousel itself.
position: relative;
}
// When the carousel is not part of a grid ensure its height matches its
+6 -1
View File
@@ -1,8 +1,13 @@
:host {
// Center unseekable icon.
display: block;
// Keep carousel controls + unseekable icon relative to the media carousel
// itself.
position: relative;
--video-max-height: none;
transition: max-height 0.2s ease-in;
}
// If the carousel has an unselected attribute set on it, do not let the