Problem/Motivation
Thanks for the great module, but I noticed an issue which is that sometimes color names are longer than one word, eg:

So it's best to make the styling so that the full name is always visible and get rid of the hardcoded max-width
Steps to reproduce
Use long name colors
Proposed resolution
I'll provide a MR
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot 2022-02-13 at 12.17.35.png | 55.13 KB | doxigo |
| #3 | Screenshot 2022-02-06 at 15.53.12.png | 73.98 KB | doxigo |
| Screenshot 2022-02-06 at 15.39.36.png | 53.74 KB | doxigo |
Issue fork colorpalette-3262745
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
doxigo commentedProvided the MR, adjusted the color palette block size to 64px, removed the max-width of 52px for label, made it so that if necessary the label can break down into multi-line, eg:

Comment #4
abhaysaraf commentedHi doxigo,
Thank you for sharing the concern & the patch too.
With long names, if you consider long name say 2, 3 or 4 lines (in the above image it is of 2 lines long), and there are 100s of colors available in the palette. In this case, you will see an uneven gap between the color-rows.
While designing, I thought to hide it intentionally because the idea behind is to see the actual-color than reading the color-name and opting it.
I also thought to add the full name in the title(when you mouse-hover) along with hexcode, but again that could be a lot of details to the other user.
Let me know your thoughts or if a better solution could be given to this concern. Thanks!
Comment #5
doxigo commentedHey Abhay, thanks for your thoughts and considerations, I see your point
I suggest to consider the common use cases, which can be 1 line or two the max, and more than 3 line within our 64px block can be trimmed, like image below:

I went on and updated the MR using
line-clampto limit the name to two lines, if more than that it just adds the elipsislet me know if that makes more sense