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

Add color-scheme CSS property #388

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Add color-scheme CSS property #388

merged 1 commit into from
Nov 2, 2021

Conversation

renbaoshuo
Copy link
Contributor

PR Checklist

  • The commit message follows guidelines for NexT.
  • Tests for the changes was maked (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs in NexT website have been added / updated (for features).

PR Type

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Documentation.
  • Translation.
  • Other... Please describe:

What is the current behavior?

What is the new behavior?

The operating system makes adjustments to the user interface when set a color-scheme value. For example, the scroll bar is adapted to the dark mode when ser color-scheme to dark.

References

https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme

@CLAassistant
Copy link

CLAassistant commented Oct 12, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the CSS label Oct 12, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1333106300

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.468%

Totals Coverage Status
Change from base Build 1320627970: 0.0%
Covered Lines: 138
Relevant Lines: 141

💛 - Coveralls

@stevenjoezhang
Copy link
Member

Thanks for your contribution! In February, we discussed about the solution provided in your blog in the telegram group chat of NexT. This issue is considered to be a design problem of the scroll bar on Windows (which does not exist on macOS).

截屏2021-10-12 下午9 08 10

Comment on lines +71 to +73
iframe {
color-scheme: light;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样应该没问题了

@stevenjoezhang stevenjoezhang added this to the 8.8.1 milestone Nov 2, 2021
@stevenjoezhang stevenjoezhang merged commit 0fc5f84 into next-theme:master Nov 2, 2021
@welcome
Copy link

welcome bot commented Nov 2, 2021

Congrats on merging your first pull request here! 🎉 How awesome!

@stevenjoezhang
Copy link
Member

@renbaoshuo Hello, the color-scheme property will not only affect the iframe, but also change the text color of the input box. Please help to fix this issue, thanks.
photo_2021-11-04 00 40 12

lingyf pushed a commit to lingyf/hexo-theme-next that referenced this pull request Jan 27, 2022
ljcbaby pushed a commit to ljcbaby/hexo-theme-next that referenced this pull request Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants