#Footer elevation
1 messages ยท Page 1 of 1 (latest)
Yeha but 8% opacity
OMG yeah it's barely not visible
The predefined shadows we have are too mild
8% opacity is good for card but for overlay element it's too small
This is actually the most visible one ๐
especially for this section becuase it's very goal of existance is to float across other sections ๐
Too bad it does not support the new
background:
๐คฃ
I just tried
Is there a theme variable for me to jsut try?
If possible a variable only for that footer?
(IF not a generic one would do)
--ha-box-shadow-l it's generic but only used by the footer now
With 28% opacity
The current value is 0 8px 12px 0 #00000014
Box shadow has lot of parameters ๐
We should have --ha-view-footer-box-shadow and we should default to --ha-box-shadow-l
How about something like --floating-element-shadow? I feel like the fab should have a common shadow with the footer. Not a strong opinion though
NOt able to test on my side..
But fine, i trust you
tried to add
ha-box-shadow-l: 0px 0px 30px 20px rgba(0,0,0,0.3)
To my theme
nope
Oh I think I know why...
export const semanticStyles = css`
html {
--ha-box-shadow-s: var(--ha-shadow-offset-x-sm) var(--ha-shadow-offset-y-sm) var(--ha-shadow-blur-sm) var(--ha-shadow-spread-sm) var(--ha-color-shadow-light);
--ha-box-shadow-m: var(--ha-shadow-offset-x-md) var(--ha-shadow-offset-y-md) var(--ha-shadow-blur-md) var(--ha-shadow-spread-md) var(--ha-color-shadow-light);
--ha-box-shadow-l: var(--ha-shadow-offset-x-lg) var(--ha-shadow-offset-y-lg) var(--ha-shadow-blur-lg) var(--ha-shadow-spread-lg) var(--ha-color-shadow-light);
--ha-box-shadow-xl: var(--ha-shadow-offset-x-xl) var(--ha-shadow-offset-y-xl) var(--ha-shadow-blur-xl) var(--ha-shadow-spread-xl) var(--ha-color-shadow-light);
}
`;
We compute this variable so it can't be overriden
ha-box-shadow-l: "0px 0px 30px 20px rgba(0,0,0,0.3) !important" gogogo
or I override every little variable?
@deft gorge Yes but that's mean you will change the color for every shadow
btw did you add multiple cards to the footer thing @deft gorge ? wouldn't we expect the footer "wrapper" to have the shadow and perhaps even a bit of a background?
It's a vertical stack
I'm just testing for now
But the shadow confused me so I stoped testing ๐
I did a small reseach :
Shadow opacity for overlay elements:
Material Design 3 โ Level 5 (modals) โ 15% + 30% (2 layers)
Fluent 2 (light) โ shadow64 (dialogs) โ 20% + 24% (2 layers)
Fluent 2 (dark) โ shadow64 (dialogs) โ 40% + 48% (2 layers)
Tailwind โ shadow-2xl โ 25%
Carbon / IBM โ Dropdowns โ 30%
Ant Design โ Dropdowns โ 8% + 12% + 5% (3 layers)
Most design systems use multi layer box shadow :
box-shadow:
0 2px 4px rgba(0,0,0,0.15),
0 8px 24px rgba(0,0,0,0.10);
And here's the PR : https://github.com/home-assistant/frontend/pull/51378
Needs design review of course
@gritty perch ping ๐
Ooh I do like it.
This is a good case for #designers channel. Forwarding it there to get some feedback.