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
Add an option for custom CSS #228
Comments
We might as well expose the whole |
@kevva 👎 Then the user is free to change and break anything and will complain to us when it breaks what we do. I'd rather have defined and controlled ways to do this. |
That's the downside of the flexibility that'd give, yeah. I'll add an option for this then. |
How should the API look like for this feature? Would it accept raw css, or a file? const pageres = new Pageres({delay: 2})
.src('yeoman.io', ['480x320', '1024x768', 'iphone 5s'], {crop: true})
.css('custom.css')
.dest(__dirname)
.run()
.then(() => console.log('done')); const pageres = new Pageres({delay: 2})
.src('yeoman.io', ['480x320', '1024x768', 'iphone 5s'], {crop: true})
.css('body { display: none }')
.dest(__dirname)
.run()
.then(() => console.log('done')); |
FWIW, the raw css options would be suficient for my personal intended use. |
Actually, it would be pretty easy to check if the argument provided is a file or not so we can support both. I can imagine that if you really want to add a lot of custom css stuff, you would rather prefer a separate file instead of embedding the css. |
I really appreciate the effort guys. Thanks a lot ! |
It would be great to have an option to allow custom CSS to be applied on the webpage by phantomJS before rendering the screenshot. Do you plan to add this feature in the future ?
Thx
The text was updated successfully, but these errors were encountered: