diff options
author | Jhaura Wachsman <jw@jhaurawachsman.com> | 2020-07-13 03:51:22 +0300 |
---|---|---|
committer | Jhaura Wachsman <jw@jhaurawachsman.com> | 2020-07-13 03:51:22 +0300 |
commit | f93fbe3b450ad331ca654eefb392b43f29e736f0 (patch) | |
tree | 2c1b312886cacfae3f5d169daedf6f786191be54 | |
parent | c006443e4d72994648c8c2189e1a97b8acd9d784 (diff) |
Add CSS for responsive tables
-rw-r--r-- | src/cdata.css | 8 | ||||
-rw-r--r-- | src/tools.css | 10 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/cdata.css b/src/cdata.css index 4cab8b5..4f3244b 100644 --- a/src/cdata.css +++ b/src/cdata.css @@ -102,6 +102,8 @@ & .link:visited, & > table a:link, & > table a:visited, + & > .table-responsive > table a:link, + & > .table-responsive > table a:visited, & > .footnotes a:link, & > .footnotes a:visited { color: #007bff; @@ -116,6 +118,7 @@ & > figure figcaption a:hover, & .link:hover, & > table a:hover, + & > .table-responsive > table a:hover, & > .footnotes a:hover { @apply underline; color: #0056b3; @@ -174,8 +177,9 @@ } /* <table> */ - & > table { - @apply w-full border-collapse; + & > table, + & > .table-responsive > table { + @apply w-full max-w-full; & th { @apply font-semibold; diff --git a/src/tools.css b/src/tools.css index 961ad56..efe75f8 100644 --- a/src/tools.css +++ b/src/tools.css @@ -10,3 +10,13 @@ content: ""; background-color: rgba(0,0,0,0); } + +.table-responsive { + @apply block w-full overflow-x-auto scrolling-touch; + + -ms-overflow-style: -ms-autohiding-scrollbar; + scrollbar-width: none; + &::-webkit-scrollbar { + @apply hidden; + } +} |