Skip to content

Increase color picker button height#11093

Open
hmbashar wants to merge 3 commits intoWordPress:trunkfrom
hmbashar:color-pick-height
Open

Increase color picker button height#11093
hmbashar wants to merge 3 commits intoWordPress:trunkfrom
hmbashar:color-pick-height

Conversation

@hmbashar
Copy link

@github-actions
Copy link

github-actions bot commented Feb 28, 2026

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props hmbashar, huzaifaalmesbah, mukesh27, audrasjb, wildworks, joedolson.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@huzaifaalmesbah
Copy link
Member

Should we also update .wp-picker-container input[type="text"].wp-color-picker min-height (currently 30px) to keep alignment consistent?
Huzaifa-20260228164000

@github-actions
Copy link

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

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.

Image

Should we also update .wp-picker-container input[type="text"].wp-color-picker min-height (currently 30px) to keep alignment consistent?

I think so. I would like to see a UI like this.

Image

Perhaps it would be good to get feedback from contributors who have been working specifically on this issue.

cc @fabiankaegy @joedolson

@hmbashar hmbashar force-pushed the color-pick-height branch from 3940237 to 7d133ea Compare March 1, 2026 15:06
Copy link
Contributor

@joedolson joedolson left a comment

Choose a reason for hiding this comment

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

This makes sense to me. I'm generally in favor of making click targets larger.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines 25 to +26
line-height: 2.54545455; /* 28px */
padding: 0 6px;
padding: 5px 6px;
Copy link
Contributor

Choose a reason for hiding this comment

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

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 */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Author

@hmbashar hmbashar Mar 2, 2026

Choose a reason for hiding this comment

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

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 */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

@t-hamano
Copy link
Contributor

t-hamano commented Mar 3, 2026

Apologies for raising an alternative suggestion at this stage, but moving from 30px to 40px feels like a fairly significant visual change. What do you think about using 32px instead of 40px? As far as I understand, 32px is an allowed value in the new dashboard design system.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants