daattali/colourpicker

Alpha feature: make it work with colourWidget() and plotHelper()

daattali opened this issue · 1 comments

Currently colourWidget() is visually broken since the alpha addition:

image

Because the checkered image is in the DOM above the input, when the input is not 100% width then the checkered image goes too far. Either need to fix the HTML generated from colourWidget(), or to change the way the background image is generated in the JS code itself.

The first option is much much simpler. However, the second option may also fix other potential future problems, such as if someone manually changes the width of the input field or changes the border-radius of the input field, the background image will need to be corrected. The second option of fixing it in the javascript library can be achieved using this simple technique (using both a background-image and a box-shadow with inset on the input field, instead of using a wrapper around the input field only for the image)

Also need to fix plotHelper() and colourPicker() addins to work with the alpha feature

@DavidRGriswold

this now works in the feature/alpha branch