mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-08 09:26:42 +00:00
5ea2d0c57b
Occured when the cell contained any block content with a differnt line height to the table cell itself. In firefox, cells with a height would end up with an actual greater real cell height, which messed up TinyMCE resize calculations, causing tables to grow. Adding default vertical-align: top, changes this behaviour to get proper cell heights. Related to Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=569645 Have tested that editor cell text align options can still be used with this. For #4337
75 lines
1.2 KiB
SCSS
75 lines
1.2 KiB
SCSS
table {
|
|
min-width: 100px;
|
|
max-width: 100%;
|
|
thead {
|
|
@include lightDark(background-color, #f8f8f8, #333);
|
|
font-weight: 500;
|
|
}
|
|
td, th {
|
|
min-width: 10px;
|
|
padding: 6px 8px;
|
|
border: 1px solid #DDD;
|
|
overflow: auto;
|
|
line-height: 1.2;
|
|
word-break: break-word;
|
|
vertical-align: top; // Workaround for: https://bugzilla.mozilla.org/show_bug.cgi?id=569645
|
|
}
|
|
td p, th p {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
table.table {
|
|
width: 100%;
|
|
tr td, tr th {
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
}
|
|
th, td {
|
|
text-align: start;
|
|
border: none;
|
|
padding: $-s $-s;
|
|
vertical-align: middle;
|
|
margin: 0;
|
|
overflow: visible;
|
|
}
|
|
th {
|
|
font-weight: bold;
|
|
}
|
|
tr:hover {
|
|
@include lightDark(background-color, #F2F2F2, #333);
|
|
}
|
|
.text-right {
|
|
text-align: end;
|
|
}
|
|
.text-center {
|
|
text-align: center;
|
|
}
|
|
td.actions {
|
|
overflow: visible;
|
|
}
|
|
a {
|
|
display: inline-block;
|
|
}
|
|
&.expand-to-padding {
|
|
margin-left: -$-s;
|
|
margin-right: -$-s;
|
|
width: calc(100% + (2*#{$-s}));
|
|
max-width: calc(100% + (2*#{$-s}));
|
|
}
|
|
}
|
|
|
|
table.no-style {
|
|
td {
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
table.list-table {
|
|
margin: 0 (-$-xs);
|
|
td {
|
|
border: 0;
|
|
vertical-align: middle;
|
|
padding: $-xs;
|
|
}
|
|
} |