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

Search input is wrongly styled in dark mode #17

Closed
shuding opened this issue Nov 12, 2020 · 2 comments
Closed

Search input is wrongly styled in dark mode #17

shuding opened this issue Nov 12, 2020 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@shuding
Copy link
Owner

shuding commented Nov 12, 2020

No description provided.

@shuding shuding added bug Something isn't working good first issue Good for newcomers labels Nov 12, 2020
@0xdhrv
Copy link

0xdhrv commented Dec 3, 2020

I tried some CSS fix using basic inspection of the nextra-theme-docs/style.css, and apparently it seems to work for both dark and light modes, however, I am not aware of the core colors used, so I used shades of gray.

Dark Mode
image

Light Mode
image

Code

[type='search'] {
    -webkit-appearance: textfield;
    /* 1 */
    outline-offset: -2px;
    background-color: #FFF;
    border-color: #969696;
    /* 2 */
}

.dark [type='search'] {
    -webkit-appearance: textfield;
    /* 1 */
    outline-offset: -2px;
    background-color: #000;
    border-color: #424242;
    /* 2 */
}

::placeholder {
    /* Chrome, Firefox, Opera, Safari 10.1+ */
    color: #969696 !important;
    opacity: 1;
    /* Firefox */
}

:-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    color: #969696 !important;
}

::-ms-input-placeholder {
    /* Microsoft Edge */
    color: #969696 !important;
}


.dark ::placeholder {
    /* Chrome, Firefox, Opera, Safari 10.1+ */
    color: #424242 !important;
    opacity: 1;
    /* Firefox */
}

.dark :-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    color: #424242 !important;
}

.dark ::-ms-input-placeholder {
    /* Microsoft Edge */
    color: #424242 !important;
}

@shuding
Copy link
Owner Author

shuding commented Dec 3, 2020

That looks great @0xdhrv! Maybe we can use Tailwind colors for them?

@shuding shuding closed this as completed Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants