Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/wp-admin/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%;

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Author

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_password rule in place to avoid expanding the scope of this PR by removing a long-standing selector. The new width: 100% rule is scoped to #post-visibility-select, where the password field now needs to fit the indented Visibility controls.

margin-top: 3px;
}

#post-visibility-select input[type="radio"],
#post-visibility-select input#sticky {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a #post-visibility-select { line-height: 280%; } mobile breakpoint - should we update it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added a mobile-specific line-height override for #password-span, while leaving the existing larger mobile line-height for the rest of the visibility controls.

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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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;
Expand Down Expand Up @@ -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;
Expand Down
Loading