UI/Dialog: add explicit margin-inline-end rule to Title#77334
Conversation
|
Size Change: 0 B Total Size: 7.74 MB ℹ️ View Unchanged
|
42dbbb3 to
c2b6b29
Compare
c2b6b29 to
70ee01f
Compare
The `.title` class relied solely on the `--_gcd-heading-margin` CSS variable to push trailing header elements to the end. This breaks once the global CSS defense layer is removed. Add a direct `margin-inline-end: auto` rule so the header flex layout is preserved independently of GCD styles. Follow-up to #77161, addressing review feedback from @mirka. Made-with: Cursor
70ee01f to
1429891
Compare
margin-inline-end rule to Title
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 1429891. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24406645336
|
juanfra
left a comment
There was a problem hiding this comment.
LGTM, thanks ✅
Code looks good. Confirmed the trailing elements (close, in the basic case) is pushed to the end.
What?
Follow-up to #77161, addressing review feedback.
Adds a direct
margin-inline-end: autoCSS rule toDialog.Titleso the header flex layout works independently of global CSS defense (GCD) styles.Why?
The
.titleclass currently relies solely on the--_gcd-heading-marginCSS variable to push trailing header elements to the end. Once the GCD layer is eventually removed, there would be nomargin-inline-endrule, breaking the header layout.How?
Adds
margin-inline-end: autoalongside the existing--_gcd-heading-marginworkaround. While GCD is active, its shorthandmarginoverrides the longhand — so the variable is still needed. Once GCD is removed, the direct rule takes over.Testing Instructions
Dialogwith a title and a close button (or other trailing elements) in the header.Use of AI Tools
Cursor + Claude Opus 4.6