Skip to content
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

Web Component High contrast bug fixes #33300

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
colorNeutralForeground1,
colorNeutralStrokeAccessible,
display,
forcedColorsStylesheetBehavior,
shadow4,
spacingHorizontalL,
spacingHorizontalS,
Expand Down Expand Up @@ -50,17 +51,17 @@ export const styles: ElementStyles = css`
border: 2px;
pointer-events: none;
}
.tooltipline {
.tooltip-line {
padding-inline-start: 8px;
height: 50px;
border-inline-start: 4px solid;
}
.tooltiplegend {
.tooltip-legend-text {
font-size: 13px;
color: theme.semanticColors.bodyText;
text-align: start;
}
.tooltipdata {
.tooltip-data-y {
font-weight: bold;
font-size: 30px;
text-align: start;
Expand Down Expand Up @@ -164,4 +165,17 @@ export const styles: ElementStyles = css`
${typographyBody1StrongStyles}
color: ${colorNeutralForeground1};
}
`;
`.withBehaviors(
forcedColorsStylesheetBehavior(css`
.legend-rect,
.tooltip-line {
Anush2303 marked this conversation as resolved.
Show resolved Hide resolved
forced-color-adjust: none;
}

.tooltip-legend-text,
.tooltip-content-y {
forced-color-adjust: auto;
color: rgb(255, 255, 255);
}
`),
);
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export function horizontalbarchartTemplate<T extends HorizontalBarChart>(): Elem
class="tooltip"
style="inset-inline-start: ${x => x.tooltipProps.xPos}px; top: ${x => x.tooltipProps.yPos}px"
>
<div class="tooltipline" style="border-color: ${x => x.tooltipProps.color};">
<div class="tooltiplegend">${x => x.tooltipProps.legend}</div>
<div class="tooltipdata" style="color: ${x => x.tooltipProps.color};">${x => x.tooltipProps.yValue}</div>
<div class="tooltip-line" style="border-color: ${x => x.tooltipProps.color};">
<div class="tooltip-legend-text">${x => x.tooltipProps.legend}</div>
<div class="tooltip-data-y" style="color: ${x => x.tooltipProps.color};">
${x => x.tooltipProps.yValue}
</div>
</div>
</div>
`,
Expand Down
Loading