Files
advanced-camera-card/src/scss/media-grid.scss
T
Dermot Duffy 0432eea4b8 feat: Add UI support for PTZ presets (#1920)
- Closes #1889

Whilst a simple change theoretically, the card has such a collection of
surfaces that can overlap other surfaces, it's challenging to get this
to work right! There's a real chance this will have broken something
z-index related (e.g. X overlaps Y when it should not), or (for related
reasons) broken curver corners on the card.
2025-02-27 20:22:12 -08:00

51 lines
1.3 KiB
SCSS

:host {
display: block;
width: 100%;
height: 100%;
--advanced-camera-card-grid-border-size: 3px;
--advanced-camera-card-grid-column-size: 100%;
--advanced-camera-card-grid-selected-width-factor: 2;
// Allow the grid to scroll if necessary (e.g. fullscreen).
overflow: auto;
// Hide scrollbar: Firefox
scrollbar-width: none;
// Hide scrollbar: IE and Edge
-ms-overflow-style: none;
}
/* Hide scrollbar for Chrome, Safari and Opera */
:host::-webkit-scrollbar {
display: none;
}
::slotted(*) {
box-sizing: border-box;
border-radius: var(--ha-card-border-radius, 4px);
overflow: hidden;
width: var(--advanced-camera-card-grid-column-size);
// Unselected items included a transparent border to act as the effective
// gutter between elements, and to ensure when the item is selected it does
// not change in size (even border-box sizing appears to allow size to change
// when the element has a non-fixed height).
border: var(--advanced-camera-card-grid-border-size) solid transparent;
}
::slotted([selected]) {
border: var(--advanced-camera-card-grid-border-size) solid var(--primary-color);
width: min(
100%,
calc(
var(--advanced-camera-card-grid-selected-width-factor) *
var(--advanced-camera-card-grid-column-size)
)
);
}
slot {
display: block;
}