skill-assessment-app/app/assets/stylesheets/molecules/_buttons.scss
2016-08-04 07:50:48 -06:00

105 lines
1.7 KiB
SCSS

#{$all-buttons}, .btn {
appearance: none;
background-color: $primary-color;
border: 0;
border-radius: $base-border-radius;
color: #fff;
cursor: pointer;
display: inline-block;
font-family: $primary-font-face;
text-transform: uppercase;
font-size: 0.875rem;
letter-spacing: 0.2rem;
-webkit-font-smoothing: antialiased;
font-weight: 600;
line-height: 1;
padding: 1.2em 2em;
text-decoration: none;
transition: background-color $base-duration $base-timing;
user-select: none;
vertical-align: middle;
white-space: nowrap;
&:hover,
&:focus {
&:not([disabled]) {
background-color: $secondary-color;
color: #fff;
}
}
&:disabled {
cursor: not-allowed;
opacity: 0.3;
}
}
.secondary-btn,
input[type="submit"].secondary-btn,
button.secondary-btn {
background-color: $secondary-color;
}
.tertiary-btn,
input[type="submit"].tertiary-btn,
button.tertiary-btn {
background-color: transparent;
color: $primary-color;
border: 1px solid $primary-color;
}
.button-save {
display: none;
}
.button-cancel {
color: #ef0734;
border: 1px solid #ef0734;
display: none;
&:hover {
&:not([disabled]) {
color: #fff;
background-color: #ef0734;
}
}
}
.answer-buttons {
.button-cancel {
margin-left: .5rem;
}
}
.disabled-button {
pointer-events: none;
opacity: 0.5;
cursor: default;
}
// JS-enabled styles
html.no-js {
.tertiary-btn.button-edit {
border: none;
}
.button-save,
.button-cancel {
display: none;
}
}
html.js {
.button-edit {
@extend .btn;
}
}
@media screen and (min-width: $screen-sm) {
html.no-js {
.tertiary-btn.button-edit {
display: inline-block;
padding-top: .75rem;
}
}
}