Closed (fixed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
Claro theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2023 at 05:50 UTC
Updated:
14 Feb 2023 at 12:04 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
gauravvvv commentedI have provided the patch, Please review.
Comment #3
nidhi27I have tested above patch on version 10.1.0 and chevron down icon is showing as expected on left side on RTL dir.
I have checked in desktop and mobile view and attached screenshot as well.
Comment #4
bnjmnmIt should be possible to eliminate the rtl specific padding by converting the default padding to use padding-inline-start/end which accounts for ltr/rtl automatically.
The existing
.views-ui-dialog .form-element--type-selectstyle that is making this patch necessary only needs to style the y axis, but the fact that it is styling the x axis as well is what is causing this problem in the first placechange the background styling for the views select to change background position y and you inherit the working RTL x position from
.form-element--type-selectIn other words you get the same result as all this additional CSS by changing a
background-position: 0% 56%;tobackground-position-y: 56%;And changing one or two lines sure beats adding nine of them 🙂!
While the chevron is closer to the element edge when in forced colors mode, adjusting the padding shouldn't make a difference as it switches to using the native chevron in forced-colors which does not acknowledge padding. This is default behavior for select elements outside of views as well so doesn't need to be addressed in this issue scope regardless
Comment #5
gauravvvv commentedAddressed #4, Attahced patch & interdiff for same. Please review
Comment #6
deepalij commentedApplied and tested patch #5 on Drupal 10.1.x-dev
The patch applied cleanly
The issue gets resolved after applying the patch. Now, the select list chevron-down icon is displaying on the correct position in RTL dir in views.
Refer to the screenshots in #3
Comment #7
bnjmnmWhat need does adding this start padding address? It seems like the right padding (now inline-end) is all that is needed. Perhaps I'm missing something?
Comment #8
gauravvvv commentedRemoved
padding-inline-start: calc(1rem - var(--input-border-size));Attached interdiff for same. please review
Comment #9
bnjmnmLooks good @Gauravvv. No additional lines of code, changing the background position to just the dimension that needs it, and changing the padding to a logical RTL-friendly style seems to take care of it.
Comment #13
lauriiiCommitted 59ffbd8 and pushed to 10.1.x and cherry-picked to 10.0.x. Also backported to 9.5.x by running
yarn build:csslocally. Thanks!