Problem/Motivation
This is part of the CSS modernization initiative.
The first issue was regarding the form--password-confirm stylesheet.
Steps to reproduce
The stylesheet at https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/claro/css/components/form--password-confirm.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 |
---|---|---|---|
#26 | Screen Shot 2023-03-13 at 3.24.55 PM.png | 110.42 KB | smustgrave |
#25 | interdiff-22_25.txt | 8.84 KB | Gauravvvv |
#25 | 3294005-25.patch | 14.67 KB | Gauravvvv |
| |||
#23 | after-password-confirm.png | 74.42 KB | smustgrave |
#23 | before-password-confirm.png | 71.32 KB | smustgrave |
Issue fork drupal-3294005
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:
- 3294005-refactor-claros-form--password-confirm changes, plain diff MR !3736
Comments
Comment #2
Aditya4478 CreditAttribution: Aditya4478 commentedNo block for IE in this file. It's good to go for review
Comment #3
anoopsingh92Comment #4
anoopsingh92Hi @Aditya4478, I reviewed your patch #2. It is applying cleanly it looks good to me.
Thanks for the patch.
Comment #5
Aditya4478 CreditAttribution: Aditya4478 commentedComment #6
Aditya4478 CreditAttribution: Aditya4478 commentedOnly nesting done with proper use of "&" . No scope for variable creation found. There is no IE block, so no removal needed. And since its 9.5.x version "rtl" statements are untouched.
Comment #7
Aditya4478 CreditAttribution: Aditya4478 commentedWorked on "rtl" statements
Edited some CSS logical properties
Comment #8
Aditya4478 CreditAttribution: Aditya4478 commentedConsider #6 & #7 patches
Comment #9
sasanikolic CreditAttribution: sasanikolic at Google Summer of Code commentedThis selector is not correct, as it's reversed. It should be .js .password-confirm__confirm.
Same as above, this is also turned around and it should be .is-initial .password-strength__bar.
This selector should be .is-initial.is-password-empty .password-strength__title.
Also, this should be in the media query.
Comment #10
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#10 Please review the patch
Comment #11
Aditya4478 CreditAttribution: Aditya4478 commented#9 changes included except media query (3rd).
Used & at last in nesting. You corrected me once not to use at last, but here it seems everything working. So ....
Comment #12
sasanikolic CreditAttribution: sasanikolic at Google Summer of Code commentedWe need to look into that compilation process of the comments - this doesn't belong in here but above the other nested definition.
Comment #13
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#11 Patch failed
Comment #14
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#14 Please review the patch
Including #12 comments
Comment #15
ckrinaComment #16
ckrinaComment #17
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 200, following Review a patch or merge require as a guide.
Running #14 against 10.1 as I think we missed the boat for 10.0
Verified the form-password by creating a user and filling in the password field.
The suggestions appear correct and all styling around the password.
+1 for RTBC
Am moving back to NW because this was initially tagged for a followup and don't know what that's for. (maybe not needed)
Comment #18
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedUpdated short-hand properties. Please review
Comment #19
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis will need screenshots since .css changed.
Comment #20
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedI have added before/after patch screenshots. please review
Before patch
After patch
Comment #21
smustgrave CreditAttribution: smustgrave at Mobomo commentedMore nesting can be done.
Comment #22
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedAddressed #21, Attached patch and interdiff. please review
Comment #23
smustgrave CreditAttribution: smustgrave at Mobomo commentedAfter
Nesting looks better
Adding some screenshots to show nothing broke.
Comment #24
lauriiiThese selectors are really hard to read, and I think nesting them like this makes them even harder 😐 Unless we can figure out how to make them read better, I would probably prefer reverting these lines back to the original code.
This should be merged with the rule above this.
Comment #25
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedAddressed #24, attached patch and interdiff for same. please review
Comment #26
smustgrave CreditAttribution: smustgrave at Mobomo commentedSee attached screenshot. Using claro test module and didn't see anything break.
Comment #28
smustgrave CreditAttribution: smustgrave at Mobomo commentedSeems random failure
Comment #33
smustgrave CreditAttribution: smustgrave at Mobomo commentedRandom failure.
Comment #35
nod_Comment #36
nod_#3353641: make use of component-level CSS custom properties in Claro's form--password-confirm stylesheet
Committed f43ee84 and pushed to 10.1.x. Thanks!