diff --git a/customizer/alpha-color-picker/alpha-color-picker.css b/customizer/alpha-color-picker/alpha-color-picker.css index 93313e7..0455cc6 100644 --- a/customizer/alpha-color-picker/alpha-color-picker.css +++ b/customizer/alpha-color-picker/alpha-color-picker.css @@ -11,17 +11,16 @@ } .customize-control-alpha-color .wp-picker-open + .wp-picker-input-wrap { - width: 100%; + display: flex; } -.customize-control-alpha-color .wp-picker-input-wrap input[type="text"].wp-color-picker.alpha-color-control { - float: left; - width: 195px; +.customize-control-alpha-color .wp-picker-open + .wp-picker-input-wrap label { + flex-grow: 1; } -.customize-control-alpha-color .wp-picker-input-wrap .button { - margin-left: 0; - float: right; +.customize-control-alpha-color .wp-picker-input-wrap input[type="text"].wp-color-picker.alpha-color-control { + height: 100%; + width: 100%; } .wp-picker-container .wp-picker-open ~ .wp-picker-holder .alpha-color-picker-container { @@ -112,16 +111,3 @@ padding: 0; margin-top: -24px; } - -@media only screen and (max-width: 782px) { - .customize-control-alpha-color .wp-picker-input-wrap input[type="text"].wp-color-picker.alpha-color-control { - width: 184px; - } -} - -@media only screen and (max-width: 640px) { - .customize-control-alpha-color .wp-picker-input-wrap input[type="text"].wp-color-picker.alpha-color-control { - width: 172px; - height: 33px; - } -} diff --git a/customizer/alpha-color-picker/alpha-color-picker.php b/customizer/alpha-color-picker/alpha-color-picker.php index 483d3f4..0e43c6b 100644 --- a/customizer/alpha-color-picker/alpha-color-picker.php +++ b/customizer/alpha-color-picker/alpha-color-picker.php @@ -77,17 +77,17 @@ public function render_content() { // Support passing show_opacity as string or boolean. Default to true. $show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true'; - // Begin the output. ?> + // Begin the output. + if ( isset( $this->label ) && '' !== $this->label ) { + echo '' . sanitize_text_field( $this->label ) . ''; + } + if ( isset( $this->description ) && '' !== $this->description ) { + echo '' . sanitize_text_field( $this->description ) . ''; + } + ?>