Files
threshold-ui/addons/rose/addon/styles/rose/components/_button.scss
T

147 lines
3.5 KiB
SCSS

@use '../utilities/button';
@use '../utilities/type' as typography;
@use '../variables/sizing';
$size-xs: sizing.rems(xs); // 8
$size-xxs: sizing.rems(xxs); // 4
$size-xxxs: sizing.rems(xxxs); // 2
$size-xxxxs: sizing.rems(xxxxs); // 1
@include button.button-style(
'primary',
(
color: var(--white),
background-color: var(--info),
border-color: var(--info-starker-2),
box-shadow: 0 $size-xxs $size-xxs
rgba(var(--stark-components), var(--opacity-2)),
text-shadow: 0 $size-xxxxs $size-xxxxs
rgba(var(--black-components), var(--opacity-2)),
),
(
background-color: var(--info-subtler-1),
box-shadow: (
0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)),
0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)),
),
),
(
background-color: var(--info-starker-1),
box-shadow: none,
),
(
opacity: var(--opacity-1),
box-shadow: none,
)
);
@include button.button-style(
'secondary',
(
color: var(--ui-gray-starker-3),
background-color: var(--ui-gray-subtler-5),
border-color: var(--ui-gray-subtler-2),
box-shadow: 0 $size-xxs $size-xxs
rgba(var(--stark-components), var(--opacity-2)),
),
(
color: var(--ui-gray-starker-4),
background-color: var(--subtle),
border-color: var(--ui-gray-starker-1),
box-shadow: (
0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)),
0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)),
),
),
(
color: var(--ui-gray-starker-4),
background-color: var(--ui-gray-subtler-3),
border-color: var(--ui-gray-starker-1),
box-shadow: none,
),
(
opacity: var(--opacity-1),
box-shadow: none,
)
);
@include button.button-style(
'warning',
(
color: var(--failure),
background-color: var(--subtle),
border-color: var(--failure),
box-shadow: 0 $size-xxs $size-xxs
rgba(var(--stark-components), var(--opacity-2)),
),
(
color: var(--white),
border-color: var(--failure-starker-1),
background-color: var(--failure),
box-shadow: (
0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)),
0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)),
),
text-shadow: 0 $size-xxxxs $size-xxxxs
rgba(var(--black-components), var(--opacity-2)),
),
(
color: var(--white),
border-color: var(--ui-gray-starker-2),
background-color: var(--failure-starker-1),
box-shadow: (
0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)),
0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)),
),
text-shadow: 0 $size-xxxxs $size-xxxxs
rgba(var(--black-components), var(--opacity-2)),
),
(
border-color: var(--ui-gray-subtler-2),
opacity: var(--opacity-1),
box-shadow: none,
)
);
@include button.button-style(
'ghost',
(
color: var(--info),
border-color: transparent,
background-color: var(--subtle),
),
(
background-color: var(--ui-gray-subtler-5),
),
(
background-color: var(--ui-gray-subtler-4),
),
(
opacity: var(--opacity-1),
)
);
.rose-button-inline-link-action {
@include typography.type(m, semibold);
color: var(--info);
border: 0;
background: none;
margin: 0;
padding: 0;
display: inline;
&:not(:disabled) {
&:hover {
text-decoration: underline;
}
&:active {
color: var(--info-starker-1);
}
}
&:disabled {
cursor: not-allowed;
opacity: var(--opacity-1);
}
}