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 edd96db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ha-top-app-bar-fixed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export class HaTopAppBarFixed extends TopAppBarFixedBase {
--app-header-background-color,
var(--mdc-theme-primary)
);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, none);
backdrop-filter: var(--app-header-backdrop-filter, none);
}
.mdc-top-app-bar__title {
padding-inline-start: 20px;
Expand Down
2 changes: 2 additions & 0 deletions src/components/ha-top-app-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export class HaTopAppBar extends TopAppBarBase {
--app-header-background-color,
var(--mdc-theme-primary)
);
-webkit-backdrop-filter: var(--app-header-backdrop-filter, none);
backdrop-filter: var(--app-header-backdrop-filter, none);
}
`,
];
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, none);
backdrop-filter: var(--app-header-backdrop-filter, none);
padding-top: env(safe-area-inset-top);
z-index: 4;
transition: box-shadow 200ms linear;
Expand Down

0 comments on commit edd96db

Please sign in to comment.