• Resolved Themosaurus

    (@themosaurus)


    Hi,

    We are using the 'suffix' argument in some of our color fields outputs to add an !important at the end of the CSS property. However since the new update and the changes to the color field that came with it, the 'suffix' argument is being ignored in color field outputs.

    Could you please take a look to confirm if this is a bug and hopefully push a fix in the next update ?

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @themosaurus,

    can you please post the code snippet here for us to easily replicate this?

    Thank you.

    Thread Starter Themosaurus

    (@themosaurus)

    It happens with just any color field that has a suffix in the output. Here’s an example of a field to replicate the issue :

    new \Kirki\Section(
    	'section_id',
    	array(
    		'title' => 'My Section',
    	)
    );
    
    new \Kirki\Field\Color(
    	array(
    		'settings'    => 'color_setting',
    		'label'       => 'Color Control',
    		'section'     => 'section_id',
    		'default'     => '#0008DC',
    		'output'   => array(
    			array(
    				'element'  => '.my-element',
    				'property' => 'color',
    				'suffix'   => '!important',
    			),
    		),
    	)
    );

    With that example field the CSS is correctly printed except the !important suffix is missing.

    If that can help, I’ve dug a little bit in the code and noticed that the method
    process_output() in kirki/packages/kirki-framework/control-react-colorful/src/Field/CSS/ReactColorful.php doesn’t seem to account for suffix at all, which could be the issue here.

    Hope this helps !

    Best regards,

    • This reply was modified 2 years, 9 months ago by Themosaurus.

    Awesome,

    thank you @themosaurus!

    We’re looking into this and make sure to have a fix for this shipped with the next release.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The ‘suffix’ argument doesn’t work in color field outputs’ is closed to new replies.