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

fix(a11y): fix forced colors for file upload button #3114

Merged
merged 9 commits into from
Mar 27, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
@import '../../../styles/shared-sass-variables';
@import './mgt-file-upload.theme';


$file-upload-button-border: var(--file-upload-button-border, none);
$file-upload-dialog-replace-button-border: var(--file-upload-dialog-replace-button-border, 1px solid var(--neutral-foreground-rest));
$file-upload-dialog-replace-button-border: var(
--file-upload-dialog-replace-button-border,
1px solid var(--neutral-foreground-rest)
);
$file-upload-dialog-keep-both-button-border: var(--file-upload-dialog-keep-both-button-border, none);
$file-upload-dialog-border: var(--file-upload-dialog-border, 1px solid var(--neutral-fill-rest));
$file-upload-dialog-width: var(--file-upload-dialog-width, auto);
Expand Down Expand Up @@ -234,9 +236,58 @@ $file-upload-border-drag: var(--file-upload-border-drag, 1px dashed #0078d4);
}
}

[dir="rtl"] {
:host .file-upload-status{
[dir='rtl'] {
:host .file-upload-status {
left: 0;
right: 28px;
}
}

@media (forced-colors: active) {
gavinbarron marked this conversation as resolved.
Show resolved Hide resolved
:host {
fluent-button {
.upload-icon {
path {
fill: highlighttext;
}
}

&.file-upload-button {
&::part(control) {
border-width: 1px;
border-style: solid;
border-color: buttontext;
background: highlight;

&:hover {
background: highlighttext;
border-color: highlight;
}
}

.upload-text {
color: highlighttext;
}
}

&:hover {
.upload-icon {
path {
fill: highlight;
}
}

&.file-upload-button {
&::part(control) {
border-color: highlight;
background: highlighttext;
}

.upload-text {
color: highlight;
}
}
}
}
}
}
Loading