SiteWebAstrolabe/src/scss/components/_button.scss

87 lines
1.4 KiB
SCSS
Raw Normal View History

2020-06-23 13:44:10 +02:00
.button,
.btn {
2020-06-19 23:47:44 +02:00
display: inline-block;
border: 0;
background-color: var(--color-action-bg);
color: var(--color-action-text);
padding: get-size(300) get-size('base');
line-height: 1;
margin: 0;
text-decoration: none;
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
}
.button:hover,
.button:focus {
filter: brightness(1.2);
}
2020-06-23 13:44:10 +02:00
.button:focus:hover,
.btn:focus:hover {
2020-06-19 23:47:44 +02:00
outline: none;
}
2020-06-23 13:44:10 +02:00
.button:focus:not(:hover),
.btn:not(button):focus:not(:hover) {
outline: 1px dotted var(--color-white);
outline-offset: -1rem;
2020-06-19 23:47:44 +02:00
}
2020-06-23 13:44:10 +02:00
.button:active,
.btn:active {
2020-06-19 23:47:44 +02:00
transform: scale(.99);
}
.btn {
display: inline-block;
2020-06-23 13:44:10 +02:00
padding: 1.125rem 2rem;
2020-06-19 23:47:44 +02:00
border: 0;
border-radius: 1.75rem;
2020-06-23 13:44:10 +02:00
line-height: 1.25rem;
2020-06-19 23:47:44 +02:00
text-decoration: none;
font-size: 1.125rem;
font-weight: 600;
&:focus {
outline: none;
}
2020-06-19 23:47:44 +02:00
+ .btn {
margin-left: 2rem;
}
2020-07-07 00:09:37 +02:00
svg {
margin-left: .5rem;
}
2020-06-19 23:47:44 +02:00
&.btn-primary {
color: var(--color-dark);
background-color: var(--color-primary);
font-weight: 700;
&:focus:not(:hover) {
outline-color: var(--color-dark);
}
2020-06-19 23:47:44 +02:00
}
&.btn-secondary {
color: var(--color-white);
background-color: var(--color-secondary);
2020-06-23 13:44:10 +02:00
font-weight: 500;
2020-06-19 23:47:44 +02:00
}
2020-07-13 20:36:44 +02:00
&.btn-icon {
padding-top: 1rem;
padding-bottom: 1rem;
display: flex;
align-items: center;
svg {
margin-left: 0;
margin-right: .5rem;
}
}
2020-06-19 23:47:44 +02:00
}