Skip to content
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

Apply consistent spacing on the post visibility popover #9800

Merged

Conversation

chrisvanpatten
Copy link
Member

This is a small tweak to the padding/spacing on the post visibility popover.

Before:

visibility-before

After:

visibility-after

I also tweaked the class for the <fieldset> to be more consistent with the other BEM classes.

Note that @aduth had a question about the nested CSS classes on the original PR #9138 which I have not resolved here. It's a totally fair point, but should probably be part of a bigger discussion on CSS standards, as there are many cases of nested CSS rulesets (that probably don't need to be nested) around the Gutenberg code base.

@chrisvanpatten chrisvanpatten added [Type] Enhancement A suggestion for improvement. General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. labels Sep 11, 2018
@@ -1,19 +1,34 @@
.edit-post-post-visibility__dialog {
.editor-post-visibility__dialog-fieldset {
padding: 3px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it break the visuals if you replaces this with the new 4px $grid-size-small variable? I'm slowly trying to roll out the beginnings of a grid, and it'd be nice to use the new units wherever we use 4, 8 or 16px widths.

@jasmussen
Copy link
Contributor

This is nicely harmonious looking. Nice pull requests. Visually I have no objections. I think the CSS looks cool too, but I also realize there are some intricacies that I haven't fully grokked, so okay to await a quick sanity check on that one. Thanks!

@chrisvanpatten
Copy link
Member Author

Done! Thanks for the tip @jasmussen 👍

@aduth aduth added this to the 3.9 milestone Sep 14, 2018
@chrisvanpatten chrisvanpatten merged commit 546b744 into WordPress:master Sep 14, 2018
@chrisvanpatten chrisvanpatten deleted the tweak/post-visibility-spacing branch September 14, 2018 13:08
@aduth
Copy link
Member

aduth commented Sep 14, 2018

I also tweaked the class for the <fieldset> to be more consistent with the other BEM classes.

For clarity's sake, it's really a correction of an invalid class name moreso than it merely for consistency.

The editor-post-visibility class name would only be valid for the singular root element of PostVisibility. Since there is no root element (it returns an array), it's not valid to apply anywhere else.

https://github.com/WordPress/gutenberg/blob/master/docs/reference/coding-guidelines.md#naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants