Questions tagged «macos-darkmode»

3
如何使用JavaScript检测暗模式?
Windows和macOS现在具有暗模式。 对于CSS,我可以使用: @media (prefers-dark-interface) { color: white; background: black } 但是我正在使用Stripe Elements API,它在JavaScript中添加了颜色 例如: const stripeElementStyles = { base: { color: COLORS.darkGrey, fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`, fontSize: '18px', fontSmoothing: 'antialiased', …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.