From afc969027f647b72b89451a555c0cd8959670b77 Mon Sep 17 00:00:00 2001 From: Ilya Liman Date: Tue, 5 Jul 2016 13:44:56 +0400 Subject: [PATCH 1/2] CSS prefixes order fixes Property without prefix should be at the end --- includes/styles/class-kirki-styles-output-css.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/styles/class-kirki-styles-output-css.php b/includes/styles/class-kirki-styles-output-css.php index a40a63dad..62e137ca3 100644 --- a/includes/styles/class-kirki-styles-output-css.php +++ b/includes/styles/class-kirki-styles-output-css.php @@ -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', @@ -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-*. @@ -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; } } } From de12821a14ab35f4a3c394a5bdebd1ec85410634 Mon Sep 17 00:00:00 2001 From: Ilya Liman Date: Thu, 7 Jul 2016 11:12:29 +0400 Subject: [PATCH 2/2] 'suffix' output argument support in Multicolor control --- .../output/field/class-kirki-output-field-multicolor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/output/field/class-kirki-output-field-multicolor.php b/includes/output/field/class-kirki-output-field-multicolor.php index c5e971acd..c6351fe05 100644 --- a/includes/output/field/class-kirki-output-field-multicolor.php +++ b/includes/output/field/class-kirki-output-field-multicolor.php @@ -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']; } }