Skip to content

Commit

Permalink
Hiding scrollbar for spacecards. Implemented as a Utility in tailwind…
Browse files Browse the repository at this point in the history
….config.cjs that is used in const LocationCards in index.tsx
  • Loading branch information
henry-rong committed Sep 26, 2024
1 parent 6ae05e2 commit 6de4a1d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/forge/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ const LocationCards = () => {

return (
<>
<div className="snap-y snap-mandatory h-screen overflow-y-scroll" ref={ref}>
<div className="snap-y snap-mandatory h-screen overflow-y-scroll hide-scrollbar sm:overflow-y-scroll" ref={ref}>
<div>
{mainspaceCards}
{heartspaceCards}
Expand Down
20 changes: 19 additions & 1 deletion apps/forge/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
module.exports = require('@ignis/ui/tailwind.config');
const baseConfig = require('@ignis/ui/tailwind.config');

module.exports = {
...baseConfig,
plugins: [
...(baseConfig.plugins || []),
function ({ addUtilities }) {
addUtilities({
'.hide-scrollbar': {
'-ms-overflow-style': 'none', // For IE and Edge
'scrollbar-width': 'none', // For Firefox
},
'.hide-scrollbar::-webkit-scrollbar': {
display: 'none', // For Chrome, Safari, and newer Edge
},
});
},
],
};

0 comments on commit 6de4a1d

Please sign in to comment.