Last active
May 6, 2025 16:03
-
-
Save odessy/62fe97263ac8509765bb8fb2fa4b5d96 to your computer and use it in GitHub Desktop.
Add background to product variants container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CSS - Change background color of block variants container */ | |
.product__block__variants{ | |
background-color: #513f76; | |
padding: 10px; | |
border-radius: 15px; | |
--text: #fff; | |
--text-light: var(--text); | |
} | |
.radio__legend, | |
.radio__legend__label{ | |
color: var(--text); | |
} | |
/* end */ | |
/* CSS - Change size of radio buttons */ | |
.radio__fieldset .radio__button label{ | |
padding: 8px; | |
} | |
.radio__inputs--equal { | |
grid-template-columns: repeat(auto-fill,minmax(min(55px,100%),1fr)); | |
} | |
/* end */ | |
/* CSS - Change background-color of variant radio labels */ | |
.radio__fieldset .radio__button{ | |
--background-color: #f9f9f9; | |
--color: #1b1546; | |
} | |
.radio__fieldset .radio__button input~label { | |
background-color: var(--background-color); | |
color: var(--color); | |
} | |
/* When the radio button is checked */ | |
.radio__fieldset .radio__button input:checked~label { | |
background-color: var(--color); | |
color: var(--background-color); | |
border-color: var(--background-color); | |
} | |
/* When the radio button is hover */ | |
.radio__fieldset .radio__button label:active, .radio__fieldset .radio__button label:focus, .radio__fieldset .radio__button label:hover { | |
background-color: var(--background-color); | |
color: var(--color); | |
opacity: 0.7; | |
} | |
/* Make button round */ | |
.radio__fieldset .radio__button label{ | |
border-radius: 10px; | |
} | |
/* end */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment