Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions customizer/alpha-color-picker/alpha-color-picker.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
}
18 changes: 9 additions & 9 deletions customizer/alpha-color-picker/alpha-color-picker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<span class="customize-control-title">' . sanitize_text_field( $this->label ) . '</span>';
}
if ( isset( $this->description ) && '' !== $this->description ) {
echo '<span class="description customize-control-description">' . sanitize_text_field( $this->description ) . '</span>';
}
?>
<label>
<?php // Output the label and description if they were passed in.
if ( isset( $this->label ) && '' !== $this->label ) {
echo '<span class="customize-control-title">' . sanitize_text_field( $this->label ) . '</span>';
}
if ( isset( $this->description ) && '' !== $this->description ) {
echo '<span class="description customize-control-description">' . sanitize_text_field( $this->description ) . '</span>';
} ?>
<input class="alpha-color-control" type="text" data-show-opacity="<?php echo $show_opacity; ?>" data-palette="<?php echo esc_attr( $palette ); ?>" data-default-color="<?php echo esc_attr( $this->settings['default']->default ); ?>" <?php $this->link(); ?> />
</label>
<?php
}
}
}