Problem/Motivation
This is part of the CSS modernization initiative.
Steps to reproduce
The stylesheet at https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/claro/css/components/card.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 and remove IE specific style definitions.
User interface changes
None. There should be no visual differences.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screenshot 2023-06-07 at 2.35.15 PM.png | 244.77 KB | santosh_verma |
| #9 | 3303543-9.patch | 3.72 KB | gauravvvv |
| #3 | 3303543-version10.0.x.patch | 3.95 KB | aditya4478 |
Issue fork drupal-3303543
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
aditya4478 commentedComment #4
ckrinaComment #5
ckrinaComment #6
smustgrave commentedBelieve this is postponed via our conversation a few weeks ago @ckrina. For the followup and a path forward
Comment #7
aditya4478 commented@smustgrave I think, it should be comitted on github. Can you say why it was postponed please ?
Comment #8
aditya4478 commentedpatch needed for 11.x
Comment #9
gauravvvv commentedI have updated all the logical properties, attached patch for 11.x-dev. please review
Comment #10
santosh_verma commenteddoing review of patch #9
Comment #11
santosh_verma commentedI have tested patch #9, and it applied cleanly without any issues. The nesting and logical properties of the code changes appear to good to me. Nothing is appearing broken, for reference attaching the screenshot.

RTBC + 1
Comment #12
zeeshan_khan commented@Gauravvvv - I just want clarification in this code block for my better understanding. why didn't you use
padding-inline shrothand instead of padding-inline-startas I seepadding-right and padding-leftboth are present.Rest everything seems good to me Thanks
Comment #13
smustgrave commentedFollow up is no longer needed and screenshots added in #11
Comment #15
gauravvvv commentedUnrelated failure, restoring status.
Comment #17
zeeshan_khan commentedComment #18
smustgrave commented@zeeshan_khan can you provide an interdiff of what’s different from #9. From what I can tell #9 still applies cleanly to 11.x and failure was probably unrelated.
Comment #19
zeeshan_khan commented@smustgrave I am just checking with latest rebase why it was failing and getting back to Needs work. Because #9 looks absolutely fine and works perfectly.
Comment #20
zeeshan_khan commentedLooks like #9 has also passed the PHP test now. Moving back to RTBC.
Comment #21
smustgrave commentedSince #17 was reupload going to hide that one.
Comment #24
nod_Committed 6985e23 and pushed to 11.x. Thanks!