We have these two buttons. I would like to have the first one like that but the second one with just an outline with transparent bg. Is it possible ?
This does look like a custom code?
If you can modify it, then just add a button--outline class on the button element.
Like this – from:
<button class="button" ... to:
<button class= "button button--outline" ...
This would be the easiest.
If you can’t edit the liquid code, but know the selector of this element (like its class, etc), then you can use CSS:
.contact-button { /* selector for your class */
--initial-gradient: linear-gradient(transparent, transparent);
--hover-gradient: linear-gradient(rgb(var(--button-background)), rgb(var(--button-background)));
--initial-background-position: var(--transform-origin-start);
--hover-background-position: var(--transform-origin-end);
color: rgb(var(--button-background, var(--text-color)));
border-color: rgb(var(--button-outline-color, var(--border-color)));
}
The rules are basically copied from the “definition” of the button--outline class to support proper border color and hover effect.
paste this code in your css file. theme.css for instance
.button–secondary {
background-color: transparent;
border: 2px solid currentColor;
color: inherit;
}
Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.
Best regards,
Devcoder ![]()
we are still editing the theme so it’s not online, as soon as it’s online I’ll share the link to you, thank you so much
