-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Hello!
I spent a few minutes debugging why the CSS dropin wasn't working for me. After reading the code, I understood what went wrong a little better:
does...
function add_switcher() {
css_link = document.getElementsByTagName("link")[0];
if (css_link == undefined) {
...My page looks like:
...
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello, World!</title>
<meta name="description" content="Home page">
<link rel="icon" type="image/svg+xml" href="https://dohliam.github.io/dropin-minimal-css/min/a11yana.min.css">
<style></style>
</head>
...Namely, the first link element is a favicon, not a CSS stylesheet!
In my case, it would be better to follow the logic for if the link was undefined.
I was able to mitigate this with <link rel="stylesheet" href="" /> at the top of my head to get by!
ivoba
Metadata
Metadata
Assignees
Labels
No labels