Skip to content

Commit

Permalink
Add CSS var for header -webkit-backdrop-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoncal committed Apr 9, 2024
1 parent 0d3e730 commit 38f8b4e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions hassio/src/ingress-view/hassio-ingress-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ class HassioIngressView extends LitElement {
padding: 0 16px;
pointer-events: none;
background-color: var(--app-header-background-color);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
font-weight: 400;
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
Expand Down
3 changes: 3 additions & 0 deletions src/components/ha-top-app-bar-fixed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export class HaTopAppBarFixed extends TopAppBarFixedBase {
padding-inline-start: 20px;
padding-inline-end: initial;
}
.header {
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
}
`,
];
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/ha-top-app-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export class HaTopAppBar extends TopAppBarBase {
var(--mdc-theme-primary)
);
}
.header {
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
}
`,
];
}
Expand Down
1 change: 1 addition & 0 deletions src/layouts/hass-error-screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class HassErrorScreen extends LitElement {
padding: 8px 12px;
pointer-events: none;
background-color: var(--app-header-background-color);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
font-weight: 400;
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
Expand Down
1 change: 1 addition & 0 deletions src/layouts/hass-loading-screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class HassLoadingScreen extends LitElement {
padding: 8px 12px;
pointer-events: none;
background-color: var(--app-header-background-color);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
font-weight: 400;
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
Expand Down
1 change: 1 addition & 0 deletions src/layouts/hass-subpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class HassSubpage extends LitElement {
height: var(--header-height);
padding: 8px 12px;
background-color: var(--app-header-background-color);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
font-weight: 400;
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
Expand Down
1 change: 1 addition & 0 deletions src/panels/developer-tools/ha-panel-developer-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class PanelDeveloperTools extends LitElement {
top: 0;
z-index: 4;
background-color: var(--app-header-background-color);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
width: var(--mdc-top-app-bar-width, 100%);
padding-top: env(safe-area-inset-top);
color: var(--app-header-text-color, white);
Expand Down
1 change: 1 addition & 0 deletions src/panels/energy/ha-panel-energy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ class PanelEnergy extends LitElement {
}
.header {
background-color: var(--app-header-background-color);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none);
position: fixed;
Expand Down
2 changes: 2 additions & 0 deletions src/panels/lovelace/hui-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,8 @@ class HUIRoot extends LitElement {
position: fixed;
top: 0;
width: var(--mdc-top-app-bar-width, 100%);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset);
backdrop-filter: var(--app-header-backdrop-filter, unset);
padding-top: env(safe-area-inset-top);
z-index: 4;
transition: box-shadow 200ms linear;
Expand Down

0 comments on commit 38f8b4e

Please sign in to comment.