Files
mixtape/zero.Backoffice.UI/app/styles/Modules/_button.scss
T

413 lines
6.3 KiB
SCSS
Raw Normal View History

2020-03-26 22:14:16 +01:00
2020-03-27 01:17:22 +01:00
button
{
2021-08-25 10:12:48 +02:00
font-family: var(--font);
color: var(--color-text);
2020-04-07 14:47:57 +02:00
display: inline-block;
2020-06-05 15:34:13 +02:00
font-size: var(--font-size);
2020-03-27 01:17:22 +01:00
2020-04-07 13:18:19 +02:00
&:visited, &:link
2020-03-27 01:17:22 +01:00
{
2020-04-07 13:18:19 +02:00
text-decoration: none;
}
2020-04-28 14:51:17 +02:00
&[disabled]
{
cursor: default;
pointer-events: none;
}
2020-03-27 01:17:22 +01:00
}
2020-04-07 14:47:57 +02:00
button::-moz-focus-inner
{
border: 0;
}
2021-08-25 10:12:48 +02:00
.ui-button,
.ui-dot-button,
.ui-icon-button
2020-03-27 01:17:22 +01:00
{
2020-04-09 13:06:15 +02:00
position: relative;
2020-03-30 17:46:29 +02:00
display: inline-flex;
justify-content: space-between;
align-items: center;
background: var(--color-button);
color: var(--color-button-text);
2021-01-08 00:47:20 +01:00
padding: 0 21px;
2021-01-06 12:03:21 +01:00
height: 48px;
2021-09-22 11:46:00 +02:00
border-radius: var(--radius-inner);
2021-01-09 19:09:31 +01:00
font-size: var(--font-size);
2020-04-03 18:03:36 +02:00
font-weight: 700;
2020-03-27 01:17:22 +01:00
margin: 0;
-webkit-backface-visibility: hidden;
-webkit-appearance: none;
cursor: pointer;
user-select: none;
2020-09-10 18:32:38 +02:00
border: none;
2020-03-27 01:17:22 +01:00
overflow: hidden;
2021-08-25 10:12:48 +02:00
font-family: var(--font);
2020-03-27 01:17:22 +01:00
&:hover
{
opacity: 0.9;
}
&:active
{
opacity: 1;
}
2020-04-28 14:51:17 +02:00
&[disabled]
2020-03-27 01:17:22 +01:00
{
2020-04-28 14:51:17 +02:00
cursor: default;
opacity: 0.7;
2020-03-27 01:17:22 +01:00
pointer-events: none;
}
2020-03-30 17:11:56 +02:00
2020-04-03 14:27:39 +02:00
&.type-big
{
height: 50px;
padding: 0 30px;
}
2020-08-17 14:46:13 +02:00
&.type-small
{
2021-01-13 13:51:55 +01:00
height: 38px;
2020-10-07 00:07:52 +02:00
font-size: var(--font-size-s);
2021-01-13 13:51:55 +01:00
padding: 0 16px;
2020-08-17 14:46:13 +02:00
}
&.type-light, &.type-action
2020-04-07 00:11:35 +02:00
{
background: var(--color-button-light);
color: var(--color-text);
2020-09-10 16:12:06 +02:00
border: 1px solid transparent;
}
2021-01-08 00:47:20 +01:00
&.type-primary
{
2021-09-23 10:58:14 +02:00
background: var(--color-primary);
color: var(--color-primary-text);
2021-01-08 00:47:20 +01:00
min-width: 90px;
justify-content: center;
}
2021-09-11 14:54:28 +02:00
&.type-accent
{
2021-09-23 15:04:36 +02:00
//min-width: 90px;
2021-09-11 14:54:28 +02:00
justify-content: center;
background: var(--color-accent);
color: var(--color-accent-fg);
border: 1px solid transparent;
}
2021-04-22 14:48:10 +02:00
&.type-secondary
{
background: var(--color-secondary);
color: var(--color-secondary-text);
border: 1px solid transparent;
}
2021-01-09 19:09:31 +01:00
&.type-primary.type-small
{
min-width: 0;
}
&.type-light.type-onbg, &.type-action.type-onbg
{
background: var(--color-button-light-onbg);
color: var(--color-text);
box-shadow: var(--shadow-short);
2020-04-07 00:11:35 +02:00
}
&.type-danger
{
background: var(--color-accent-error);
color: white;
}
2020-04-09 13:06:15 +02:00
&.type-blank
{
background: transparent;
color: var(--color-text);
2020-04-09 19:35:57 +02:00
padding: 0 16px;
2020-04-09 13:06:15 +02:00
}
&.type-block
{
display: flex;
width: 100%;
}
2020-03-30 17:11:56 +02:00
& + .ui-button
{
2020-04-07 00:11:35 +02:00
margin-left: 15px;
2020-03-30 17:11:56 +02:00
}
2020-03-30 17:46:29 +02:00
2020-10-09 15:26:26 +02:00
&.is-attached
{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
2021-01-09 19:09:31 +01:00
& + .ui-button, & + .ui-dropdown-container .ui-button
2020-10-09 15:26:26 +02:00
{
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-left: -1px;
border-left: 1px solid rgba(0,0,0,0.1);
padding: 0 9px 0 8px;
.ui-button-icon
{
margin: 0 !important;
}
}
}
2020-04-09 13:06:15 +02:00
.ui-button-icon, .ui-button-caret
2020-03-30 17:46:29 +02:00
{
2020-04-10 19:17:37 +02:00
margin-left: 18px;
margin-right: -3px;
2020-03-30 17:46:29 +02:00
position: relative;
2020-04-07 00:11:35 +02:00
font-size: var(--font-size-l);
2020-03-30 17:46:29 +02:00
top: -1px;
/*color: var(--color-text-dim);*/
2020-03-30 17:46:29 +02:00
}
2020-09-02 12:20:28 +02:00
&.type-small .ui-button-icon
{
margin-left: 10px;
margin-right: -2px;
font-size: var(--font-size);
}
2020-06-24 16:01:24 +02:00
&.no-label .ui-button-icon
{
margin: 0 -5px !important;
}
2020-03-30 17:46:29 +02:00
&.caret-left
{
flex-direction: row-reverse;
2020-04-09 13:06:15 +02:00
.ui-button-icon, .ui-button-caret
2020-03-30 17:46:29 +02:00
{
margin-right: 12px;
margin-left: -7px;
}
}
2020-04-09 15:53:03 +02:00
&.has-ellipsis .ui-button-text:after
{
content: '...';
}
2020-03-27 01:17:22 +01:00
}
2020-07-24 14:13:21 +02:00
.ui-button-text
{
span
{
font-weight: 400;
}
}
2020-04-09 13:06:15 +02:00
.ui-button-state
{
position: absolute;
left: 50%;
top: 50%;
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
margin-left: -8px;
margin-top: -8px;
text-align: center;
}
.ui-button-progress
{
width: 100%;
height: 100%;
z-index: 2;
border-radius: 40px;
border: 2px solid rgba(white, 0.2);
border-left-color: var(--color-button-text);
2020-04-09 13:06:15 +02:00
opacity: 1;
will-change: transform;
animation: rotating .5s linear infinite;
transition: opacity .25s ease;
.type-light &, .type-blank &
2020-04-09 13:06:15 +02:00
{
//border-color: rgba(white, 0.2);
border-left-color: var(--color-text);
2020-04-09 13:06:15 +02:00
}
}
@keyframes rotating
{
from
{
-webkit-transform: rotate(0);
transform: rotate(0)
}
to
{
-webkit-transform: rotate(1turn);
transform: rotate(1turn)
}
}
// states
2020-04-09 15:53:03 +02:00
.ui-button.has-state:not(.state-default)
2020-04-09 13:06:15 +02:00
{
> :not(.ui-button-state)
{
visibility: hidden;
}
}
2020-03-26 22:14:16 +01:00
2020-04-06 23:48:28 +02:00
.ui-dot-button
{
background: transparent;
padding: 0;
height: 28px;
width: 36px;
text-align: center;
justify-content: center;
2020-05-20 13:15:20 +02:00
color: var(--color-text);
2020-04-06 23:48:28 +02:00
&:hover
{
background: var(--color-button-light);
2020-04-06 23:48:28 +02:00
}
2020-04-09 15:53:03 +02:00
.ui-button-icon
2020-04-06 23:48:28 +02:00
{
2020-05-20 13:15:20 +02:00
font-size: var(--font-size-xl);
2020-04-06 23:48:28 +02:00
margin: 0;
}
}
2020-04-07 00:11:35 +02:00
.ui-icon-button
{
background: var(--color-button-light);
2020-10-02 14:18:51 +02:00
padding: 0 !important;
2020-04-07 00:11:35 +02:00
height: 32px;
width: 32px;
border-radius: 16px;
text-align: center;
justify-content: center;
font-size: var(--font-size-l);
&:hover
{
opacity: 1;
}
2020-04-09 15:53:03 +02:00
.ui-button-icon
2020-04-07 00:11:35 +02:00
{
2021-09-23 15:04:36 +02:00
//color: var(--color-text);
2020-04-07 00:11:35 +02:00
margin: 0;
top: 0;
}
2020-06-17 15:55:58 +02:00
&.type-small
{
height: 24px;
width: 24px;
.ui-button-icon
{
font-size: 13px;
2020-10-02 14:18:51 +02:00
margin: 0 !important;
2020-06-17 15:55:58 +02:00
}
}
2020-04-24 15:13:54 +02:00
}
.ui-select-button
{
2020-12-30 13:21:35 +01:00
color: var(--color-text);
2020-04-24 15:13:54 +02:00
display: inline-flex;
align-items: center;
}
2020-12-07 15:47:50 +01:00
.ui-select-button-icon
2020-04-24 15:13:54 +02:00
{
2021-01-06 12:03:21 +01:00
width: 48px;
height: 48px;
display: inline-flex;
justify-content: center;
align-items: center;
2021-09-22 11:46:00 +02:00
border-radius: var(--radius-inner);
background: var(--color-button-light);
2021-04-22 00:31:23 +02:00
border: 1px solid transparent;
color: var(--color-text);
2020-04-24 15:13:54 +02:00
text-align: center;
2020-05-05 16:07:06 +02:00
font-size: 16px;
2020-12-06 19:58:36 +01:00
flex-shrink: 0;
2020-12-07 15:47:50 +01:00
overflow: hidden;
2020-06-10 12:35:26 +02:00
&.is-image
{
2021-02-11 16:09:55 +01:00
padding: 5px;
2020-12-07 15:47:50 +01:00
font-size: 0;
color: transparent;
2021-04-20 16:21:33 +02:00
background: var(--color-image-bg);
2021-09-22 11:46:00 +02:00
border-radius: var(--radius-inner);
2021-04-22 00:31:23 +02:00
border: 1px solid var(--color-line-onbg);
2020-12-06 19:58:36 +01:00
img
{
2021-03-23 14:55:27 +01:00
object-fit: contain;
2020-12-06 19:58:36 +01:00
width: 100%;
height: 100%;
2021-09-22 11:46:00 +02:00
border-radius: var(--radius-inner);
2020-12-06 19:58:36 +01:00
}
2020-06-10 12:35:26 +02:00
}
2020-04-24 15:13:54 +02:00
}
.ui-select-button-content
{
display: inline-flex;
flex-direction: column;
2021-04-23 14:06:30 +02:00
margin: 0 16px;
2020-04-24 15:13:54 +02:00
}
2020-09-10 14:21:06 +02:00
strong.ui-select-button-label
2020-04-24 15:13:54 +02:00
{
2020-09-10 14:21:06 +02:00
font-weight: 400;
b, strong
{
font-weight: 400;
}
2020-04-24 15:13:54 +02:00
}
.ui-select-button-description
{
color: var(--color-text-dim);
2020-04-24 15:13:54 +02:00
margin-top: 3px;
2020-05-05 16:07:06 +02:00
font-size: var(--font-size-xs);
2021-01-07 15:50:05 +01:00
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
-webkit-line-clamp: 1;
max-height: 16px;
p
{
margin: 0;
}
2020-04-09 15:53:03 +02:00
}