Skip to content
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

Using html element with dark mode #40

Open
Nick390 opened this issue Oct 14, 2020 · 3 comments
Open

Using html element with dark mode #40

Nick390 opened this issue Oct 14, 2020 · 3 comments

Comments

@Nick390
Copy link

Nick390 commented Oct 14, 2020

I tried to use the script and it worked with me on all class but Bootstrap is known to be having effect like :focus and :hover
so if you use

[data-theme="dark"] a.bg-light:focus, a.bg-light:hover, button.bg-light:focus, button.bg-light:hover {
    background-color: #6c757d!important;
}

And you switched between the dark mode and the normal mode, you will find that the dark mode applies these changes and cannot be changed completely until you remove !important from background-color as example and when you do, you are not able to implement these changes at all

My question is, Is there a solution to this problem?

And I thank you with all my heart for your wonderful effort

@Nick390
Copy link
Author

Nick390 commented Oct 26, 2020

It seems that my luck not good to find someone will answer me

@ardianta
Copy link

I think the CSS code should like this:

[data-theme="dark"] a.bg-light:focus, 
[data-theme="dark"] a.bg-light:hover,
[data-theme="dark"] button.bg-light:focus,
[data-theme="dark"] button.bg-light:hover {
    background-color: #6c757d!important;
}

or if you use SASS:

[data-theme="dark"] { 
    a.bg-light:focus, 
    a.bg-light:hover, 
    button.bg-light:focus, 
    button.bg-light:hover {
       background-color: #6c757d!important;
   }
}

@Nick390
Copy link
Author

Nick390 commented Jan 17, 2021

I think the CSS code should like this:

[data-theme="dark"] a.bg-light:focus, 
[data-theme="dark"] a.bg-light:hover,
[data-theme="dark"] button.bg-light:focus,
[data-theme="dark"] button.bg-light:hover {
    background-color: #6c757d!important;
}

or if you use SASS:

[data-theme="dark"] { 
    a.bg-light:focus, 
    a.bg-light:hover, 
    button.bg-light:focus, 
    button.bg-light:hover {
       background-color: #6c757d!important;
   }
}

Thanks I will try it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants