Problem/Motivation
This is a child of #3324398: [META] Update Claro CSS with new coding standards and part of #3254529: [PLAN] Drupal CSS Modernization Initiative.
Steps to reproduce
The stylesheet at https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/clar... needs to be refactored to make use of modern CSS and Drupal core's PostCSS tooling.
@todo: Add clear testing instructions to test this manually on the UI.
Proposed resolution
- Use CSS Logical Properties where appropriate.
- Use CSS nesting where appropriate.
- Use existing variables (
variables.pcss.css) where appropriate. Follow the proposed Drupal CSS coding standards to name the variables. - Add a comment when there's a value where there is not a variable like
font-size: 1.23rem; /* @todo One off value. */ - When possible, set variables at the root of the component and then map them to global theme variables:
.entity-meta { --entity-meta-title-font-size: var(--font-size-h5); ... more style } .entity-meta__title { font-size: var(--entity-meta-title-font-size); }
Out of scope
- Changing CSS classes
- Drupal 9 patches
User interface changes
None. There should be no visual differences.
Please post before/after screenshots and make sure they look the same.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Screenshot 2023-02-20 at 2.03.09 PM.png | 178.93 KB | gauravvvv |
| #7 | Screenshot 2023-02-20 at 1.25.03 PM.png | 302.95 KB | gauravvvv |
Issue fork drupal-3332467
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
bspeare commentedComment #5
gauravvvv commentedComment #6
smustgrave commentedSince the .css file change can we get before/after screenshots please.
Comment #7
gauravvvv commentedAdded before and after patch screenshots, please review

Before patch:
After patch

Comment #8
smustgrave commentedthanks!
Comment #9
lauriiiLeft a few comments on the MR.
Comment #10
gauravvvv commentedComment #11
smustgrave commentedThink this is good again
Comment #12
nod_couple of questions
Comment #13
smustgrave commentedChanges look good still.
Comment #14
nod_A color got changed unexpectedly
Comment #15
gauravvvv commentedComment #16
nod_Fixes a positioning problem in RTL too, nice.
Comment #18
nod_Committed fb910a6 and pushed to 10.1.x. Thanks!