Skip to content

Commit

Permalink
fix(ffe-tables): td and th should not wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hellstrand committed Apr 25, 2024
1 parent a599a7c commit 997c33b
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions packages/ffe-tables/less/table.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ffe-table {
font-family: 'SpareBank1-regular', arial, sans-serif;
margin: @ffe-spacing-sm 0;
margin: var(--ffe-spacing-sm) 0;
min-width: 100%;
text-align: left;
border-collapse: collapse;
Expand All @@ -26,9 +26,14 @@
}
}

&__footer {
.ffe-strong-text();
&__footer,
&__heading {
font-family: var(--ffe-g-font-strong);
font-variant-numeric: tabular-nums;
font-weight: normal;
}

&__footer {
.ffe-table__row {
border-bottom: none;
}
Expand All @@ -37,45 +42,48 @@
&__row {
border-bottom: 1px solid var(--ffe-v-table-row-bordercolor);
display: block;
padding: @ffe-spacing-xs 0;
padding: var(--ffe-spacing-xs) 0;

@media (min-width: @breakpoint-md) {
display: table-row;
}
}

&__heading {
.ffe-strong-text();
&__heading,
&__cell {
overflow-wrap: normal;
}

&__heading {
color: var(--ffe-v-table-heading-color);
text-align: left;

@media (min-width: @breakpoint-md) {
display: table-cell;
padding: @ffe-spacing-xs;
}
}

&__row,
&__cell {
&--collapsed {
line-height: 0;
padding: 0;
font-size: 0;
padding: var(--ffe-spacing-xs);
}
}

&__cell {
display: block;
padding: 0 @ffe-spacing-2xs;
padding: 0 var(--ffe-spacing-2xs);

&--top {
vertical-align: top;
}

@media (min-width: @breakpoint-md) {
display: table-cell;
padding: @ffe-spacing-sm @ffe-spacing-xs;
padding: var(--ffe-spacing-sm) var(--ffe-spacing-xs);
}
}

&__row,
&__cell {
&--collapsed {
line-height: 0;
padding: 0;
font-size: 0;
}
}

Expand All @@ -85,7 +93,7 @@
.ffe-table__heading,
.ffe-table__cell {
@media (min-width: @breakpoint-md) {
padding: @ffe-spacing-xs;
padding: var(--ffe-spacing-xs);
}
}
}
Expand All @@ -94,7 +102,7 @@
display: block;
max-width: none;
vertical-align: top;
margin-bottom: @ffe-spacing-sm;
margin-bottom: var(--ffe-spacing-sm);
color: var(--ffe-v-table-content-color);

&--text-right {
Expand Down

0 comments on commit 997c33b

Please sign in to comment.