forked from bairagi22/Cosmofeed-Frontend-Assignment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
41 lines (41 loc) · 1.52 KB
/
tailwind.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}",],
theme: {
extend: {},
},
plugins: [
// Custom plugin to add utilities for hiding scrollbars and making custom scrollbar
function name ( { addUtilities } ) {
const newUtilities = {
// Hides scrollbars in WebKit browsers (Chrome, Safari, etc.)
'.scrollbar-hidden::-webkit-scrollbar': {
display: 'none',
},
'.scrollbar-hidden': {
'-ms-overflow-style': 'none', // For Internet Explorer and Edge
'scrollbar-width': 'none' // For Firefox and Chrome
},
// Custom scrollbar
'.custom-scrollbar::-webkit-scrollbar': {
width: '8px', // Width of the scrollbar
},
'.custom-scrollbar::-webkit-scrollbar-track': {
background: '#f1f1f1', // Background of the scrollbar track
},
'.custom-scrollbar::-webkit-scrollbar-thumb': {
background: '#888', // Color of the scrollbar thumb
borderRadius: '10px', // Rounded corners for the thumb
},
'.custom-scrollbar::-webkit-scrollbar-thumb:hover': {
background: '#555', // Color of the thumb on hover
},
'.custom-scrollbar': {
'-ms-overflow-style': 'auto', // For Internet Explorer and Edge
'scrollbar-width': 'thin', // For Firefox
},
};
addUtilities( newUtilities ); // Adds the new utilities to Tailwind's configuration
}
],
};