Increase color picker button height#11093
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the 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. |
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. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for working on this. Please note that we don't necessarily need to have any specific plugins installed to work on this PR. Just enable TT1 and access the Customizer.
Should we also update
.wp-picker-container input[type="text"].wp-color-pickermin-height (currently 30px) to keep alignment consistent?
I think so. I would like to see a UI like this.
Perhaps it would be good to get feedback from contributors who have been working specifically on this issue.
3940237 to
7d133ea
Compare
joedolson
left a comment
There was a problem hiding this comment.
This makes sense to me. I'm generally in favor of making click targets larger.
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the update!
While this is visually correct, the line-height value and its associated comment will need to be adjusted due to the new min-height.
I suggested removing this redundant line-height, but for now, I think it needs to be adjusted to avoid any inconsistencies.
| line-height: 2.54545455; /* 28px */ | ||
| padding: 0 6px; | ||
| padding: 5px 6px; |
There was a problem hiding this comment.
I think the two lines here are contradictory. Based on the implementation so far, I think the element height should be determined only by the line-height value. The expected element height here is 38px and the font size is 11px, so the line-height value can be calculated using the following formula:
38 / 11 = 3.454545454545455
.wp-picker-container .wp-color-result.button {
line-height: 3.45454545; /* 38px */
padding: 0 6px;
}| @@ -77,7 +77,7 @@ | |||
| margin-left: 6px; | |||
| padding: 0 8px; | |||
| line-height: 2.54545455; /* 28px */ | |||
There was a problem hiding this comment.
| line-height: 2.54545455; /* 28px */ | |
| line-height: 3.45454545; /* 38px */ |
The expected element height here is 38px and the font size is 11px, so the line-height value can be calculated using the following formula:
38 / 11 = 3.454545454545455
There was a problem hiding this comment.
I worked on it, but @mukeshpanchal27 requested changes. After that, I restored the line and used padding.
check above conversation.
| width: 4rem; | ||
| font-size: 12px; | ||
| font-family: monospace; | ||
| line-height: 2.33333333; /* 28px */ |
There was a problem hiding this comment.
| line-height: 3.16666666; /* 38px */ |
The expected element height here is 38px and the font size is 12px, so the line-height value can be calculated using the following formula:
38 / 12 = 3.166666666666667


Trac ticket: https://core.trac.wordpress.org/ticket/64761