Skip to content

Commit bd2c868

Browse files
committed
Make empty cells have height via CSS
So we do not have to add something like &nbsp; in the output. Signed-off-by: Jack Cherng <[email protected]>
1 parent 3ae6da1 commit bd2c868

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

example/diff-table.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
padding: 1px 2px;
2626
background: #fff;
2727
}
28+
.diff-wrapper.diff td:empty:after,
29+
.diff-wrapper.diff th:empty:after {
30+
content: " ";
31+
visibility: hidden;
32+
}
2833
.diff-wrapper.diff td a,
2934
.diff-wrapper.diff th a {
3035
color: #000;

example/diff-table.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
padding: 1px 2px;
5353
background: $bg-color;
5454

55+
// make empty cell has height
56+
&:empty:after {
57+
content: ' ';
58+
visibility: hidden;
59+
}
60+
5561
a {
5662
color: #000;
5763
cursor: inherit;

0 commit comments

Comments
 (0)