Closed SamVerschueren closed 8 years ago
Oh, great! I was working in this some time ago and I was using https://github.com/sindresorhus/file-url
for files and used that in the href
.
Should screenshot-stream support a css file as well then?
Sure.
Added support for a css file but it's not working. Commented out the test. Anyone has an idea? Doesn't phantom support loading local files? Should I read the content of the file and just add it in the style tag?
Didn't seem to work with a local file in phantomjs. So now I read the file and inject the content in the page.
Fixed description and merge conflict.
Will do a PR in pageres
if this one lands to add a css
method.
ping @kevva @sindresorhus :)
Added support for a
css
option and it seems to work well. Feedback is more then welcome.I am not sure if
pageres
should support a css file, but I think it would be a nice addition. Shouldscreenshot-stream
support a css file as well then? Or shouldpageres
detect if it's a file, read the css file and pass the content of that file directly toscreenshot-stream
?// @sindresorhus