Repository navigation
CSS: Add padding to labels in media filter container - #11927
Infinite-Null wants to merge 13 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
|
@Infinite-Null Thank you very much for the PR. i can confirm the findings of @t-hamano. The media library looks fine without this PR: With this PR it looks misaligned: -- As we'll the author reported the labels to be too close together - specifically at the select or upload media screen (right @deeppatel8950?) This hasnt been fixed yet. Can you take a look at this? |
|
Thanks for the update @Infinite-Null, this looks good on my side as well: Maybe we could add some more spacing as well for smaller screens between the fields? (565px width on my test) |
|
Done! I've added some extra spacing (that is 8px) between the fields for smaller screens as well. Could you please take another look and let me know if it looks good now? |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR.
The height of the fields within the media toolbar has increased, so we might need to increase the height of the media toolbar itself. Although there's no visual overflow, using browser developer tools reveals that the elements are conflicting with the container's padding.
cc @joedolson @sabernhardt believe you were knowledgeable in this area.
| @media only screen and (max-width: 565px) { | ||
| label[for="media-attachment-filters"], | ||
| label[for="media-attachment-date-filters"], | ||
| label[for="media-search-input"] { | ||
| margin-bottom: 8px; | ||
| } | ||
| } |
There was a problem hiding this comment.
I've added some extra spacing (that is 8px) between the fields for smaller screens as well.
This CSS increases the space between field labels and fields in the mobile layout. However, it's possible that @masteradhoc intended to increase the space between the fields themselves.
That said, the spacing between fields is a separate issue, so we probably don't need to consider it in this PR.
There was a problem hiding this comment.
@t-hamano thanks yeah, that was my intention as it seemed too close :)
|
@Infinite-Null, sorry for the late reply. Could you resolve the conflicts and take another look so that we can make a final decision on whether to merge this PR? |
49ecfb3 to
7548466
Compare
|
Thank you for the feedback @t-hamano! I’ve updated the PR accordingly. Could you please take another look. Thank you. |
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! I added just one last suggestion, but everything looks good. I plan to release this change in 7.3, so I will commit it to trunk once the 7.2 branch is created.
| @media only screen and (max-width: 565px) { | ||
| .media-modal label[for="media-attachment-filters"], | ||
| .media-modal label[for="media-attachment-date-filters"], | ||
| .media-modal label[for="media-search-input"] { | ||
| margin-bottom: 8px; | ||
| } | ||
| } |
There was a problem hiding this comment.
Nit: the media queries in this file are ordered from the widest to the narrowest (900px → 782px → 640px → 480px). Could we move this max-width: 565px block above the existing max-width: 480px block to keep that order?
@media only screen and (max-width: 565px) {
.media-modal label[for="media-attachment-filters"],
.media-modal label[for="media-attachment-date-filters"],
.media-modal label[for="media-search-input"] {
margin-bottom: 8px;
}
}
@media only screen and (max-width: 480px) {
.wp-core-ui.wp-customizer .media-button {
margin-top: 13px;
}
}There was a problem hiding this comment.
Thank you for pointing this out! I’ve moved the max-width: 565px block above the max-width: 480px block to keep the media queries in order.
Increases the space between the "Filter by type", "Filter by date", and search labels and their fields in the media modal, with slightly more space on small screens. Developed in #11927 Props ankitkumarshah, audrasjb, deeppatel8950, im3dabasia1, jns141191, masteradhoc, ravichudasama01, wildworks. Fixes #65300. git-svn-id: https://develop.svn.wordpress.org/trunk@65799 602fd350-edb4-49c9-b593-d223f7449a82
Increases the space between the "Filter by type", "Filter by date", and search labels and their fields in the media modal, with slightly more space on small screens. Developed in WordPress/wordpress-develop#11927 Props ankitkumarshah, audrasjb, deeppatel8950, im3dabasia1, jns141191, masteradhoc, ravichudasama01, wildworks. Fixes #65300. Built from https://develop.svn.wordpress.org/trunk@65799 git-svn-id: http://core.svn.wordpress.org/trunk@64828 1a063a9b-81f0-0310-95a4-ce76da25c4cd









https://core.trac.wordpress.org/ticket/65300
What
Added a 6px top margin to align with the media modal and maintain visual consistency.