Skip to content

Commit 756b45c

Browse files
authored
User friendly table design (#755)
1 parent ae99836 commit 756b45c

File tree

1 file changed

+6
-24
lines changed
  • src/Elastic.Markdown/Assets/markdown

1 file changed

+6
-24
lines changed

src/Elastic.Markdown/Assets/markdown/table.css

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,24 @@
11
@layer components {
22
.table-wrapper {
33

4-
@apply max-w-full overflow-x-auto my-4;
4+
@apply max-w-full overflow-x-scroll my-4;
55

66
table {
7-
@apply w-full border-collapse;
7+
@apply w-full border-collapse border-1 border-grey-20;
88
}
99

1010
th, td {
11-
@apply py-2 px-4 min-w-30;
12-
}
13-
14-
th:first-of-type {
15-
border-top-left-radius: var(--radius-sm);
16-
}
17-
th:last-of-type {
18-
border-top-right-radius: var(--radius-sm);
19-
}
20-
tr:last-of-type td:first-of-type {
21-
border-bottom-left-radius: var(--radius-sm);
22-
}
23-
tr:last-of-type td:last-of-type {
24-
border-bottom-right-radius: var(--radius-sm);
11+
@apply py-2 px-4 min-w-30 not-first:border-l-1 border-grey-20;
2512
}
2613

2714
thead {
28-
@apply font-semibold text-sm text-left align-top;
15+
@apply font-sans font-semibold text-left align-top border-b-1 border-grey-20 bg-grey-10;
2916
}
3017

3118
tbody {
32-
33-
font-family: "Inter", sans-serif;
34-
19+
@apply align-top;
3520
tr {
36-
@apply not-last:border-b-1 border-grey-30 hover:bg-grey-10;
37-
/*&:nth-child(odd) {*/
38-
/* @apply bg-grey-10;*/
39-
/*}*/
21+
@apply not-last:border-b-1 border-grey-20 hover:bg-grey-10;
4022
}
4123
}
4224
}

0 commit comments

Comments
 (0)