Closed ColinFrick closed 1 year ago
Hey @ColinFrick thanks again for contributing :) Unfortunately if it is not compatible with the dark mode we cannot add it. Do you think this is something that can be done?
@bidoubiwa the inconsistencies result from the different types of applying the dark / light mode styling in docs-searchbar.js and the documentation CSS. docs-searchbar.js uses [data-ds-theme] to determine the theme, while the documentation page uses (prefers-color-scheme: dark) directly.
Hm, because we set the theme through the plugin, it should be possible to apply the corresponding theme on the plugin tag directly without waiting for docs-searchbar.js to be initialized.
@bidoubiwa I have changed the PR. This should cover any combination of prefers-color-scheme / enableDarkMode, and does not require any changes in the documentation repository.
docs-searchbar.js uses [data-ds-theme] to determine the theme, while the documentation page uses (prefers-color-scheme: dark) directly.
Do you think it is worth to change that in docs-searchbar.js ? As it is not exposed to the user.
Even if we change docs-searchbar.js we still would need it here. It really comes down to that split second between rendering the DOM (with Vue component) and wrapping the component with docs-searchbar.js
bors merge
bors r-
bors merge
Build succeeded:
Thanks again for contributing with Meilisearch :heart: If you are participating in Hacktoberfest, and you would like to receive a small gift from Meilisearch too, don't forget to fill this form.
Pull Request
Related issue
Fixes #263
What does this PR do?
This does require a change in meilisearch/documentation because this does not handle
@media (prefers-color-scheme: dark)
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!