mirror of
https://github.com/kognise/water.css.git
synced 2025-07-31 18:30:22 +02:00
feat: turn "prefers-color-scheme" into link to MDN
This commit is contained in:
@@ -40,13 +40,16 @@ const updateTheme = () => {
|
||||
table.fileSize.innerText = `${fileSizes[theme].toFixed(2)} kb`
|
||||
|
||||
if (theme === 'auto') {
|
||||
table.theme.innerHTML = 'Defaults to dark, but respects user-defined theme settings. Detected via <code>prefers-color-scheme</code>'
|
||||
table.theme.innerHTML = `
|
||||
Defaults to dark, but respects user-defined theme settings.<br>
|
||||
(detected via <a style="--links: var(--code)" href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme" target="_blank" rel="noopener"><code>prefers-color-scheme</code></a>)
|
||||
`
|
||||
table.browserSupport.innerHTML = `
|
||||
All current browsers
|
||||
(<a href="https://caniuse.com/#feat=css-variables" target="_blank" rel="noopener">support for CSS Custom Properties</a>)
|
||||
`
|
||||
} else {
|
||||
table.theme.innerText = `Theme is forced to ${theme}`
|
||||
table.theme.innerText = `Theme is forced to ${theme}.`
|
||||
table.browserSupport.innerText = 'All browsers (including Internet Explorer)'
|
||||
updateProductHunt(theme)
|
||||
}
|
||||
|
Reference in New Issue
Block a user