Problem/Motivation
This is part of the CSS modernization initiative.
The first issue was regarding the form--text stylesheet.
Steps to reproduce
The stylesheet at https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/claro/css/components/form--text.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 |
---|---|---|---|
#37 | interdiff-33_37.txt | 1.26 KB | Gauravvvv |
#37 | 3294006-37.patch | 1.17 KB | Gauravvvv |
#34 | 3294006 after patch.png | 9.12 KB | Harish1688 |
#33 | interdiff-29_33.txt | 1.17 KB | Gauravvvv |
#33 | 3294006-33.patch | 1.92 KB | Gauravvvv |
Comments
Comment #2
Aditya4478 CreditAttribution: Aditya4478 commentedComment #3
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #4
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedRectified custom command line errors.
themes/claro/css/components/form--text.pcss.css
146:5 ✖ Expected no more than 0 empty lines selector-max-empty-lines
153:1 ✖ Unexpected empty line before closing brace block-closing-brace-empty-line-before
Comment #5
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #6
shashwat-tiwari CreditAttribution: shashwat-tiwari at Specbee for Drupal India Association commentedUpdated the patch for 9.5.x.
Comment #7
shashwat-tiwari CreditAttribution: shashwat-tiwari at Specbee for Drupal India Association commentedPatch needs to be rerolled for 10.0.x branch.
Comment #8
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #9
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #10
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedhi @shashwat-tiwari,
How to rectified error in #4.
can u please explain steps.
i am new to Drupal contributions.
Comment #11
shashwat-tiwari CreditAttribution: shashwat-tiwari at Specbee for Drupal India Association commentedhi @Munavijayalakshmi,
I followed the below steps:
sh ./core/scripts/dev/commit-code-check.sh
at root directory and validated the issue given at #4.core/themes/claro/css/components/form--text.pcss.css
file.yarn run build:css
at core directory.For 10.0.x, I'm creating a new patch because the existing patch is not getting applied for it.
Comment #12
shashwat-tiwari CreditAttribution: shashwat-tiwari at Specbee for Drupal India Association commentedCreated the patch for 10.0.x.
Comment #14
Aditya4478 CreditAttribution: Aditya4478 commentedBlock for IE included. But there is some other error. I will post new patch soon
Comment #15
imalabya@Aditya4478 When you work on a patch on top of a previous patch, it is a good practice to add an interdiff file which will help the maintaners to review the new changes.
https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa...
Comment #16
Aditya4478 CreditAttribution: Aditya4478 commentedignore this patch
Comment #17
Aditya4478 CreditAttribution: Aditya4478 commentedignore this patch
Comment #18
Aditya4478 CreditAttribution: Aditya4478 commentedwrong patch uploaded at wrong place. ignore this.
Comment #19
Aditya4478 CreditAttribution: Aditya4478 commentedThis is a patch of 9.5.x.
Nesting is done.
Comment #20
Aditya4478 CreditAttribution: Aditya4478 commentedComment #21
sasanikolic CreditAttribution: sasanikolic at Google Summer of Code commentedThe selector here is wrong. This should result in just form-element--type-textarea.error + .ck-editor > .ck-editor__main.
This results in an empty selector with a comment inside? This is weird...
Same as above.
Comment #22
Aditya4478 CreditAttribution: Aditya4478 commentedchanges done as per #21.
Comment #23
sasanikolic CreditAttribution: sasanikolic at Google Summer of Code commentedI don't like these comments being compiled to the parent selector when nesting. I would suggest we switch those to inline comments - in that case they compile correctly next to the selector.
So that would be in pcss.css:
I would like to get some other inputs in regards to that. Perhaps from @mherchel?
Comment #24
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#23 comments Fixed, Please verify the patch #24
Comment #26
Medha KumariRerolled patch #24 in 10.1.x .
Comment #27
ckrinaComment #28
ckrinaComment #29
_utsavsharma CreditAttribution: _utsavsharma at OpenSense Labs for DrupalFit commentedRerolled patch #24 in 10.1.x .
Please review.
Comment #30
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.
Was discussed in slack #frontend channel slightly with @ckrina and @quietone
Moving to postponed as there are still some decisions to be made about how to go about these changes and what's needed in the follow up.
Comment #32
Aditya4478 CreditAttribution: Aditya4478 commentedComment #33
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedUpdated logical properties in #29, attached interdiff for same. please review
Comment #34
Harish1688 CreditAttribution: Harish1688 at Material commentedHi,
After applying the patch 3294006-33.patch, the following points were observed:
1. CSS Logical Properties and nesting are utilized appropriately. (mostly all classes have variables, so found few changes on css Properties - like margin and text-indent)
2. The UI and focus states remain unchanged, showing no difference in behavior compared to the previous version.
Screenshot attached
looks good to RTBC
Comment #35
smustgrave CreditAttribution: smustgrave at Mobomo commentedComment #36
lauriiiWhy is this not using the variable anymore?
Comment #37
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedUpdated the variable, added the interdiff for same
Comment #38
smustgrave CreditAttribution: smustgrave at Mobomo commentedRestoring to RTBC
Comment #40
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedRestoring to RTBC
Comment #42
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedComment #44
lauriiiI don't think we need a follow-up here because inputs are spread across multiple files, and we can't really utilize component level custom properties for that reason.
Committed 0d20b5b and pushed to 11.x. Thanks!