Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(menu): md-menu panel theme supports dark mode #11230

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/components/menu/menu-theme.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
md-menu-content.md-THEME_NAME-theme {
background-color: '{{background-A100}}';
background-color: '{{background-hue-1}}';

md-menu-item {
color: '{{background-A200-0.87}}';
color: '{{foreground-1}}';

md-icon {
color: '{{background-A200-0.54}}';
color: '{{foreground-2}}';
}

.md-button[disabled] {
color: '{{background-A200-0.25}}';
color: '{{foreground-3}}';

md-icon {
color: '{{background-A200-0.25}}';
color: '{{foreground-3}}';
}
}

}

md-menu-divider {
background-color: '{{background-A200-0.11}}';
background-color: '{{foreground-4}}';
Copy link
Member

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.

Copy link
Contributor Author

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

}
}