added no-scrollbar utility (#3031)

* added no-scrollbar utility

* added responsive variants

* undo prettier on global.css
pull/3032/head
Peer Richelsen 2022-06-09 12:46:03 +02:00 committed by GitHub
parent a9e519f643
commit 0f0513b8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -28,7 +28,7 @@ const NavTabs: FC<NavTabProps> = ({ tabs, linkProps, ...props }) => {
return (
<>
<nav
className="-mb-px flex space-x-5 overflow-x-scroll rtl:space-x-reverse sm:rtl:space-x-reverse"
className="no-scrollbar -mb-px flex space-x-5 overflow-x-scroll rtl:space-x-reverse sm:rtl:space-x-reverse"
aria-label="Tabs"
{...props}>
{tabs.map((tab) => {

View File

@ -9,6 +9,25 @@
--brand-text-color-dark-mode: #292929;
}
/*
Adds Utility to hide scrollbar to tailwind
https://github.com/tailwindlabs/tailwindcss/discussions/2394
https://github.com/tailwindlabs/tailwindcss/pull/5732
*/
@layer utilities {
@variants responsive {
/* Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
}
/*
* Override the default tailwindcss-forms styling (default is: 'colors.blue.600')
* @see: https://github.com/tailwindlabs/tailwindcss-forms/issues/14#issuecomment-1005376006