-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add css var for header webkit backdrop filter #20473
Add css var for header webkit backdrop filter #20473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only implemented this for the Lovelace dashboard now, we should probably do it more general?
Do I need to replicate the change in many places or there is a way to declare this variable once and apply to all headers? |
Most use |
3bc14ca
to
9a3782a
Compare
9a3782a
to
91a9458
Compare
Ok, I've added to those + some places I thought were relevant, maybe they are not needed to those general |
@@ -27,6 +27,9 @@ export class HaTopAppBarFixed extends TopAppBarFixedBase { | |||
padding-inline-start: 20px; | |||
padding-inline-end: initial; | |||
} | |||
.header { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is an element that has the header
class? Have you tested this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is where this should go (and it was already done in the second commit):
frontend/src/panels/lovelace/hui-root.ts
Line 904 in 35cf306
.header { |
I think this and the one in
ha-top-app-bar.ts
should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is an element that has the
header
class? Have you tested this?
Oh sorry, I got confused here, if I want to add it directly to ha-top-app-bar-fixed can I just remove ".header"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nezz but would it then go to all headers in HA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, that way it'd only get added to the dashboards. Add it under this one:
.mdc-top-app-bar { |
and this one:
frontend/src/components/ha-top-app-bar.ts
Line 18 in 38f8b4e
.mdc-top-app-bar { |
f75c5da
to
38f8b4e
Compare
src/panels/lovelace/hui-root.ts
Outdated
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset); | ||
backdrop-filter: var(--app-header-backdrop-filter, unset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-webkit-backdrop-filter: var(--app-header-backdrop-filter, unset); | |
backdrop-filter: var(--app-header-backdrop-filter, unset); | |
-webkit-backdrop-filter: var(--app-header-backdrop-filter, none); | |
backdrop-filter: var(--app-header-backdrop-filter, none); |
I believe the default value should be none, not unset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that both properties should be added everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I first need to know where exactly they need to be and where they don't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed from other places and kept it in these 3 files you see in the changes, what do you think?
38f8b4e
to
edd96db
Compare
After having a look around, it seems that only these two panels support transparency in their headers: The rest of the views (logbook, settings, notifications, etc) don't allow the content to slide under the header. Therefore adding the |
Developer tools header too |
Nice, I haven't found the developer tools. For future reference that's styled here for offset content: frontend/src/panels/developer-tools/ha-panel-developer-tools.ts Lines 156 to 158 in 9903e22
|
Thank you for working on this. Just wondering would it be possible to implement some sort of support for kiosk-mode? On mobile devices with |
You can workaround this by setting a app-header-background-color right? This would change the color of the status bar too |
It doesn't unfortunatly, even when setting a rgba for |
Keep an eye on this PR, it may help dealing with this: home-assistant/iOS#2757 |
Breaking change
Proposed change
This adds a CSS variable to customize -webkit-backdrop-filter for header.
Screen_Recording_2024-03-10_at_16.56.26.mov
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: