mirror of
https://github.com/kognise/water.css.git
synced 2025-12-08 07:45:02 +01:00
feat: remove misleading note about browser support
This commit is contained in:
parent
919e2974a2
commit
4af11172f1
2 changed files with 3 additions and 14 deletions
|
|
@ -168,11 +168,6 @@
|
||||||
<th scope="row">Theme</th>
|
<th scope="row">Theme</th>
|
||||||
<td id="table-theme"></td>
|
<td id="table-theme"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Browser support</th>
|
|
||||||
<td id="table-browser-support"></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@ const linkSnippets = [].slice.call(document.querySelectorAll('#link-snippet-cont
|
||||||
const table = {
|
const table = {
|
||||||
fileName: document.getElementById('table-file-name'),
|
fileName: document.getElementById('table-file-name'),
|
||||||
fileSize: document.getElementById('table-file-size'),
|
fileSize: document.getElementById('table-file-size'),
|
||||||
theme: document.getElementById('table-theme'),
|
theme: document.getElementById('table-theme')
|
||||||
browserSupport: document.getElementById('table-browser-support')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const prefersColorScheme = window.matchMedia('(prefers-color-scheme: light)')
|
const prefersColorScheme = window.matchMedia('(prefers-color-scheme: light)')
|
||||||
|
|
@ -49,16 +48,11 @@ const updateTheme = () => {
|
||||||
|
|
||||||
if (theme === 'auto') {
|
if (theme === 'auto') {
|
||||||
table.theme.innerHTML = `
|
table.theme.innerHTML = `
|
||||||
Defaults to light, but respects user-defined theme settings.<br>
|
Respects user-defined theme settings using <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>.<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>)
|
Light in browsers where the theme settings can't be detected.
|
||||||
`
|
|
||||||
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 {
|
} 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)'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue