Color Picker and CSS

Support General Color Picker and CSSResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28301
    contact@percipi.fr[email protected]
    Participant

    Hi, I'm using Bricks and as color picker in Bricks are not yet dynamic, I wanted to get the color picker value into a css class.
    What is the best way/best practice to achieve that ?
    many thanks

    #28312
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for getting in touch.

    You can use the code to print the color picker value in Inline CSS. For example:

    $value = rwmb_meta( 'color_picker' );
    ?>
    <style>
        body {
            color: <?php echo $value ?>
        }
    </style>
    #28317
    contact@percipi.fr[email protected]
    Participant

    Hi many thanks for your help
    that's what I was trying to do, but without success. I think I was adding the code in the wrong place or Bricks doesn't allow PHP in custom code areas. When added manually it works.
    Thanks for confirming the code.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.