-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Minor style updates #60304
Minor style updates #60304
Conversation
This also fixes #52854 (comment) |
src/vs/base/browser/ui/menu/menu.css
Outdated
@@ -53,6 +53,14 @@ | |||
line-height: 1; | |||
} | |||
|
|||
.monaco-menu .monaco-action-bar.vertical .keybinding { | |||
opacity: 0.55; |
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.
this shouldn't apply in high contrast mode
src/vs/base/browser/ui/menu/menu.css
Outdated
@@ -124,6 +132,8 @@ | |||
|
|||
.monaco-menu .monaco-action-bar.vertical .action-item { | |||
border: 1px solid transparent; /* prevents jumping behaviour on hover or focus */ | |||
border-left: 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.
this introduces jumping behavior, please remove
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 jumping in High Contrast mode?
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.
Jumping behavior has been fixed.
@@ -79,7 +79,7 @@ | |||
} | |||
|
|||
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-menu-item { | |||
height: 1.8em; | |||
height: 2em; |
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.
i don't think we should increase the size of the menu items
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.
@misolori this would not be shipped in high contrast mode. |
@infinnie the color contrast ratio has to pass on our default themes (light, dark and high contrast), so it still applies in this instance for light & dark. |
@misolori Maybe what is needed is that we should use a darker color for menu text. |
@infinnie we use the global Since the menu is on a white background, the lightest color you can go with is |
Can't it have ratio less than 4.5:1 but using good contrast (maybe even the same color as text) on hover/focus? Those tooltips are the secondary info, 99.9% of the time people don't care about them. |
@usernamehw regardless of importance, all text must be accessible. The WCAG 2 requirements for contrast state that all text must pass a minimum contrast of 4.5:1 |
|
Disabled/Inactive items are part of the exception:
|
Visual Studio Code’s own TypeScript plugin uses an opacity for unused variables too small to pass the color contrast ratio check. Maybe this should be changed first. Many color themes also do not provide enough color contrast for certain types of tokens like comments. |
@infinnie While I would encourage you to file bugs against those items, I'd suggest to keep this conversation on-topic for this PR. |
OK, the aforementioned problem has been fixed in my previous commit. |
src/vs/workbench/common/theme.ts
Outdated
@@ -122,7 +122,7 @@ export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { | |||
|
|||
export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { | |||
dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5), | |||
light: transparent(TAB_ACTIVE_FOREGROUND, 0.5), | |||
light: transparent(TAB_ACTIVE_FOREGROUND, 0.7), |
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.
Please don't add fixes for issues not related to this PR (menu styling). Thanks!
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.
OK I would edit that in another branch later.
This reverts commit 43bf878.
Sync latest
After discussing this with the team internally, the consensus is we'd be happy to introduce a new theme color for keybinding text that would allow theme authors to style that property. However, we would not update our default themes since the native menus do not use this style: So if you'd like, you can update your PR to reflect this change or @sbatten can do it on our end. |
@misolori I guess a better option is that one could configure the opacity of the keyboard shortcuts instead of the color. This would work better if he or she were to switch from a dark theme to a light one or vice versa. |
@infinnie I think by default this inherits the menu foreground color so they wouldn't have to worry about it. Also, you can control the opacity of the color by utilizing the 8 digit hex color ( |
Isn't 10% - |
@infinnie sorry, you're right. |
@misolori you mentioned the wrong person. |
Update to #60288. Sorry for the wrong author name in the initial pull request.
Screenshot:![image](https://user-images.githubusercontent.com/8168391/46664359-59ddce00-cbf3-11e8-9a34-cbdd166473e8.png)
(Custom color settings below)