Skip to content

Instantly share code, notes, and snippets.

@imCorfitz
Created April 25, 2022 18:21
Show Gist options
  • Save imCorfitz/35fb677ed987ee6066457f0bbcc5f968 to your computer and use it in GitHub Desktop.
Save imCorfitz/35fb677ed987ee6066457f0bbcc5f968 to your computer and use it in GitHub Desktop.
Adding CSS for colour swatches on Shopify collection pages using metafields
.color-options {
display:flex;
margin-left:-2px;
flex-wrap:wrap;
}
.color-options__item {
width:14px;
height:14px;
flex-shrink:0;
margin:2px;
border-radius:50%;
border:1px solid;
border-color:rgba(18, 18, 18, 0.04);
}
@media screen and (min-width: 990px) {
.color-options {
margin-left:-3px;
}
.color-options__item {
width:20px;
height:20px;
margin:3px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment