-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Add high contrast light theme kind #144759
Conversation
@aeschli as for breaking web API, I suggest to give John Keech a ping either in an issue or via chat, in the end Codespaces is the only external consumer of our API so far. Not sure they would actually leverage any theming related embedder API we have, other than setting the default theme. |
In places like these: export const ACTIVITY_BAR_BORDER = registerColor('activityBar.border', {
dark: null,
light: null,
hcDark: contrastBorder
}, localize('activityBarBorder', "Activity bar border color separating to the side bar. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); Shouldn't we also set a default for |
Yes, this is the task |
Awesome, thanks so much for getting this going! Working on my items today/early next week. |
Seeing this warning after adding values for
vscode/extensions/git/package.json Lines 2278 to 2288 in 502276a
|
Pushed a fix |
Finished my tasks. Let me know if anything looks off 🙏 I'll update the letterpress assets in distro as well once this is in. |
@@ -36,10 +36,12 @@ | |||
animation: monaco-findInput-highlight-1 100ms linear 0s; | |||
} | |||
.hc-black .monaco-findInput.highlight-0 .controls, |
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 like there are still hard coded colors in findInput.css that we should externalize.
hcLight uses the same color as hcDark, is that intended?
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 so that hc-light uses the light colors/animations. Thansk for catching that.
As for the hard coded bits, are you referencing the disabled background rules and the animation backgrounds? I'd need to go decide on specific colors for each theme if all of them have been using the same values all this time. Might make sense to do this on a separate issue since it goes beyond HC.
@@ -23,7 +23,7 @@ export function getIconClass(iconPath: { dark: URI; light?: URI } | undefined): | |||
} else { | |||
iconClass = iconClassGenerator.nextId(); | |||
dom.createCSSRule(`.${iconClass}`, `background-image: ${dom.asCSSUrl(iconPath.light || iconPath.dark)}`); | |||
dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: ${dom.asCSSUrl(iconPath.dark)}`); | |||
dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}, .hc-light .${iconClass}`, `background-image: ${dom.asCSSUrl(iconPath.dark)}`); |
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.
Shouldn't hc-light
use iconPath.light
(if available)
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.
Whoops, fixed.
Thanks a lot @daviddossett ! |
Added mising registrations. Thanks for the tip on removing the type 👍 |
I made a search to
|
Merging the PR so we get more testing. |
Thanks—will take a look and fix as needed |
FYI I updated the letterpress assets in distro to match the new naming scheme e.g. Fixed missing or wrong class additions in 74157b3 |
Fixes #144193
ColorScheme.HIGH_CONTRAST_LIGHT
(valuehcLight
), renamedColorScheme.HIGH_CONTRAST
(old valuehc
), toColorScheme.HIGH_CONTRAST_DARK
(new valuehcDark
)ColorScheme.isHighContrast
to test if the current theme is a high contrast themehcDark
andhcLight
.hcLight
is currently optional and uses eitherhcDark
if it isnull
or color id elselight
if it is a color valuehcLight
in all the registrations (let me know if I can help)hc-light
hcLight
ishc-light
(ForhcDark
it ishc-black
, as beforeletterpress-hcDark.svg
)preferredHighContrastLightColorTheme
defaults.highContrastLight
light
highContrast
is not renamed to not break any existing userswalkthroughs
contribution point: new optional propertysteps.media.image.hcLight
highcontrast
icons for both hc light and dark (to be reconsidered) (see here)ColorScheme.HIGH_CONTRAST_LIGHT
(valuehcLight
), renamedColorScheme.HIGH_CONTRAST
(old valuehc
), toColorScheme.HIGH_CONTRAST_DARK
(new valuehcDark
)(@bpasero speak up if we must not break the web API)