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/form--managed-file.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 |
|---|
Issue fork drupal-3303550
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:
- 3303550-refactor-claros-form--managed-file
changes, plain diff MR !3571
Comments
Comment #2
aditya4478 commentedComment #3
aditya4478 commentedComment #4
sasanikolic commented& should be at the beginning of the line, no?
I don't think this will work when nested like this? Check the compiled selectors.
Same here, & at the start of the line.
Comment #5
aditya4478 commentedPlease ignore above patches, and review this for D9.
Comment #6
smustgrave commentedReviewed patch
Applies cleanly
Tested against an file and image field and nothing seemed to break.
Comment #7
lauriiiThis needs a Drupal 10 patch too.
Comment #9
ckrinaComment #10
ckrinaComment #11
smustgrave 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 [1] as a guide.
Unfortunately the 10.0 window has based and tried running 10.1 tests for #3
but appears to have some errors.
Also there is a follow up needed
Comment #12
_utsavsharma commentedFixed patch #5 as per by #7.
Please review.
Comment #13
smustgrave commentedStill needs the follow up. Please read the tags before rerolling.
Also attach interdiffs for the changes
Comment #16
gauravvvv commentedComment #17
smustgrave commented.form-managed-file__main has 2 sections that could be merged
form-managed-file__meta has 2 sections that could be merged.
Comment #18
Anonymous (not verified) commentedGaurav-drupal made their first commit to this issue’s fork.
Comment #19
Anonymous (not verified) commentedAddressed #17, please review
Comment #20
smustgrave commentedNesting seems much better.
Comment #21
nod_agreed, nesting is nice here. Simply need to remove @nest
Comment #23
gauravvvv commentedRestoring status as we are going ahead with @nest as of now.
Comment #24
nod_You can remove the line and set back to RTBC, appart from that the patch is good to go.
Comment #25
gauravvvv commentedComment #26
smustgrave commentedMoving to RBTC per #24
Comment #28
bnjmnmUnaddressed feedback from @nod_, and I added some additional items in the MR. @nod_ is correct that The
@nestsyntax (literally the thing that says "@nest") should not be used, but you can still nest by placing the ampersand after the selector.@VladimirAus - I've mentioned this in other issues, but can you refrain from clicking the rebase button if you're not making additional contributions. It makes the issue harder to follow, and anyone making changes to the branch can get things current with HEAD with about 5 seconds work so it doesn't really help advance anything.
Comment #29
gauravvvv commentedI have addressed all the feedbacks. please review
Comment #30
smustgrave commented@nod_ correct me if I'm wrong the no @nest thing was when it was discussed moving away from that but that's no longer the case
Points do appear to be addressed.
Comment #32
stanzin commentedRerolling Patch for V11 :)
Comment #34
gauravvvv commentedMR 3571, still applies to D11. There is no need of re-roll. thanks
restoring status.
Comment #35
bnjmnmI left a few bits of feedback on the MR. They should be pretty easy to address though.
Comment #37
rpayanmPlease review.
Comment #38
smustgrave commentedFor the open threads
Comment #39
gauravvvv commentedAddressed all threads, please review
Comment #40
smustgrave commentedThreads appear to be addressed.
Comment #41
alexpottHiding all the files because we have MRs
Comment #44
lauriiiCommitted 86a0d30 and pushed to 11.x. Thanks!