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

Don't change input width using Javascript #2

Closed
bfintal opened this issue Sep 18, 2015 · 2 comments
Closed

Don't change input width using Javascript #2

bfintal opened this issue Sep 18, 2015 · 2 comments

Comments

@bfintal
Copy link

bfintal commented Sep 18, 2015

I'm adding wp-color-picker-alpha in Titan Framework to allow rgba values in our color options.

Can we remove this:

// Update width for input
if ( self._color._alpha < 1 || self._color.toString().indexOf('rgb') != 1 ) {
    el.width( parseInt( self.options.defaultWidth+100 ) );
}

Instead, people can just modify the width using CSS if they want:

.wp-color-picker[data-alpha="true"] {
    width: 165px;
}

Reason for request: adding +100 to the width makes the control wrap to the next line when used in the Customizer, and since JS is used, I can only get rid of the modified width is by using javascript also or by !important

@kallookoo
Copy link
Owner

I added an option to disable or change the size of the input, I personally prefer view everything, but it's true I did not think the Customizer

@bfintal
Copy link
Author

bfintal commented Sep 18, 2015

I can work with data-custom-width. Titan Framework is now using wp-color-picker-alpha. Very awesome work @23r9i0

gambitph/Titan-Framework@add432d

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

2 participants