05-17-2024 03:07 AM
Let's say that I have a document like this:
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<link rel="icon" href="/assets/images/icons/some-icon/white.svg" media="(prefers-color-scheme: dark)">
<link rel="icon" href="/assets/images/icons/some-icon/black.svg" media="(prefers-color-scheme: light)">
</head>
<body>
<h1>My title</h1>
<p>Look at the icon!</p>
</body>
</html>
Then regardless of whether or not the user is using dark, or light mode, the icon will
be black, even if that is not what is intended.
05-17-2024 07:25 AM
Does that same media query work for external style sheets?