Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird color options #40

Closed
tmendesilva opened this issue Jul 21, 2020 · 2 comments
Closed

Weird color options #40

tmendesilva opened this issue Jul 21, 2020 · 2 comments

Comments

@tmendesilva
Copy link

chrome 84
yiisoft/yii2-bootstrap4 2.0.8
kartik-v/yii2-widget-colorinput v1.0.5

Color pickers is render nested, so weird.

echo $form->field($model, 'label_background_color')->widget(ColorInput::class, [
    'size' => 'sm',
    'readonly' => true
]);

image

@yoimar
Copy link

yoimar commented Jul 25, 2020

Read this bgrins/spectrum#563

the user knutsbyviktor

Modify spectrum.js inside a plugin:

I unmified the source code and found that a is missing from function paletteTemplate(p, color, className, opts) (row 119).
After modifying that row like this:
html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span></span>');

@kartik-v
Copy link
Owner

resolved via #41 #42

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

No branches or pull requests

3 participants