Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: scrollbars now have transparent background and currentColor for…
…eground
- Loading branch information
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I preferred it before to be honest. It can look quite harsh with a black scrollbar.
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no.. please restore it or say how to override it
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scrollbar-color: unset;
}
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, it was gray as the OS color and it didn't feel good with the theme if the theme is not white or black.
Now it adapts the currentColor which is the text color of current element. It's better visually and also better for accessibility.
It's also now consistent among all devices. Previously you would see a different colors on each OS as it was the default OS scrollbar color.
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... @saadeghi, based on your white/black remark, would it be a reasonable suggestion for the light and dark themes, that they should retain the previous behavior? In any case, thanks @whitetown, will use that to reset it.
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the fact you added scroll bar support, but would appreciate the ability to change the color to a semantic value like primary, secondary, base-200, etc.
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add option to either style it with semantic values or configurable so we can opt out of this behavior.
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert to previous version.......
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where do we apply this code? Is it in config somewhere?
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in your global.css
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the color is too constrast and it kinda eye strain to look at. Can you at least use base-200 or base-300 for the background?
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Fixed scrollbar high contrast issue in
4.12.8
scrollbar color is now currentColor (default text color) with 35% transparency which is similar to OS default colors on light/dark themes.
f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is breaking/superseding
::-webkit-scrollbar
rules. Appropriateness of using that pseudo-element aside, a bit harsh to have the library break previously styled scrollbars without warning.f0ea341
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbran
::-webkit-scrollbar
is not standard CSS and never was. It shouldn't be used in production:https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar
scrollbar-color
is the standard CSS attribute for customizing scrollbars.scrollbar-color
was added to daisyUI in4.12
minor update, minor updates are for new features.Projects which were using
4.11
wouldn't get updated to4.12
automatically. It won't effect existing websites automatically unless you update daisyUI to the latest minor version manually.I would suggest using standard
scrollbar-color
instead of-webkit-scrollbar
.Also, you can simply disable daisyUI base styles from daisyUI config if you don't need them:
https://daisyui.com/docs/config/#base
Let me know if you have any questions