From f93fbe3b450ad331ca654eefb392b43f29e736f0 Mon Sep 17 00:00:00 2001 From: Jhaura Wachsman Date: Mon, 13 Jul 2020 00:51:22 +0000 Subject: Add CSS for responsive tables --- src/cdata.css | 8 ++++++-- 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 { - @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; + } +} -- cgit v1.2.3