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

[4.0] [a11y] Contrast of Drop down chevron #28680

Closed
wants to merge 2 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
Next Next commit
draft
  • Loading branch information
astridx committed Apr 14, 2020
commit 176394ec6adfb200656b69823c6643e550d905c8
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions administrator/templates/atum/images/select-bg-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions administrator/templates/atum/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,15 @@ $custom-select-indicator-padding: 3rem;
$custom-select-bg: var(--atum-bg-light);
$custom-select-bg-size: 116rem;
$custom-select-indicator: url(../images/select-bg.svg);
$custom-select-indicator-light: url(../images/select-bg-light.svg);
$custom-select-indicator-rtl: url(../images/select-bg-rtl.svg);
$custom-select-indicator-light-rtl: url(../images/select-bg-light-rtl.svg);
$custom-select-indicator-active: url(../../../images/select-bg.svg);
$custom-select-indicator-active-rtl: url(../../../images/select-bg-rtl.svg);
$custom-select-background: $custom-select-indicator no-repeat right center / $custom-select-bg-size; // Used so we can have multiple background elements (e.g., arrow and feedback icon)
$custom-select-background-light: $custom-select-indicator-light no-repeat right center / $custom-select-bg-size;
$custom-select-background-rtl: $custom-select-indicator-rtl no-repeat left center / $custom-select-bg-size; // Used so we can have multiple background elements (e.g., arrow and feedback icon)
$custom-select-background-light-rtl: $custom-select-indicator-light-rtl no-repeat left center / $custom-select-bg-size;
$custom-select-box-shadow: $atum-box-shadow;
$custom-select-bg-size-sm: 75rem;
$custom-select-multiple-padding-y: .3rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,37 @@
&.custom-select-color-state {

&.custom-select-success {
background: $custom-select-background-light;
color: theme-color("success");
background-color: theme-color("success");
border-color: theme-color("success");

[dir=rtl] & {
background: $custom-select-background-light-rtl;
color: theme-color("success");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to redefine these color properties in RTL (color, bg and border)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ciar4n, but I need color, bg and border for rtl, as it is set for the variable
$custom-select-background-light-rtl and I have to override it.

Without
ماژول ها  مسیر سایت   test   مدیریت

With
ماژول ها  مسیر سایت   test   مدیریت(1)

I could set the properties in the variable $custom-select-background-light-rtl differently. But in my opinion, this would make a bigger mess because it would be very different from $custom-select-background-rtl.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I see why you might need background-color as you are re-setting the color to transparent with background: $custom-select-background-light-rtl;. The border and color should be fine without but maybe I'm missing something.

background-color: theme-color("success");
border-color: theme-color("success");
}

option {
color: $custom-select-color;
background-color: var(--white-offset);
}
}

&.custom-select-danger {
background: $custom-select-background-light;
color: theme-color("danger");
background-color: theme-color("danger");
border-color: theme-color("danger");

[dir=rtl] & {
background: $custom-select-background-light-rtl;
color: theme-color("danger");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to redefine these color properties in RTL (color, bg and border)

background-color: theme-color("danger");
border-color: theme-color("danger");
}

option {
color: $custom-select-color;
background-color: var(--white-offset);
Expand Down