regebro / hovercraft

Make dynamic impressive presentations from text files!
https://hovercraft.readthedocs.org
MIT License
1.48k stars 209 forks source link

Nested ressources inclusion #182

Open MaximeWeyl opened 5 years ago

MaximeWeyl commented 5 years ago

Hi !

I figured out, by reading the source, why my presentation was not working : I needed to include fonts within my presentation. I found in the source that css's url(..) is parsed by hovercraft, and the target is added to the build. But in my case, the url(..) was in a script that was imported using @import url(...);

The solution was simple : I stopped using @import and imported the css directly from my presentation.

I think the doc should mention the fact that files pointed by CSS's url(..) can be used if not nested. Or better : enhance hovercraft to include nested CSS's.

regebro commented 5 years ago

The handling of urls I'm doing sucks as it is, and I don't want to spend time polishing turds, maybe we could switch to tinycss2 or cssutils or something that actually parses css.