Replies: 1 comment 1 reply
-
You can create a custom utility for this: @utility no-scrollbar {
-ms-overflow-style: none; /* IE and Edge /
scrollbar-width: none; / Firefox */
/* Chrome, Safari, and Opera */
&::-webkit-scrollbar {
display: none;
}
} See docs here: https://tailwindcss.com/docs/adding-custom-styles#complex-utilities |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i propose adding a no-scrollbar utility class to Tailwind CSS to provide a simple, cross-browser solution for hiding scrollbars. This class would significantly streamline the process of managing visual scrollbar presence, enhancing design consistency and user interface refinement. By incorporating the following CSS, we can achieve this functionality:
CSS
`
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge /
scrollbar-width: none; / Firefox */
}
.no-scrollbar::-webkit-scrollbar {
display: none; /* Chrome, Safari, and Opera */
}
`
This utility would eliminate the need for custom CSS or inline styles, aligning with Tailwind's core philosophy of utility-first development and improving developer efficiency.
Beta Was this translation helpful? Give feedback.
All reactions