soapbox/app/styles/components/buttons.scss

163 wiersze
2.5 KiB
SCSS
Czysty Zwykły widok Historia

2020-06-03 06:10:53 +00:00
button {
font-family: inherit;
cursor: pointer;
&:focus {
outline: none;
}
}
.button {
background-color: var(--brand-color);
border: 10px none;
2021-09-21 02:35:54 +00:00
border-radius: 999px;
2020-06-03 06:10:53 +00:00
box-sizing: border-box;
color: #fff;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
2020-06-03 06:10:53 +00:00
font-family: inherit;
font-size: 14px;
font-weight: 500;
height: 36px;
letter-spacing: 0;
line-height: 36px;
overflow: hidden;
padding: 0 16px;
position: relative;
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
width: auto;
transition: 0.2s;
.svg-icon {
margin-right: 5px;
}
2020-06-03 06:10:53 +00:00
&:active,
&:focus,
&:hover {
2020-06-07 03:55:00 +00:00
background-color: var(--brand-color--hicontrast);
2020-06-03 06:10:53 +00:00
}
&--destructive {
transition: none;
&:active,
&:focus,
&:hover {
background-color: $error-red;
transition: none;
}
}
&--small {
font-size: 13px;
height: auto;
line-height: normal;
padding: 4px 8px;
}
&:disabled,
&.disabled {
2020-06-07 03:55:00 +00:00
background-color: var(--brand-color--med);
2020-06-03 06:10:53 +00:00
cursor: default;
}
&::-moz-focus-inner {
border: 0;
}
&::-moz-focus-inner,
&:focus,
&:active {
outline: 0 !important;
}
&.button-alternative {
2021-01-01 02:47:15 +00:00
color: #fff;
2020-06-03 06:10:53 +00:00
background: var(--brand-color);
&:active,
&:focus,
&:hover {
background-color: var(--brand-color);
}
}
&.button-alternative-2 {
2020-06-07 21:44:17 +00:00
background: var(--accent-color);
2020-06-03 06:10:53 +00:00
&:active,
&:focus,
&:hover {
2020-06-07 21:44:17 +00:00
background-color: var(--accent-color--bright);
2020-06-03 06:10:53 +00:00
}
}
&.button-secondary {
2021-09-21 18:45:37 +00:00
color: var(--primary-text-color);
2020-06-03 06:10:53 +00:00
background: transparent;
border: 1px solid var(--brand-color);
&:active,
&:focus,
&:hover {
2021-09-21 18:45:37 +00:00
border-color: var(--accent-color);
2020-06-03 06:10:53 +00:00
}
&:disabled {
opacity: 0.5;
}
2020-08-23 20:31:49 +00:00
i.fa {
margin-right: 0.5em;
}
2020-06-03 06:10:53 +00:00
}
&.button--block {
display: flex;
2020-06-03 06:10:53 +00:00
width: 100%;
}
}
2020-03-27 20:59:38 +00:00
button,
a.button {
2020-04-22 00:44:55 +00:00
&.standard {
2020-03-27 20:59:38 +00:00
2020-04-22 00:44:55 +00:00
// NOTE - will define the larger standard buttons here and apply class where used.
2020-03-27 20:59:38 +00:00
2020-04-22 00:44:55 +00:00
&-small {
@include font-size(11);
@include line-height(11);
@include font-weight(bold);
2020-05-29 00:58:37 +00:00
height: 20px;
padding: 5px 15px;
border: 0;
border-radius: 4px;
2020-04-22 00:44:55 +00:00
text-transform: uppercase;
2020-05-29 00:58:37 +00:00
color: #fff;
2020-06-02 22:42:09 +00:00
background: #607cf5;
2020-04-22 00:44:55 +00:00
}
}
2020-03-27 20:59:38 +00:00
2020-04-22 00:44:55 +00:00
i.fa {
margin-right: 0.6em;
}
}
.button--follow {
display: flex;
align-items: center;
justify-content: center;
.svg-icon {
margin-left: 6px;
width: 20px;
height: 20px;
}
}