-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Lower PostPanelRow
style specifity
#70981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
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. |
Size Change: -8 B (0%) Total Size: 1.91 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I do know removing them resolves the issue in my editor instance (consumed from packages/editor) as shown in the screenshot below.
I'm not sure why this PR will solve the issue in your environment, but I think we can remove these styles altogether.
Instead, we can add the alignment styles here:
gutenberg/packages/editor/src/components/post-panel-row/index.js
Lines 14 to 17 in b860887
<HStack | |
className={ clsx( 'editor-post-panel__row', className ) } | |
ref={ ref } | |
> |
That is, make the following changes:
diff --git a/packages/editor/src/components/post-panel-row/index.js b/packages/editor/src/components/post-panel-row/index.js
index 71dd63d3c0..243989744f 100644
--- a/packages/editor/src/components/post-panel-row/index.js
+++ b/packages/editor/src/components/post-panel-row/index.js
@@ -14,6 +14,7 @@ const PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {
<HStack
className={ clsx( 'editor-post-panel__row', className ) }
ref={ ref }
+ align="flex-start"
>
{ label && (
<div className="editor-post-panel__row-label">{ label }</div>
diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss
index 53e0c645f6..23ab5eb1e5 100644
--- a/packages/editor/src/components/post-panel-row/style.scss
+++ b/packages/editor/src/components/post-panel-row/style.scss
@@ -1,8 +1,6 @@
.editor-post-panel__row {
width: 100%;
min-height: $grid-unit-40;
- justify-content: flex-start !important;
- align-items: flex-start !important;
}
.editor-post-panel__row-label {
Can you try this?
Hi @t-hamano! Thank you so much for the review. I tried it and I still had the same issue. But I extended the fix and things are good now. Here's what was happening:
I considered using |
What?
This removes the overpowering
!important
from alignment and justification values of.editor-post-panel__row
. They were added in #56319 but I couldn't decipher why. And frankly I'm not 100% sure what are the wider implications of removing them. I do know removing them resolves the issue in my editor instance (consumed frompackages/editor
) as shown in the screenshot below.Why?
To align the grid better.
How?
Reverting part of #56319
Testing Instructions
TBD
Testing Instructions for Keyboard
Doesn't apply.
Screenshots or screencast