add support for coloring using CSS variables#149
Open
McShelby wants to merge 1 commit intomdbootstrap:mainfrom
Open
add support for coloring using CSS variables#149McShelby wants to merge 1 commit intomdbootstrap:mainfrom
McShelby wants to merge 1 commit intomdbootstrap:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you very much for your contribution! Please make sure the followings
are checked.
npm testto make sure it formats and build successfullyThis PR adds support for coloring the scrollbar via CSS variables.
A demo is included within this PR in
examples/colors.htmlwhich was derived fromexamples/basic.html.I was in need to support a dark mode variant of my project but coloring of the scrollbars did not fit. Instead of redefining all the selectors to set the CSS color attributes within my project, I wanted a more robust solution.
This fixes #15, #102
Now colors are easily modifiable by CSS variables if the browser supports them. If the browser does not support CSS variables it defaults back to the old mechanism, making it compatible with at least IE11.
To set the colors simply add the following snippet to your project's CSS