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

276 lines
4.1 KiB
SCSS
Raw Normal View History

2020-07-24 19:17:43 +02:00
.table {
width: 100%;
position: relative;
th,
td {
overflow: hidden;
}
thead {
cursor: default;
position: relative;
th {
border-bottom: 1px solid var(--color-border);
color: var(--color-text);
font-size: var(--font-medium);
2020-07-24 19:17:43 +02:00
}
}
tr {
&:not(:last-of-type) {
td {
border-bottom: 1px solid var(--color-border);
}
}
}
th,
td {
padding: 0.5rem 0;
2020-07-24 19:17:43 +02:00
}
th {
font-size: var(--font-xsmall);
color: var(--color-text-help);
padding-bottom: var(--spacing-xxxs);
}
2020-07-24 19:17:43 +02:00
}
th {
text-align: left;
}
td {
@media (max-width: $breakpoint-small) {
font-size: var(--font-small);
}
}
2020-07-24 19:17:43 +02:00
.table--condensed {
td,
th {
padding: 0.5rem;
&:first-of-type {
padding-left: 0;
}
&:last-of-type {
padding-right: 0;
}
}
tr {
&:nth-child(2n) {
background-color: transparent;
}
}
}
.table__item-label {
font-size: var(--font-multiplier-small);
font-weight: 300;
color: var(--color-text-subtitle);
}
.table__item--align-right {
text-align: right;
2020-09-02 22:08:37 +02:00
* {
text-align: right;
justify-content: flex-end;
}
2020-07-24 19:17:43 +02:00
}
2019-12-18 06:27:08 +01:00
.table__wrapper {
overflow-x: auto;
}
2019-11-22 22:13:00 +01:00
.table__header {
display: flex;
justify-content: space-between;
border-bottom: 1px solid var(--color-border);
2019-06-17 22:32:38 +02:00
2019-11-22 22:13:00 +01:00
.section__subtitle {
margin-bottom: 0;
2019-06-17 22:32:38 +02:00
}
2019-02-13 17:27:20 +01:00
}
2018-09-07 07:24:54 +02:00
2019-11-22 22:13:00 +01:00
.table__header-text {
width: 100%;
2021-04-23 21:59:48 +02:00
margin-right: var(--spacing-s);
2019-06-11 21:35:43 +02:00
}
2019-11-22 22:13:00 +01:00
.table__header-text--between {
@extend .table__header-text;
display: flex;
justify-content: space-between;
2019-12-18 06:27:08 +01:00
@media (max-width: $breakpoint-small) {
flex-wrap: wrap;
}
2019-06-11 21:35:43 +02:00
}
.table__date {
font-size: var(--font-small);
}
.table--help {
td:nth-of-type(1) {
min-width: 130px;
}
td:nth-of-type(2) {
2019-02-13 17:27:20 +01:00
@include constrict(20vw);
}
}
.table--transactions {
.table-column-lbc-date {
min-width: 140px;
}
.table-column-lbc-type {
min-width: 80px;
}
.table-column-lbc-transaction {
min-width: 100px;
}
2019-06-17 22:32:38 +02:00
td:nth-of-type(3) {
// Only add ellipsis to the links in the table
// We still want to show the entire message if a TX includes one
a,
button {
2020-04-21 15:39:03 +02:00
@include constrict(22rem);
2019-06-17 22:32:38 +02:00
vertical-align: bottom;
display: inline-block;
}
}
td:nth-of-type(4) {
width: 15%;
}
td:nth-of-type(5) {
width: 15%;
2019-06-17 22:32:38 +02:00
}
2017-10-03 19:27:52 +02:00
}
2021-03-25 12:24:49 +01:00
.table--btc-swap {
width: 100%;
td:nth-of-type(1) {
width: 1%;
2021-03-25 12:24:49 +01:00
}
td:nth-of-type(2) {
font-size: var(--font-small);
width: 98%;
}
td:nth-of-type(3) {
width: 1%;
}
2021-03-25 12:24:49 +01:00
}
.table--rewards {
td:nth-of-type(1) {
width: 40%;
}
td:nth-of-type(2) {
width: 17.5%;
}
td:nth-of-type(3) {
width: 17.5%;
}
td:nth-of-type(4) {
width: 25%;
}
}
2019-02-04 18:45:30 +01:00
.table--invites {
svg {
margin-bottom: -2px;
2020-06-01 19:03:19 +02:00
margin-left: var(--spacing-s);
2019-02-04 18:45:30 +01:00
}
}
2019-11-22 22:13:00 +01:00
.table--details {
font-size: var(--font-small);
}
.table--lbc-details {
@extend .table--details;
td:nth-of-type(2) {
text-align: right;
2019-11-22 22:13:00 +01:00
}
}
2019-12-09 18:25:13 +01:00
.table__item--actionable {
vertical-align: middle;
white-space: nowrap;
.button {
height: 1.5rem;
padding: var(--spacing-s);
margin-left: var(--spacing-m);
}
}
2020-08-13 21:06:43 +02:00
.table--publish-preview {
line-height: 1.1;
table-layout: fixed;
th,
td {
padding: 0.4rem 1rem;
}
// Column-1: "Label"
td:nth-of-type(1) {
font-weight: bold;
// The "value" is more important on smaller screens, so we truncate the "label".
width: 30%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Column-2: "Value"
td:nth-of-type(2) {
white-space: normal;
max-width: 70%;
}
.channel-value {
display: flex;
align-items: center;
.channel-thumbnail {
height: 1.3rem;
width: 1.3rem;
margin-right: var(--spacing-s);
}
.icon__wrapper {
padding: 0;
height: 1.3rem;
width: 1.3rem;
margin-right: var(--spacing-s);
border-radius: var(--border-radius);
}
}
.tag {
background-color: var(--color-primary);
color: var(--color-primary-contrast);
&:hover {
background-color: var(--color-secondary);
color: var(--color-secondary-contrast);
}
}
2020-08-13 21:06:43 +02:00
}