Problem/Motivation
This is part of the CSS modernization initiative, and intended to be worked on by our Google Summer of Code student only. This is intended to be a straightforward second issue to easily onboard the student.
The first issue was regarding the autocomplete-loading.module stylesheet.
Steps to reproduce
The stylesheet at https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/claro/css/components/autocomplete-loading.module.pcss.css needs to be refactored to make use of modern CSS and Drupal core's PostCSS tooling.
Proposed resolution
Use CSS Logical Properties where appropriate
Use CSS nesting where appropriate
Remaining tasks
We need two patches. One for Drupal 9.5.x and one for Drupal 10.0.x
We need a followup issue to refactor this component in Drupal 10.0.x to make use of component-level CSS custom properties.
User interface changes
None. There should be no visual differences.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | interdiff-23_25.txt | 1.32 KB | gauravvvv |
| #25 | 3294001-25.patch | 5.36 KB | gauravvvv |
Issue fork drupal-3294001
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
aditya4478 commentedComment #3
sasanikolic commentedI think this can be gone, since it's IE related.
Comment #4
aditya4478 commentedIgnore this patch because it not contains IE blocks
Comment #5
aditya4478 commentedPlease ignore this patch, By-mistake i placed different patch here
Comment #6
aditya4478 commentedNeeds improvement, ignore this patch
Comment #7
aditya4478 commentedNo proper nesting done. Ignore this patch
Comment #8
aditya4478 commentedProper nesting done.
Comment #9
aditya4478 commentedNesting is done. rtl statement is normalized & css logical property is used.
Comment #10
aditya4478 commentedconsider #8 and #9 patches
Comment #11
sasanikolic commentedI think we can do some more nesting improvements here. Can't we also. nest these selectors
.js .form-autocomplete.is-autocompletingand maybe rtl ones too?Comment #12
aditya4478 commentedNoted.
Comment #13
sasanikolic commentedThat looks quite good to me, but needs another pair of eyes to pass.
Comment #14
sasanikolic commentedComment #16
ckrinaComment #17
shivam-kumar commentedRefactored the patch for 10.1.x, as the patch failed to apply in #12.
Comment #18
shivam-kumar commentedFixed CCF of #17
Comment #19
smustgrave commentedIf this is suppose to use nesting shouldn't
[dir="rtl"] .claro-autocomplete__message {.js .form-autocomplete {be nested?
Comment #20
gauravvvv commentedUpdated few selectors and improved nesting. Please review
Comment #21
smustgrave commentedNesting appears to be correct.
Checking that the .css file is unchanged, to show nothing actually changed, and only change
Seems to just have moved which I don't see as an issue.
Comment #22
bnjmnmOne of the requests of this issue is to use logical properties where possible. This RTL styling can be removed entirely by changing the LTR version to use inset-inline-end instead of right https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline
Comment #23
gauravvvv commentedAddressed #22. Please review
Comment #24
smustgrave commentedThere are still other references to [dir="rtl"] should they not be removed?
And this was previously tagged for a follow up if that can be addressed? Think there was something in the #frontend channel but not sure.
Comment #25
gauravvvv commentedComment #26
gauravvvv commentedhere RTL is adding a new icon, so I don't think so we should remove it.
I have added a patch with some more css refactor. Added before and after patch screenshot. Please review
Comment #27
smustgrave commentedDon't think the follow up is needed anymore.
Thanks.
Comment #32
gauravvvv commentedUnrelated failure. restoring status
Comment #35
stanzin commentednew patch for D11.
Comment #36
smustgrave commented#25 still applied to 11.x branch.
Comment #37
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #40
shmy commentedI've converted the #35 patch to a MR.
Comment #41
akshayadhavComment #42
smustgrave commentedNeed to know what was changed in #35, no interdiff was provided or comment
#25 was previously RTBC not #35.
Comment #43
gauravvvv commentedPatch #25 still applies; there is no need for new patches. I have added an interdiff between Patch #25 and #35. In Patch #35, logical properties that are not needed here are being removed.
Comment #46
smustgrave commentedAgreed, hiding the MRs and patches after 25. If there is something wrong with it then it should be noted.
Comment #48
nod_Used #25 for commit.
Committed 8ab1f3c and pushed to 11.x. Thanks!