lbry-desktop/ui/scss/component/_card.scss

215 lines
3.9 KiB
SCSS
Raw Normal View History

2017-04-10 14:32:40 +02:00
.card {
background-color: $lbry-white;
2019-06-17 22:32:38 +02:00
margin-bottom: var(--spacing-large);
position: relative;
2019-05-07 04:35:04 +02:00
border-radius: var(--card-radius);
box-shadow: var(--card-box-shadow) $lbry-gray-1;
2019-06-11 20:10:58 +02:00
overflow: hidden;
2018-10-09 17:01:54 +02:00
2019-06-29 00:21:21 +02:00
[data-mode='dark'] & {
2019-07-01 20:42:32 +02:00
background-color: var(--dm-color-05);
box-shadow: var(--card-box-shadow) darken($lbry-gray-1, 80%);
2018-10-09 17:01:54 +02:00
}
}
2018-10-17 19:14:24 +02:00
.card--disabled {
opacity: 0.3;
pointer-events: none;
2017-12-01 04:51:55 +01:00
}
2018-10-17 19:14:24 +02:00
.card--section {
2019-06-11 20:10:58 +02:00
position: relative;
padding: var(--spacing-large);
2018-10-17 19:14:24 +02:00
}
2018-03-26 23:32:43 +02:00
.card--wallet-balance {
background-repeat: no-repeat;
2018-03-26 23:32:43 +02:00
background-size: cover;
color: $lbry-white;
2018-03-26 23:32:43 +02:00
justify-content: space-between;
}
2018-03-26 23:32:43 +02:00
2019-06-17 22:32:38 +02:00
.card--reward-total {
background-repeat: no-repeat;
background-size: cover;
color: $lbry-white;
2019-07-21 23:31:22 +02:00
font-size: var(--font-title);
2019-11-07 20:39:22 +01:00
font-weight: var(--font-weight-bold);
2019-06-17 22:32:38 +02:00
}
2019-09-26 18:07:11 +02:00
.card--inline {
2019-09-27 20:56:15 +02:00
border: 1px solid $lbry-gray-1;
border-radius: var(--card-radius);
2019-10-03 23:40:54 +02:00
margin-bottom: var(--spacing-medium);
&:last-of-type {
margin-bottom: 0;
}
2019-09-27 20:56:15 +02:00
[data-mode='dark'] & {
border-color: var(--dm-color-03);
}
2019-09-26 18:07:11 +02:00
}
.card--claim-preview-wrap {
@extend .card;
margin: var(--spacing-xlarge) 0;
2019-09-27 20:56:15 +02:00
min-width: 35rem;
}
// C A R D
// A C T I O N S
2018-10-14 19:41:19 +02:00
2018-10-17 19:14:24 +02:00
.card__actions {
2019-05-01 07:16:12 +02:00
display: flex;
2019-06-17 22:32:38 +02:00
align-items: center;
margin-top: var(--spacing-large);
2019-07-21 23:31:22 +02:00
font-size: var(--font-body);
&:only-child {
margin-top: 0;
}
> *:not(:last-child) {
2019-06-11 20:10:58 +02:00
margin-right: var(--spacing-medium);
2018-10-09 17:01:54 +02:00
}
}
2018-03-26 23:32:43 +02:00
2019-07-21 23:31:22 +02:00
.card__actions--inline {
@extend .card__actions;
margin-top: 0;
}
.card__actions--between {
@include between;
2018-10-17 19:14:24 +02:00
}
.card__actions--center {
display: flex;
2018-03-26 23:32:43 +02:00
align-items: center;
2018-10-17 19:14:24 +02:00
justify-content: center;
}
2018-03-26 23:32:43 +02:00
// C A R D
// L I S T
2018-03-26 23:32:43 +02:00
.card__list {
2019-01-08 20:16:07 +01:00
column-count: 2;
2019-06-11 20:10:58 +02:00
column-gap: var(--spacing-medium);
2019-06-17 22:32:38 +02:00
display: block;
2019-01-08 20:16:07 +01:00
.card {
display: inline-block;
2019-06-11 20:10:58 +02:00
margin: 0 0 var(--spacing-medium);
2019-01-08 20:16:07 +01:00
}
}
// C A R D
// M E S S A G E
2018-03-26 23:32:43 +02:00
.card__message {
border-left: 0.5rem solid;
2019-06-11 20:10:58 +02:00
padding: var(--spacing-medium) var(--spacing-medium) var(--spacing-medium) var(--spacing-large);
2018-10-17 19:14:24 +02:00
&:not(&--error):not(&--failure):not(&--success) {
background-color: rgba($lbry-teal-1, 0.1);
border-color: $lbry-teal-3;
2018-10-17 19:14:24 +02:00
}
2018-07-17 19:43:43 +02:00
}
.card__message--error {
background-color: rgba($lbry-orange-1, 0.1);
border-color: $lbry-orange-3;
}
.card__message--failure {
background-color: rgba($lbry-red-1, 0.1);
border-color: $lbry-red-3;
2017-04-12 04:01:45 +02:00
}
2018-03-26 23:32:43 +02:00
.card__message--success {
background-color: rgba($lbry-green-1, 0.1);
border-color: $lbry-green-3;
2018-03-26 23:32:43 +02:00
}
// C A R D
// S U B T I T L E
2018-03-26 23:32:43 +02:00
.card__subtitle {
2019-07-21 23:31:22 +02:00
margin: var(--spacing-small) 0;
padding: var(--spacing-small);
border-radius: var(--card-radius);
font-size: var(--font-body);
background-color: rgba($lbry-blue-1, 0.1);
color: darken($lbry-gray-5, 15%);
2019-07-21 23:31:22 +02:00
[data-mode='dark'] & {
background-color: var(--dm-color-04);
color: inherit;
}
2019-07-21 23:31:22 +02:00
}
.card__subtitle--status {
@extend .card__subtitle;
background-color: $lbry-yellow-1;
[data-mode='dark'] & {
2019-07-21 23:31:22 +02:00
background-color: rgba($lbry-yellow-1, 0.1);
}
2017-07-29 20:12:13 +02:00
}
// C A R D
// T I T L E
.card__title {
2018-10-17 19:14:24 +02:00
display: flex;
align-items: center;
2019-07-21 23:31:22 +02:00
margin-bottom: var(--spacing-small);
2019-09-30 23:48:30 +02:00
font-size: var(--font-section-title);
2019-11-07 20:39:22 +01:00
font-weight: var(--font-weight-light);
2019-05-01 07:16:12 +02:00
& > *:not(:last-child) {
2019-06-11 20:10:58 +02:00
margin-right: var(--spacing-medium);
}
}
2019-07-21 23:31:22 +02:00
.card__title--between {
@extend .card__title;
justify-content: space-between;
}
2019-08-13 07:35:13 +02:00
.card__media--nsfw {
background-color: $lbry-grape-3;
}
.card__media--disabled {
opacity: 0.5;
pointer-events: none;
}
2019-09-26 18:07:11 +02:00
.card__header {
padding: var(--spacing-large);
}
.card__body {
padding: var(--spacing-large);
padding-top: 0;
}
.card__main-actions {
padding: var(--spacing-large);
2019-09-27 20:56:15 +02:00
background-color: var(--color-card-actions);
2019-09-26 18:07:11 +02:00
color: darken($lbry-gray-5, 15%);
font-size: var(--font-body);
[data-mode='dark'] & {
2019-10-03 23:40:54 +02:00
background-color: var(--color-card-actions--dark);
2019-09-26 18:07:11 +02:00
color: inherit;
}
}
.card__body--with-icon,
.card__main-actions--with-icon {
padding-left: 7.5rem;
}