Skip to content
New issue

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

[BUG] Custom CSS styles not activating until 'type="text/css"' is added to corresponding link in HTML head #560

Closed
4 tasks done
shimizurei opened this issue Mar 14, 2022 · 5 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@shimizurei
Copy link

Environment

Self-Hosted (Docker)

Version

2.0.4

Describe the problem

I had finally gotten the CSS to not throw a 404, but for the life of me I could not get my styles to show up.

UNTIL I changed one thing (using devtools):

How the custom CSS loads in: <link rel="stylesheet" href="/assets/dashycsstweaks.css">

What I needed to do to activate my CSS: <link rel="stylesheet" type="text/css" href="/assets/dashycsstweaks.css">

I was previously upping the CSS specificity to disgusting levels to no avail:

div#dashy div.home[style*="background: url("/assets/wetpavement_bg.jpg") 0% 0% / cover"] {
  background-attachment: fixed !important;
}

Would it be possible to add the type="text/css" part to the generated link when the app is built?

Additional info

No response

Please tick the boxes

@shimizurei shimizurei added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Mar 14, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Mar 14, 2022

Yes, absolutely I can add that
Quick question, how are you specifying the stylesheet in your config?

@shimizurei
Copy link
Author

Docker compose, under volumes: - /volume1/docker/dashy/assets/dashycsstweaks.css:/app/public/assets/dashycsstweaks.css

In conf.yml: externalStyleSheet: ['/assets/dashycsstweaks.css'] (under appConfig).

Every time I've tried to use externalStyleSheet: '/assets/dashycsstweaks.css', an error message shows up in the online edit part saying that externalStyleSheet should be an array, despite the documentation saying that is an ok way to reference.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Mar 14, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Mar 14, 2022

Thanks, that's helpful - I'd totally forgotten ever building that bit 🤣
I'll get a fix pushed out as part of #557 :)

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Mar 14, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Mar 28, 2022

Merged in #557 :)

@changbowen
Copy link

changbowen commented Dec 4, 2022

@Lissy93
This seems to break Google fonts loaded via externalStyleSheet?
Actually change anything in that <link> tag will apply the font.. Not sure why it won't work initially..

google font issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
None yet
Development

No branches or pull requests

4 participants