Skip to content

Commit f93fbe3

Browse files
committed
Add CSS for responsive tables
1 parent c006443 commit f93fbe3

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Diff for: src/cdata.css

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
& .link:visited,
103103
& > table a:link,
104104
& > table a:visited,
105+
& > .table-responsive > table a:link,
106+
& > .table-responsive > table a:visited,
105107
& > .footnotes a:link,
106108
& > .footnotes a:visited {
107109
color: #007bff;
@@ -116,6 +118,7 @@
116118
& > figure figcaption a:hover,
117119
& .link:hover,
118120
& > table a:hover,
121+
& > .table-responsive > table a:hover,
119122
& > .footnotes a:hover {
120123
@apply underline;
121124
color: #0056b3;
@@ -174,8 +177,9 @@
174177
}
175178

176179
/* <table> */
177-
& > table {
178-
@apply w-full border-collapse;
180+
& > table,
181+
& > .table-responsive > table {
182+
@apply w-full max-w-full;
179183

180184
& th {
181185
@apply font-semibold;

Diff for: src/tools.css

+10
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@
1010
content: "";
1111
background-color: rgba(0,0,0,0);
1212
}
13+
14+
.table-responsive {
15+
@apply block w-full overflow-x-auto scrolling-touch;
16+
17+
-ms-overflow-style: -ms-autohiding-scrollbar;
18+
scrollbar-width: none;
19+
&::-webkit-scrollbar {
20+
@apply hidden;
21+
}
22+
}

0 commit comments

Comments
 (0)