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

242 lines
4.5 KiB
SCSS
Raw Normal View History

2017-04-10 14:32:40 +02:00
.card {
background-color: $lbry-white;
border: 1px solid $lbry-gray-1;
margin-bottom: var(--spacing-vertical-xlarge);
position: relative;
2019-05-07 04:35:04 +02:00
border-radius: var(--card-radius);
box-shadow: var(--box-shadow) $lbry-gray-1;
2018-10-09 17:01:54 +02:00
2019-02-13 17:27:20 +01:00
html[data-mode='dark'] & {
background-color: rgba($lbry-white, 0.1);
border-color: rgba($lbry-white, 0.1);
2019-05-07 04:35:04 +02:00
box-shadow: var(--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--link {
cursor: pointer;
2018-10-09 17:01:54 +02:00
}
2018-03-26 23:32:43 +02:00
2018-10-17 19:14:24 +02:00
.card--section {
padding: var(--spacing-vertical-large);
2018-10-17 19:14:24 +02:00
.card__content:not(:last-of-type) {
margin-bottom: var(--spacing-vertical-large);
}
2018-10-17 19:14:24 +02:00
}
.card--space-between {
@include between;
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
// 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;
font-size: 1.15rem;
> *:not(:last-child) {
2019-05-07 04:35:04 +02:00
margin-right: var(--spacing-vertical-medium);
2018-10-09 17:01:54 +02:00
}
}
2018-03-26 23:32:43 +02:00
.card__actions--between {
@include between;
2018-10-17 19:14:24 +02:00
}
.card__actions--bottom-corner {
right: 2rem;
bottom: 2rem;
position: absolute;
}
2018-03-26 23:32:43 +02:00
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
.card__actions--top-corner {
top: 0;
right: 0;
position: absolute;
2018-10-17 19:14:24 +02:00
}
2018-03-26 23:32:43 +02:00
.card__actions--top-space {
padding-top: var(--spacing-vertical-small);
}
// C A R D
// C O N T E N T
2018-10-17 19:14:24 +02:00
.card__content {
font-size: 1.25rem;
2018-10-17 19:14:24 +02:00
2019-01-17 07:37:06 +01:00
p:not(:last-child) {
margin-bottom: var(--spacing-vertical-medium);
}
.badge {
bottom: -0.15rem;
position: relative;
}
2018-08-03 20:28:11 +02:00
}
// C A R D
// H E A D E R
2018-10-17 19:14:24 +02:00
.card__header {
position: relative;
2018-10-17 19:14:24 +02:00
&:not(.card__header--flat) {
2019-05-01 07:16:12 +02:00
margin-bottom: var(--spacing-vertical-medium);
2018-10-17 19:14:24 +02:00
}
}
2017-11-22 21:28:56 +01:00
// C A R D
// I N T E R N A L
.card__internal-links {
top: 2rem;
right: 2rem;
position: absolute;
}
// C A R D
// L I S T
2018-03-26 23:32:43 +02:00
.card__list {
display: grid;
grid-gap: var(--spacing-vertical-medium);
2019-05-07 04:35:04 +02:00
// Depending on screen width, the amount of items in
// each row change and are auto-sized
@media (min-width: 2001px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 10), 1fr));
}
@media (min-width: 1801px) and (max-width: 2000px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 8), 1fr));
}
@media (min-width: 1551px) and (max-width: 1800px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 7), 1fr));
}
@media (min-width: 1051px) and (max-width: 1550px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 6), 1fr));
}
@media (min-width: 901px) and (max-width: 1050px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 5), 1fr));
}
@media (min-width: 751px) and (max-width: 900px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 4), 1fr));
}
@media (max-width: 750px) {
grid-template-columns: repeat(auto-fill, minmax(calc(100% / 3), 1fr));
}
2018-10-17 19:14:24 +02:00
}
2018-03-26 23:32:43 +02:00
2019-01-08 20:16:07 +01:00
.card__list--rewards {
column-count: 2;
column-gap: var(--spacing-vertical-medium);
margin-bottom: var(--spacing-vertical-large);
.card {
display: inline-block;
margin: 0 0 var(--spacing-vertical-medium);
width: 100%;
}
}
// 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-05-07 04:35:04 +02:00
padding: var(--spacing-vertical-medium) var(--spacing-vertical-medium) var(--spacing-vertical-medium)
var(--spacing-vertical-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 {
font-size: 1.15rem;
margin-bottom: var(--spacing-vertical-small);
p {
margin-bottom: var(--spacing-vertical-small);
}
.badge {
bottom: -0.12rem;
position: relative;
}
2017-07-29 20:12:13 +02:00
}
// C A R D
// T I T L E
.card__title {
font-size: 2rem;
font-weight: 600;
2019-05-07 04:35:04 +02:00
padding-bottom: var(--spacing-vertical-medium);
+ .card__content {
margin-top: var(--spacing-vertical-medium);
}
}
2018-01-04 06:05:20 +01:00
.card__title--flex {
2018-10-17 19:14:24 +02:00
display: flex;
align-items: center;
2019-05-01 07:16:12 +02:00
& > *:not(:last-child) {
margin-right: var(--spacing-vertical-medium);
}
}
.card__title--flex-between {
display: flex;
@include between;
align-items: center;
}