:host { display: block; // Anchor absolutes to the outermost part of the card. position: relative; } :host([dark]) { filter: brightness(75%); } div.main { 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); // Necessary to get Safari to show border-radius correctly. transform: translateZ(0); // Include the borders in the sizing (to keep the triggered warning pulse // visible in fullscreen). box-sizing: border-box; // Hide scrollbar: Firefox scrollbar-width: none; // Hide scrollbar: IE and Edge -ms-overflow-style: none; } div.main.triggered { @keyframes warning-pulse { 0% { border: solid 1px rgba(0, 0, 0, 0); } 50% { border: solid 1px var(--warning-color); } 100% { border: solid 1px rgba(0, 0, 0, 0); } } animation: warning-pulse 5s infinite; } /* Hide scrollbar for Chrome, Safari and Opera */ div.main::-webkit-scrollbar { display: none; } /* The 'hover' menu mode is styling applied outside of the menu itself */ frigate-card-menu[data-style='hover'] { z-index: 1; transition: opacity 0.5s ease; } .main + frigate-card-menu[data-style='hover'] { opacity: 0; } frigate-card-menu[data-style='hover']:hover { opacity: 1; } 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); // The primary border-radius used is the div.main, since this one has overflow // explicitly visible this is only useful for keeping the background-color // within the radius. border-radius: var(--ha-card-border-radius, 4px); } frigate-card-live.hidden { // Live view will be rendered but hidden for live preloading. display: none; } /************ * Fullscreen *************/ // 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 { // Hide corners on Safari fullscreen. border-radius: 0px; // Theme styles may set these which are not helpful in fullscreen mode, reset // them. box-shadow: none; margin: 0; } // Need to use an id selector here to overcome theme styling that may // incorrectly apply to ha-card style. :host(:fullscreen) #ha-card { @include fullscreen-ha-card; } :host(:-webkit-full-screen) #ha-card { @include fullscreen-ha-card; } @mixin fullscreen-no-rounded-corners { // Hide corners on Safari fullscreen. border-radius: 0px; } :host(:fullscreen) div.main, :host(:fullscreen) frigate-card-menu { @include fullscreen-no-rounded-corners; } :host(:-webkit-full-screen) div.main, :host(:-webkit-full-screen) frigate-card-menu { @include fullscreen-no-rounded-corners; }