I have a custom section I made for a button called call-to-action in my Editions theme. The button mostly works but if I’ve clicked the button before the a, a:visited class turns my text blue.
How can I fix this? Section HTML and CSS for button section below.
---
### {{ section.settings.text-box }}
{{ section.settings.linktext }}
---
{% schema %}
{
"name": "Call to action",
"settings": [
{
"id": "text-box",
"type": "text",
"label": "Heading",
"default": "Title"
},
{
"id": "link",
"type": "url",
"label": "Button link"
},
{
"id": "linktext",
"type": "text",
"label": "Button text",
"default": "Click here"
}
]
,
"presets": [
{
"name": "Call to Action",
"category": "Call To Action"
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
//button for call-to-action section
.button {
font-family: Helvetica, "Helvetica Neue", Arial, "Lucida Grande", sans-serif;
display: inline-block;
padding: 0.85em 1.5em;
font-size: 1.5em;
cursor: pointer;
text-decoration: none;
color: #ffffff;
background-color: /*!setting.submit-button-color{*/#00a044/*}*/;
border: none;
border-radius: 0.62em;
background-color: /*!setting.submit-button-color{*/#00a044/*}*/;
}
.button:hover{
background-color: #018739;
color: #ffffff;
}
