CSS changes for Safari & cleanups

This commit is contained in:
Dermot Duffy
2021-09-21 12:47:15 -07:00
parent d02f760793
commit 4ac69a951c
4 changed files with 29 additions and 32 deletions
+12
View File
@@ -50,6 +50,10 @@ export class FrigateCardViewer extends LitElement {
> >
</frigate-card-live-jsmpeg>`}`; </frigate-card-live-jsmpeg>`}`;
} }
static get styles(): CSSResultGroup {
return unsafeCSS(liveStyle);
}
} }
@customElement('frigate-card-live-frigate') @customElement('frigate-card-live-frigate')
@@ -72,6 +76,10 @@ export class FrigateCardViewerFrigate extends LitElement {
> >
</ha-camera-stream>`; </ha-camera-stream>`;
} }
static get styles(): CSSResultGroup {
return unsafeCSS(liveStyle);
}
} }
// Create a wrapper for the WebRTC element // Create a wrapper for the WebRTC element
@@ -110,6 +118,10 @@ export class FrigateCardViewerWebRTC extends LitElement {
} }
return html`${this._webRTCElement}`; return html`${this._webRTCElement}`;
} }
static get styles(): CSSResultGroup {
return unsafeCSS(liveStyle);
}
} }
@customElement('frigate-card-live-jsmpeg') @customElement('frigate-card-live-jsmpeg')
+7 -32
View File
@@ -18,7 +18,12 @@
scrollbar-width: none; /* Hide scrollbar: Firefox */ scrollbar-width: none; /* Hide scrollbar: Firefox */
} }
/* Support the 'hover' menu mode. */ /* Hide scrollbar for Chrome, Safari and Opera */
.frigate-card-contents::-webkit-scrollbar {
display: none;
}
/* The 'hover' menu mode is styling applied outside of the menu itself */
.hover-menu { .hover-menu {
z-index: 1; z-index: 1;
transition: all 0.5s ease; transition: all 0.5s ease;
@@ -30,28 +35,6 @@
opacity: 1.0; opacity: 1.0;
} }
.frigate-card-contents img.media,video.media,canvas.media {
width: 100%;
}
/* Hide scrollbar for Chrome, Safari and Opera */
.frigate-card-contents::-webkit-scrollbar {
display: none;
}
.frigate-card-contents .attention {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 10%;
}
video, img {
display: block;
}
ha-card { ha-card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -62,16 +45,8 @@ ha-card {
position: relative; position: relative;
color: var(--secondary-text-color, white); color: var(--secondary-text-color, white);
background-color: var(--secondary-background-color, black); background-color: var(--secondary-background-color, black);
} }
ha-card a { ha-card a {
color: var(--primary-text-color, white); color: var(--primary-text-color, white);
} }
/* Don't drop shadow or have radius for nested webrtc card */
webrtc-camera ha-card {
box-shadow: none;
border-radius: 0px;
background-color: var(--secondary-background-color, black);
}
+7
View File
@@ -1,3 +1,10 @@
canvas { canvas {
width: 100%; width: 100%;
} }
/* Don't drop shadow or have radius for nested webrtc card */
webrtc-camera ha-card {
box-shadow: none;
border-radius: 0px;
background-color: var(--secondary-background-color, black);
}
+3
View File
@@ -1,3 +1,6 @@
ha-hls-player {
transform-style: preserve-3d;
}
img,video { img,video {
width: 100%; width: 100%;
height: 100%; height: 100%;