We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link
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:
https://github.com/dohliam/dropin-minimal-css/blob/6cc6f0ba0cfb046ecf1a52125be53536b6f2f73f/switcher.js#L39C2-L40
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!
<link rel="stylesheet" href="" />
The text was updated successfully, but these errors were encountered:
I got into the same situation, with having the first link being a a print css with media=print.
media=print
Sorry, something went wrong.
No branches or pull requests
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:
https://github.com/dohliam/dropin-minimal-css/blob/6cc6f0ba0cfb046ecf1a52125be53536b6f2f73f/switcher.js#L39C2-L40
does...
My page looks like:
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!The text was updated successfully, but these errors were encountered: