-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Improve classic editor visibility controls layout #12298
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
Changes from all commits
370285e
8215f0c
d9a5bee
eac43f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -712,6 +712,45 @@ form#tags-filter { | |
| margin-top: 3px; | ||
| } | ||
|
|
||
| #post-visibility-select { | ||
| --post-visibility-control-gap: 3px; | ||
|
|
||
| margin-left: var(--post-visibility-control-gap); | ||
| } | ||
|
|
||
| #post-visibility-select input#post_password { | ||
| box-sizing: border-box; | ||
| width: 100%; | ||
| margin-top: 3px; | ||
| } | ||
|
|
||
| #post-visibility-select input[type="radio"], | ||
| #post-visibility-select input#sticky { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a mobile-specific line-height override for |
||
| margin-top: 2px; | ||
| margin-right: var(--post-visibility-control-gap); | ||
| margin-bottom: 5px; | ||
| vertical-align: middle; | ||
| } | ||
|
|
||
| #post-visibility-select #sticky-span, | ||
| #post-visibility-select #password-span { | ||
| display: block; | ||
| margin-left: calc(1rem + var(--post-visibility-control-gap) + 0.25em); | ||
| margin-top: 2px; | ||
| } | ||
|
|
||
| #post-visibility-select #sticky-span { | ||
| margin-bottom: 2px; | ||
| } | ||
|
|
||
| #post-visibility-select #password-span { | ||
| margin-bottom: 6px; | ||
| } | ||
|
|
||
| #post-visibility-select p { | ||
| margin: 12px 0 0; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally this would have been a bottom margin of the upper element, but I can see why we're doing it - targeting this when we also have a toggleable password field won't make it simpler. So, good to leave as-is.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, left this as-is for the reason you mentioned: the password field is toggleable, so keeping the spacing scoped here keeps the CSS simpler. |
||
| } | ||
|
|
||
| #linksubmitdiv .inside, /* Old Link Manager back-compat. */ | ||
| #poststuff #submitdiv .inside { | ||
| margin: 0; | ||
|
|
@@ -1894,6 +1933,10 @@ table.links-table { | |
| line-height: 280%; | ||
| } | ||
|
|
||
| #post-visibility-select #password-span { | ||
| line-height: 1.5; | ||
| } | ||
|
|
||
| .wp-core-ui .save-post-visibility, | ||
| .wp-core-ui .save-timestamp { | ||
| vertical-align: middle; | ||
|
|
||
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.
This is now overwriting the pre-existing
width: 94%in this same file. We might want to remove the lower specificity rule as it's redundant.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.
Good point. I kept the existing lower-specificity
#side-sortables input#post_passwordrule in place to avoid expanding the scope of this PR by removing a long-standing selector. The newwidth: 100%rule is scoped to#post-visibility-select, where the password field now needs to fit the indented Visibility controls.