Skip to content

Commit

Permalink
Merge pull request #1042 from iliman/develop
Browse files Browse the repository at this point in the history
CSS prefixes order fixes & 'suffix' output argument support in Multicolor control
  • Loading branch information
aristath authored Jul 11, 2016
2 parents 7b4e4c0 + de12821 commit ce59ac3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ protected function process_output( $output, $value ) {
$output['media_query'] = 'global';
}

// If "suffix" is defined, add it to the value.
$output['suffix'] = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';

// Create the styles.
$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $sub_value;
$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $sub_value . $output['suffix'];

}
}
Expand Down
6 changes: 5 additions & 1 deletion includes/styles/class-kirki-styles-output-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public static function add_prefixes( $css ) {
foreach ( $elements as $element => $style_array ) {
foreach ( $style_array as $property => $value ) {

// Add -webkit-* and -mod-*.
// Add -webkit-* and -moz-*.
if ( is_string( $property ) && in_array( $property, array(
'border-radius',
'box-shadow',
Expand All @@ -236,8 +236,10 @@ public static function add_prefixes( $css ) {
'transition',
'transition-property',
) ) ) {
unset( $css[ $media_query ][ $element ][ $property ] );
$css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
$css[ $media_query ][ $element ][ '-moz-' . $property ] = $value;
$css[ $media_query ][ $element ][ $property ] = $value;
}

// Add -ms-* and -o-*.
Expand All @@ -247,8 +249,10 @@ public static function add_prefixes( $css ) {
'transition',
'transition-property',
) ) ) {
unset( $css[ $media_query ][ $element ][ $property ] );
$css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
$css[ $media_query ][ $element ][ '-o-' . $property ] = $value;
$css[ $media_query ][ $element ][ $property ] = $value;
}
}
}
Expand Down

0 comments on commit ce59ac3

Please sign in to comment.