<button class="btn btn--base btn--cta">
Buy Tickets Starting at $99
</button>
{{#if standard}}
<button class="btn btn--base{{#if modifier}} btn--{{modifier}}{{/if}}{{#if class}} {{class}}{{/if}}" {{#if disabled}} disabled{{/if}}>
{{buttonValue}}
{{#if icon}}
{{render '@icons--progress' icon-modifiers merge=true}}
{{/if}}
</button>
{{/if}}
{{#if close-btn}}
<button class="{{class}} {{js-class}}">
{{render '@icons--close'}}
<span class="visually-hidden">{{label-menu-close}}</span>
</button>
{{/if}}
{
"modifier": "cta",
"buttonValue": "Buy Tickets Starting at $99",
"standard": true
}
button {
cursor: pointer;
}
.btn {
padding: 0;
font-family: $font-title;
font-size: $ms-0;
text-align: center;
letter-spacing: 0.03rem;
background: none;
border: none;
border-radius: $border-radius;
}
.btn--base {
display: inline-block;
padding: 0.63rem 2rem;
color: $color-white;
box-shadow: 0 0.13rem 0.25rem 0 rgba($color-gray, 0.35);
transition: $transition;
&:hover {
color: $color-white;
box-shadow: 0 0.2rem 0.5rem 0 rgba($color-gray, 0.35);
color: $color-white;
text-decoration: underline;
transform: translateY(-1px);
}
}
.btn--primary {
background: $color-primary;
color: $color-white;
&:hover {
color: $color-white;
}
&:active {
background: $color-primary-dark;
}
}
.btn--cta {
background: $color-cta;
box-shadow: 0 0.25rem 0.56rem 0 rgba($color-gray, 0.35);
&:hover {
box-shadow: 0 0.35rem 0.85rem 0 rgba($color-gray, 0.35);
}
&:active {
background: $color-cta-dark;
}
}
.btn[disabled],
.btn--disabled {
background: $color-disabled;
box-shadow: none;
&:hover,
&:active {
cursor: default;
background: $color-disabled;
box-shadow: none;
color: $color-white;
transform: none;
text-decoration: none;
}
}
.btn--plain {
background: none;
color: $color-text-light;
border: 1px solid $color-border;
letter-spacing: 0;
box-shadow: none;
font-family: $font-body;
&:hover {
background: none;
color: $color-link-hover;
border-color: $color-link-hover;
box-shadow: none;
transform: none;
text-decoration: none;
}
}
.icon--progress {
.btn--progress & {
position: absolute;
margin: auto;
top: 0.56rem;
left: 0;
right: 0;
width: 1.4rem;
height: 1.4rem;
stroke: $color-white;
stroke-width: 6;
animation: spin-clockwise 1.5s linear infinite;
}
}
.btn--progress {
position: relative;
background: $color-primary;
color: $color-primary;
&:hover {
background: $color-primary-light;
color: $color-primary-light;
}
}
.btn--close {
position: relative;
float: right;
top: 0.63rem;
right: 0.63rem;
&:hover {
cursor: pointer;
}
}
.icon {
.btn:hover & {
stroke: $color-primary-light;
transition: $transition;
}
}
.btn--text {
color: $color-link;
text-decoration: underline;
&:hover {
color: $color-link-hover;
}
}
Styling for button elements are interchangable with pseudo-button links, which employ the a
element. The rule of thumb is that you should employ button
if there is no href
.