Created
June 13, 2024 01:17
-
-
Save wplit/051aae1ad2816e67d0962e3f69a7f8bb to your computer and use it in GitHub Desktop.
change facet button colors based on nth-child
This file contains 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
/* colors when unselected */ | |
%root% .wpgb-facet .wpgb-button-facet li:nth-child(1) .wpgb-button { | |
background-color: red; | |
border-color: red; | |
color: white; | |
} | |
%root% .wpgb-facet .wpgb-button-facet li:nth-child(2) .wpgb-button { | |
background-color: red; | |
border-color: red; | |
color: white; | |
} | |
%root% .wpgb-facet .wpgb-button-facet li:nth-child(3) .wpgb-button { | |
background-color: red; | |
border-color: red; | |
color: white; | |
} | |
/* colors when selected */ | |
%root% .wpgb-facet .wpgb-button-facet li:nth-child(1) .wpgb-button[aria-pressed="true"] { | |
background-color: blue; | |
border-color: blue; | |
color: white; | |
} | |
%root% .wpgb-facet .wpgb-button-facet li:nth-child(2) .wpgb-button[aria-pressed="true"] { | |
background-color: red; | |
border-color: red; | |
color: white; | |
} | |
%root% .wpgb-facet .wpgb-button-facet li:nth-child(3) .wpgb-button[aria-pressed="true"] { | |
background-color: red; | |
border-color: red; | |
color: white; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment