:host { display: block; // Anchor absolutes to the outer part of the card. position: relative; } .container { position: relative; overflow: auto; width: 100%; height: 100%; margin: auto; display: flex; justify-content: center; // Need to apply the border radius on the container level, as the ha-card has // overflow visible in order to allow a submenu to extend beyond the card // boundary. border-radius: var(--ha-card-border-radius, 4px); } .frigate-card-contents { width: inherit; height: inherit; margin: auto; overflow: auto; -ms-overflow-style: none; /* Hide scrollbar: IE and Edge */ scrollbar-width: none; /* Hide scrollbar: Firefox */ display: flex; align-items: center; justify-content: center; } /* Hide scrollbar for Chrome, Safari and Opera */ .frigate-card-contents::-webkit-scrollbar { display: none; } /* When forcing aspect ratio absolute positioning is required */ .frigate-card-contents.absolute { position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; } /* The 'hover' menu mode is styling applied outside of the menu itself */ frigate-card-menu[data-mode^=hover-] { z-index: 1; transition: opacity 0.5s ease; } .outer + frigate-card-menu[data-mode^=hover-] { opacity: 0.0; } .outer:hover + frigate-card-menu[data-mode^=hover-], frigate-card-menu[data-mode^=hover-]:hover { opacity: 1.0; } ha-card { display: flex; flex-direction: column; margin: auto; // Some elements (such as submenus) may need to extend beyond the card boundary. overflow: visible; width: 100%; height: 100%; position: static; color: var(--secondary-text-color, white); background-color: var(--secondary-background-color, black); border-radius: var(--ha-card-border-radius, 4px); } frigate-card-live.hidden { // Live view will be rendered but hidden for live preloading. display: none; } // Browsers will reject invalid whole CSS selectors if one selector is bad, so // need to use mixin here instead of just comma-separated selectors. // - Related: https://stackoverflow.com/questions/16982449/why-isnt-it-possible-to-combine-vendor-specific-pseudo-elements-classes-into-on @mixin fullscreen-ha-card { // Make the background black, to give it the expected fullscreen feel. background-color: black; // Hide corners on Safari fullscreen. border-radius: 0px; } :host(:fullscreen) ha-card { @include fullscreen-ha-card; } :host(:-webkit-full-screen) ha-card { @include fullscreen-ha-card; } :host(:-moz-full-screen) ha-card { @include fullscreen-ha-card; } :host(:-ms-fullscreen) ha-card { @include fullscreen-ha-card; }