-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(menu): md-menu panel theme supports dark mode #11230
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep that is why i used {{foreground-4}}
looks good in both modes dark/light and also is recommended directly in theming.js
src/components/menu/menu-theme.scss
Outdated
|
||
md-menu-item { | ||
color: '{{background-A200-0.87}}'; | ||
color: '{{foreground-1-0.87}}'; |
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.
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)
.
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.
fixed
a113b9d
to
3128f93
Compare
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.
LGTM
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-menu
panel is always using light mode hues even when the theme is dark mode.Issue Number:
Fixes #11199.
What is the new behavior?
The
md-menu
panel 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: