Last active
March 6, 2024 21:22
-
-
Save dpw1/6d8184a1a9f9c97d6ad6c8d83c69e6df to your computer and use it in GitHub Desktop.
Custom sales badge Dawn theme
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
/* ## Collection page and sections (change badges color/font size) | |
https://ezfycode.com/blog/dawn-theme-how-to-customize-badges-color-and-size | |
================================== */ | |
.card .badge[class*="accent"], | |
.card .badge[class*="inverse"], | |
.product .badge[class*="sale"], | |
.product .badge[class*="sold"] { | |
border-color: transparent !important; | |
} | |
/* Sale badge (collections) on desktop */ | |
.card .badge[class*="accent"]:not([class*="inverse"]) { | |
background: #ff5733 !important; | |
color: #ffffff !important; | |
font-size: 12px !important; | |
} | |
/* Sold out badge (collections) on desktop */ | |
.card .badge[class*="inverse"]:not([class*="accent"]) { | |
background: #000 !important; | |
color: #f1f1f1 !important; | |
font-size: 12px !important; | |
} | |
@media (max-width: 749px) { | |
/* Sale badge (collections) on mobile */ | |
.card .badge[class*="accent"]:not([class*="inverse"]) { | |
font-size: 11px !important; | |
} | |
/* Sold out badge (collections) on mobile */ | |
.card .badge[class*="inverse"]:not([class*="accent"]) { | |
font-size: 11px !important; | |
} | |
} | |
/* ## Product page (change badges color/font size) | |
https://ezfycode.com/blog/dawn-theme-how-to-customize-badges-color-and-size | |
================================== */ | |
/* Sale badge (product page) on desktop */ | |
.product .badge[class*="sale"] { | |
background: #ff5733 !important; | |
color: #ffffff !important; | |
font-size: 14px !important; | |
} | |
/* Sold out badge (product page) on desktop */ | |
.product .badge[class*="sold"] { | |
background: #94659e !important; | |
color: #f1f1f1 !important; | |
font-size: 20px !important; | |
} | |
@media (max-width: 749px) { | |
/* Sale badge (product page) on mobile */ | |
.product .badge[class*="sale"] { | |
font-size: 13px !important; | |
} | |
/* Sold out badge (product page) on mobile */ | |
.product .badge[class*="sold"] { | |
font-size: 13px !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment