fix(menu): md-menu panel theme supports dark mode#11230
Conversation
|
|
Splaktar
left a comment
There was a problem hiding this comment.
Looks good. I just want to remove the one redundant opacity setting. Thanks!
|
|
||
| md-menu-divider { | ||
| background-color: '{{background-A200-0.11}}'; | ||
| background-color: '{{foreground-4}}'; |
There was a problem hiding this comment.
background-hue-3-0.79 seems to get me the same color as the current light mode rgb(227, 227, 227). But doesn't work for dark mode (as it's too dark). This currently gets me rgb(224, 224, 224) which is slightly darker, but is probably close enough.
It doesn't appear that we can use opacity on foreground hues like we can with background hues. So I think that this is the best we can do with the current theming support.
This also lines up with the comments in theming.js: {{foreground-4}} - used for dividers.
There was a problem hiding this comment.
yep that is why i used {{foreground-4}} looks good in both modes dark/light and also is recommended directly in theming.js
|
|
||
| md-menu-item { | ||
| color: '{{background-A200-0.87}}'; | ||
| color: '{{foreground-1-0.87}}'; |
There was a problem hiding this comment.
The -0.87 is redundant here and can be removed. For light mode, foreground-1 is rgba(0,0,0,0.87) and for dark mode it is rgba(255,255,255,1.0).
a113b9d to
3128f93
Compare
Closes #11199
PR Checklist
Please check that your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The
md-menupanel is always using light mode hues even when the theme is dark mode.Issue Number:
Fixes #11199.
What is the new behavior?
The
md-menupanel use dark mode hues when the theme is set to dark mode.Does this PR introduce a breaking change?
Other information
Dark before:

Dark after:

Light before:

Light after:
