-
Notifications
You must be signed in to change notification settings - Fork 0
Can't implement dark mode & border radius #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Didn't know we can use border radius there. |
thanks. also, the background color isn't working if u can compare both the screenshots. fwiw, i want the 2nd one to look exactly like the 1st one :) |
What is your For background color, change the property inside colors
|
no, that's different. my theme: {
extend: {
colors: {
'primary-lighter': 'hsl(0, 0.0%, 15.0%)',
'primary-light': 'hsl(0, 0.0%, 12.0%)',
primary: 'hsl(0, 0.0%, 9.0%)',
'primary-dark': 'hsl(0, 0.0%, 6.0%)',
'primary-darker': 'hsl(0, 0.0%, 3.0%)',
scrollbar: 'hsla(0, 0%, 100%, 0.1)',
syntaxBg: 'hsl(0, 0.0%, 12%)',
},
}
} you are little wrong about that 2nd part. i thought i must use scrollbar: (theme) => ({
DEFAULT: {
size: theme('spacing.3'),
borderRadius: theme('borderRadius.md'),
colors: {
track: theme('colors.gray.200'),
thumb: theme('colors.gray.500'),
thumbHover: theme('colors.gray.400'),
},
},
dark: {
size: theme('spacing.3'),
borderRadius: theme('borderRadius.md'),
colors: {
track: theme('colors.scrollbar'),
thumb: theme('colors.gray.300'),
thumbHover: theme('colors.gray.400'),
},
},
}), this worked.
this is how it should look (this is my this is how it looks: i've kept |
if you also check my |
Yes, the dark mode can't be used like that. if P.s hsla(0, 0%, 100%, 0.1) appears very transparent to me, I changed it in the tailwind play to be more clear.So, background color should be working with colors.track, colors.thumb, colors.thumbHover |
this looks unnecessary. why not make it work like your other plugin? my imaginary api mentioned above would be perfect so if you can make it work like that, then it'd be awesome. i don't like
if i'm using
oh yes, it will work after dark mode support :) |
so that DEFAULT can have light and dark colors without the need for extra class.
green setting will be available under .scrollbar-green I just don't think or maybe with darkColors property
or maybe with array
Sorry, I accidentally pressed the shortcut to close the issue |
My requirement is that the plugin should work without the need to add class in the DOM at all. I don't know if it will work great. I'll be in home in another 1 hour. |
oh yeah, now it makes sense but adam wathan (creator of tailwind) did say once that supporting multiple themes is overengineering. and i agree with the sentiment as i coded a very small app with multiple themes & safe to say the experience was horrendous.
oh yes, i guess it's the right approach. i like the object approach |
Released in v2.0.0 This is a breaking change for people who use custom config.
I had to swap the config and put track, thumb, hover at the outer most to let more css in the config without me specifying every supported attributes. Now the code doesn't even have borderRadius, just put borderRadius there and it will be merged into the css. And it also mean, it also supports border, shadow, margin, padding, etc. |
thanks, it worked. lmk when you release it without |
Released v2.0.2 as @latest.
Support for scrollbar classes is coming next week. |
I want my scrollbar to look like this:
the code for the above is:
but instead when i used this plugin, it looks like:
notice, the thumb is square & there is no background color.
the code looks like:
what am i doing wrong?
i have just commented my
scrollbar.css
file so mybg-scrollbar
variable is still present but it isn't giving me the same output.would love to use this plugin :)
The text was updated successfully, but these errors were encountered: