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

359 lines
6.1 KiB
SCSS
Raw Normal View History

2017-04-10 08:32:40 -04:00
.card {
2019-11-22 16:13:00 -05:00
background-color: var(--color-card-background);
position: relative;
2019-05-06 22:35:04 -04:00
border-radius: var(--card-radius);
2019-06-11 14:10:58 -04:00
overflow: hidden;
2020-03-18 13:11:37 -04:00
border: 1px solid var(--color-border);
2019-12-18 00:27:08 -05:00
~ .card {
2020-06-01 13:03:19 -04:00
margin-bottom: var(--spacing-m);
2019-12-18 00:27:08 -05:00
}
}
.card--enable-overflow {
overflow: visible;
margin-bottom: var(--spacing-m);
}
2018-10-17 12:14:24 -05:00
.card--disabled {
opacity: 0.3;
pointer-events: none;
2017-11-30 22:51:55 -05:00
}
2018-10-17 12:14:24 -05:00
.card--section {
2019-06-11 14:10:58 -04:00
position: relative;
2021-04-23 15:59:48 -04:00
padding: var(--spacing-m);
2018-10-17 12:14:24 -05:00
}
2019-06-17 16:32:38 -04:00
.card--reward-total {
background-repeat: no-repeat;
background-size: cover;
2019-11-25 11:54:28 -05:00
color: var(--color-white);
2019-11-22 16:13:00 -05:00
font-size: var(--font-large);
2019-11-07 14:39:22 -05:00
font-weight: var(--font-weight-bold);
2019-06-17 16:32:38 -04:00
}
2019-09-26 12:07:11 -04:00
.card--inline {
2019-11-25 11:54:28 -05:00
border: 1px solid var(--color-border);
2019-09-27 14:56:15 -04:00
border-radius: var(--card-radius);
2020-06-01 13:03:19 -04:00
margin-bottom: var(--spacing-m);
2019-10-03 17:40:54 -04:00
&:last-of-type {
margin-bottom: 0;
}
2019-09-26 12:07:11 -04:00
}
2020-05-04 12:55:10 -04:00
.card--highlighted {
background-color: var(--color-card-background-highlighted);
}
.card--claim-preview-wrap {
@extend .card;
2020-06-01 13:03:19 -04:00
margin: var(--spacing-xl) 0;
2019-09-27 14:56:15 -04:00
min-width: 35rem;
}
2020-03-18 13:11:37 -04:00
.card--data {
display: flex;
align-items: center;
}
.card--after-tabs {
@extend .card;
margin-top: var(--spacing-l);
}
2018-10-17 12:14:24 -05:00
.card__actions {
2019-05-01 01:16:12 -04:00
display: flex;
2019-06-17 16:32:38 -04:00
align-items: center;
2020-06-01 13:03:19 -04:00
margin-top: var(--spacing-l);
2019-07-21 17:31:22 -04:00
&:only-child {
margin-top: 0;
}
> *:not(:last-child) {
2020-06-01 13:03:19 -04:00
margin-right: var(--spacing-m);
2018-10-09 11:01:54 -04:00
}
@media (max-width: $breakpoint-small) {
> * {
2020-06-01 13:03:19 -04:00
padding-bottom: var(--spacing-m);
}
flex-flow: wrap;
justify-content: space-between;
}
}
2018-03-26 14:32:43 -07:00
2020-05-21 11:38:28 -04:00
.card__title-section {
@extend .section__flex;
2020-04-03 12:33:48 -04:00
2021-04-23 15:59:48 -04:00
@media (min-width: $breakpoint-small) {
padding: var(--spacing-s) var(--spacing-m);
2020-04-03 12:33:48 -04:00
}
}
2020-05-21 11:38:28 -04:00
.card__title-section--body-list {
2021-04-23 15:59:48 -04:00
padding-left: var(--spacing-s);
2020-05-21 11:38:28 -04:00
2021-04-23 15:59:48 -04:00
@media (min-width: $breakpoint-small) {
padding: var(--spacing-m);
2020-05-21 11:38:28 -04:00
}
}
2020-08-10 16:47:39 -04:00
.card__title-section--small {
2021-04-23 15:59:48 -04:00
padding: var(--spacing-s);
2020-08-10 16:47:39 -04:00
}
2019-07-21 17:31:22 -04:00
.card__actions--inline {
@extend .card__actions;
margin-top: 0;
2020-05-11 15:54:07 -04:00
@media (max-width: $breakpoint-small) {
.button__content {
svg + .button__label {
display: none;
}
}
}
2019-07-21 17:31:22 -04:00
}
.card__actions--between {
@include between;
align-items: center;
width: 100%;
2018-10-17 12:14:24 -05:00
}
.card__actions--center {
display: flex;
2018-03-26 14:32:43 -07:00
align-items: center;
2018-10-17 12:14:24 -05:00
justify-content: center;
}
2018-03-26 14:32:43 -07:00
.card-stack {
.card:not(:last-of-type) {
2020-06-01 13:03:19 -04:00
margin-bottom: var(--spacing-l);
}
}
2020-11-13 13:10:47 -05:00
.card ~ .card-stack {
margin-top: var(--spacing-l);
}
.card__list {
2019-01-08 14:16:07 -05:00
column-count: 2;
2020-06-01 13:03:19 -04:00
column-gap: var(--spacing-l);
2019-06-17 16:32:38 -04:00
display: block;
2019-01-08 14:16:07 -05:00
.card {
display: inline-block;
2020-06-01 13:03:19 -04:00
margin-bottom: var(--spacing-l);
2020-08-25 14:07:12 -04:00
width: 100%;
2019-12-18 00:27:08 -05:00
}
@media (max-width: $breakpoint-small) {
column-count: 1;
.card {
display: block;
}
2019-01-08 14:16:07 -05:00
}
}
.card__message {
border-left: 0.5rem solid;
2020-06-01 13:03:19 -04:00
padding: var(--spacing-m) var(--spacing-m) var(--spacing-m) var(--spacing-l);
2019-12-09 12:25:13 -05:00
background-color: var(--color-primary-alt);
border-color: var(--color-primary);
2018-07-17 13:43:43 -04:00
}
.card__message--error {
2019-12-09 12:25:13 -05:00
background-color: var(--color-error);
border-color: var(--color-text-error);
}
.card__message--failure {
2019-12-09 12:25:13 -05:00
background-color: var(--color-error);
border-color: var(--color-text-error);
2018-03-26 14:32:43 -07:00
}
.card__title {
display: block;
align-items: center;
2021-04-23 15:59:48 -04:00
font-size: var(--font-large);
2019-11-07 14:39:22 -05:00
font-weight: var(--font-weight-light);
2019-05-01 01:16:12 -04:00
& > *:not(:last-child) {
2020-06-01 13:03:19 -04:00
margin-right: var(--spacing-m);
}
/* .badge rule inherited from file page prices, should be refactored */
.badge {
float: right;
2020-06-01 13:03:19 -04:00
margin-left: var(--spacing-s);
margin-top: 8px; // should be flex'd, but don't blame me! I just moved it down 3px
}
@media (max-width: $breakpoint-small) {
2020-08-10 16:47:39 -04:00
font-size: var(--font-large);
}
}
2020-08-10 16:47:39 -04:00
.card__title--small {
font-size: var(--font-body);
}
.card__title-actions {
2020-05-21 11:38:28 -04:00
align-self: flex-start;
2021-04-23 15:59:48 -04:00
@media (min-width: $breakpoint-small) {
padding: var(--spacing-s);
}
}
2021-04-08 11:21:45 -04:00
.card__title-actions--small {
padding: 0;
}
2019-11-22 16:13:00 -05:00
.card__title.card__title--deprecated {
2020-06-01 13:03:19 -04:00
margin-bottom: var(--spacing-s);
2019-11-22 16:13:00 -05:00
}
2019-07-21 17:31:22 -04:00
.card__title--between {
@extend .card__title;
justify-content: space-between;
width: 100%;
& > *:not(:last-child) {
margin-right: 0;
}
2020-08-21 15:44:54 -04:00
@media (max-width: $breakpoint-small) {
align-items: center;
}
}
2019-08-13 01:35:13 -04:00
.card__media--nsfw {
2019-12-09 12:25:13 -05:00
background-color: black;
2019-08-13 01:35:13 -04:00
}
2019-09-26 12:07:11 -04:00
.card__header {
position: relative;
display: flex;
align-items: flex-start;
2019-11-22 16:13:00 -05:00
.icon__wrapper {
2020-06-01 13:03:19 -04:00
margin-right: var(--spacing-l);
}
}
.card__header--between {
@extend .card__header;
justify-content: space-between;
align-items: center;
2020-05-21 11:38:28 -04:00
flex-wrap: wrap;
2021-04-23 15:59:48 -04:00
@media (max-width: $breakpoint-small) {
padding: var(--spacing-s);
padding-bottom: 0;
margin: 0;
margin-bottom: var(--spacing-s);
}
2020-05-21 11:38:28 -04:00
}
.card__header--nowrap {
@extend .card__header--between;
flex-wrap: nowrap;
}
.card__subtitle {
color: var(--color-text-subtitle);
2020-06-01 13:03:19 -04:00
margin: var(--spacing-s) 0;
font-size: var(--font-body);
}
2019-09-26 12:07:11 -04:00
.card__body {
2021-04-23 15:59:48 -04:00
padding: var(--spacing-m);
&:not(.card__body--no-title) {
padding-top: 0;
}
2020-04-29 15:31:11 -04:00
&.card__body--list {
padding: 0;
border-top: 1px solid var(--color-border);
}
@media (max-width: $breakpoint-small) {
2020-06-01 13:03:19 -04:00
padding: var(--spacing-l);
}
2019-09-26 12:07:11 -04:00
}
.card__main-actions {
2021-04-23 15:59:48 -04:00
padding: var(--spacing-m);
2019-11-22 16:13:00 -05:00
padding-bottom: 0;
2021-04-23 15:59:48 -04:00
margin-bottom: var(--spacing-s);
2019-11-22 16:13:00 -05:00
border-top: 1px solid var(--color-border);
2021-04-23 15:59:48 -04:00
height: 100%;
&:only-child {
border-top: none;
}
2019-09-26 12:07:11 -04:00
}
.card__body-actions {
2021-04-23 15:59:48 -04:00
padding: var(--spacing-s);
2020-09-11 16:46:15 -04:00
2021-04-23 15:59:48 -04:00
@media (min-width: $breakpoint-small) {
padding: var(--spacing-m);
}
}
.card__header-actions {
border-top: 1px solid var(--color-border);
2020-06-01 13:03:19 -04:00
padding: var(--spacing-l);
width: 100%;
}
2019-09-26 12:07:11 -04:00
.card__body--with-icon,
.card__main-actions--with-icon {
padding-left: 7.5rem;
}
2020-03-18 13:11:37 -04:00
.card__data-subtitle {
display: flex;
align-items: center;
:not(:first-child) {
2020-06-01 13:03:19 -04:00
margin-left: var(--spacing-s);
2020-03-18 13:11:37 -04:00
}
}
.card__body,
.card__main-actions {
2021-04-23 15:59:48 -04:00
padding: var(--spacing-m);
padding-bottom: 0;
margin: 0;
margin-bottom: var(--spacing-m);
}
.card__bottom-gutter {
@extend .help;
display: flex;
align-items: center;
2020-06-01 13:03:19 -04:00
margin-top: var(--spacing-m);
&:only-child,
&:first-child {
margin-top: 0;
}
> *:not(:last-child) {
2020-06-01 13:03:19 -04:00
margin-right: var(--spacing-m);
}
}
2021-04-26 15:19:17 -04:00
.card__bottom-actions {
display: flex;
justify-content: space-between;
align-items: center;
}