Home Forums WoodMart support forum Where is located the –btn-accented-bgcolor

Where is located the –btn-accented-bgcolor

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #503355

    jueraldhoxha003
    Participant

    I am trying to modify variable –btn-accented-bgcolor on theme but cannot find nowhere.

    I am trying to use a gradient instead of simple color.

    Where is located that variable so i can locate directly.?

    #503417

    Luke Nielsen
    Keymaster

    Hello,

    The “–btn-accented-bgcolor” variable is generated via the “Accent buttons background” option: https://prnt.sc/APKjAKa96VNH . That is situated in Theme Settings -> Styles and colors -> Buttons. This variable sets the value for the background-color: https://prnt.sc/_sQT6cwXoV-s in appropriate Accent buttons.

    In order to change the value of the variable, you can use the “Accent buttons background” option itself, or as an alternative, the following custom code:

    :root body {
    	--btn-accented-bgcolor: #000;
    }

    But since this variable sets the value of the background-color parameter (https://prnt.sc/_sQT6cwXoV-s) it cannot contain a gradient value, since background-color can only contain a color value (#000, rgba(0,0,0), etc.), and the gradient is set through the background-image value. Therefore, linear-gradient in combination with background-color will not work. In this case, if you need to set a background gradient for the buttons, it should not be set through a variable, but directly to the desired “Accent” button.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)