-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
refactor menu theming to be cleaner and remove css colors #58568
Conversation
@sbatten please clean up the merge conflicts and bring to latest in master |
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 change makes sense to me, however introduces quite a bit of dynamic CSS. Ideally CSS is only used for complicated behaviour (e.g. when defining styles on :hover
or :active
). For simple widgets (e.g. the Button
) we just try to set the style on the element directly. This would mean, instead of adding dynamic CSS, the Menu
would have to just set the style on each menu item. But since the menu is probably never visible when the theme changes, it would probably even be fine to not update the colors dynamically but just using them when the menu is created again. Not sure how easy that is given the action items seem to be very generic, but wanted to bring it up.
@sbatten when you do these changes please cross check with the standalone editor as well that things are fine. |
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.
Much better 👍 .
There is one color usage left in .context-view.monaco-menu-container
: background-color: white
. not sure if that one should also be externalized?
@bpasero don't think that one is supposed to be there anymore, removed it |
fixes #58496 and microsoft/monaco-editor#1013