Skip to content

Commit

Permalink
a11y: Use underlined links in HC themes
Browse files Browse the repository at this point in the history
  • Loading branch information
hbons committed Feb 14, 2024
1 parent 20501b7 commit 6145811
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/vs/platform/theme/common/colorRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ export const selectionBackground = registerColor('selection.background', { light
// ------ text colors

export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hcDark: Color.black, hcLight: '#292929' }, nls.localize('textSeparatorForeground', "Color for text separators."));
export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hcDark: '#3794FF', hcLight: '#0F4A85' }, nls.localize('textLinkForeground', "Foreground color for links in text."));
export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hcDark: '#3794FF', hcLight: '#0F4A85' }, nls.localize('textLinkActiveForeground', "Foreground color for links in text when clicked on and on mouse hover."));

export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hcDark: '#21A6FF', hcLight: '#0F4A85' }, nls.localize('textLinkForeground', "Foreground color for links in text."));
export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hcDark: '#21A6FF', hcLight: '#0F4A85' }, nls.localize('textLinkActiveForeground', "Foreground color for links in text when clicked on and on mouse hover."));

export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#000000', hcLight: '#FFFFFF' }, nls.localize('textPreformatForeground', "Foreground color for preformatted text segments."));
export const textPreformatBackground = registerColor('textPreformat.background', { light: '#0000001A', dark: '#FFFFFF1A', hcDark: '#FFFFFF', hcLight: '#09345f' }, nls.localize('textPreformatBackground', "Background color for preformatted text segments."));
export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#f2f2f2', dark: '#222222', hcDark: null, hcLight: '#F2F2F2' }, nls.localize('textBlockQuoteBackground', "Background color for block quotes in text."));
Expand Down
5 changes: 5 additions & 0 deletions src/vs/workbench/browser/media/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ body.web {
text-decoration: none;
}

.monaco-workbench.hc-black p > a,
.monaco-workbench.hc-light p > a {
text-decoration: underline !important;
}

.monaco-workbench a:active {
color: inherit;
background-color: inherit;
Expand Down
7 changes: 0 additions & 7 deletions src/vs/workbench/contrib/chat/browser/media/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,6 @@
color: var(--vscode-textPreformat-foreground);
}

.hc-black .interactive-item-container .value .rendered-markdown a:hover,
.hc-black .interactive-item-container .value .rendered-markdown a:active,
.hc-light .interactive-item-container .value .rendered-markdown a:hover,
.hc-light .interactive-item-container .value .rendered-markdown a:active {
color: var(--vscode-textPreformat-foreground);
}

.interactive-list {
overflow: hidden;
}
Expand Down

0 comments on commit 6145811

Please sign in to comment.