-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Polish a few broken things in the sidebar. #20782
Conversation
There were some issues with the block sidebar: - The active style looked a bit overwhelming. - The button-group control lacked a little style. - The Width/Height controls for an image were offset. This PR addresses those.
@@ -20,7 +20,3 @@ | |||
font-style: italic; | |||
} | |||
} | |||
|
|||
.components-base-control + .components-base-control { |
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.
I wonder if we should remove that rule just like that. It has implications on all sidebars (and all other places where we use multiple controls in a row like the entities save modal) (multiple controls in a row) including in third-party blocks.
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.
I'd rather override it personally where we have horizontal controls today.
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.
I responded in #20608 (comment) — best I can tell it's either dead code or ill-advised. In all my web-inspecting, the rule was almost always overridden.
The way to space base controls, I would suggest, is simple:
.components-base-control {
margin-bottom: $grid-unit-20;
}
While you can achieve the same with the following:
.components-base-control + .components-base-control {
margin-top: $grid-unit-20;
}
That's a far more roundabout way of doing it. And given margins collapse regardless, the former seems much more the correct way of spacing things.
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.
I guess the .components-base-control .components-base-control__field
bottom padding makes this rule a bit redundant. I'm actually ok removing it now.
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.
Should we remove the rule from the table block too? (it's overridden there)
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.
I'll remove it there and ship. Thanks for fast review!
Size Change: +109 B (0%) Total Size: 864 kB
ℹ️ View Unchanged
|
There were some issues with the block sidebar: - The active style looked a bit overwhelming. - The button-group control lacked a little style. - The Width/Height controls for an image were offset.
There were some issues with the block sidebar:
This PR addresses those.
Before:
After:
The button-group after:
Before:
After:
Note that I expect all of the above to receive additional polish. #18667 offers additional avenues to refining how each of these controls look, behave, and are positioned well in the sidebar. I consider this PR a minimal first step towards making it less broken, but not the endgame step.