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

Emulate dark mode in screen capture of html files #227

Closed
jasonhibbs opened this issue Apr 11, 2020 · 2 comments · Fixed by #230
Closed

Emulate dark mode in screen capture of html files #227

jasonhibbs opened this issue Apr 11, 2020 · 2 comments · Fixed by #230
Assignees
Labels
feature request New feature or request released

Comments

@jasonhibbs
Copy link

jasonhibbs commented Apr 11, 2020

Is your feature request related to a problem? Please describe.
I’m generating screens from an index.html and was hoping to use @media (prefers-color-scheme: dark) to make dark mode easy.

Describe the solution you'd like
I’d like --dark-mode to emulate this media feature during the screen capture process.

Describe alternatives you've considered
I guess I have to make my <html> element transparent and add use the --background flag instead.
I’ll have to update the <html> background colour for each mode because --background only applies to image sources.

Additional context

I believe this is possible using something like: emulateMediaFeatures([{name: 'prefers-color-scheme', value: 'dark' }]) found in this repo.

@jasonhibbs jasonhibbs added the feature request New feature or request label Apr 11, 2020
@onderceylan
Copy link
Collaborator

@jasonhibbs thanks for using the lib and giving this feedback. It makes a lot of sense, I wonder how I missed that. Thanks! I will look into it soon.

@onderceylan onderceylan self-assigned this Apr 12, 2020
onderceylan added a commit that referenced this issue Apr 13, 2020
Added support for prefers-color-scheme: dark media query for html inputs.

fix #227
onderceylan added a commit that referenced this issue Apr 14, 2020
Added support for prefers-color-scheme: dark media query for html inputs.

fix #227
onderceylan added a commit that referenced this issue May 13, 2020
Added support for prefers-color-scheme: dark media query for html inputs.

fix #227
onderceylan added a commit that referenced this issue May 14, 2020
Added support for prefers-color-scheme: dark media query for html inputs.

fix #227
onderceylan added a commit that referenced this issue May 15, 2020
Added support for prefers-color-scheme: dark media query for html inputs.

fix #227
onderceylan pushed a commit that referenced this issue May 15, 2020
# [3.0.0](v2.3.0...v3.0.0) (2020-05-15)

### Bug Fixes

* **cli:** fixed conflicting -h option ([3d4f04c](3d4f04c)), closes [#263](#263)

### Features

* **main:** added dark mode media query support for html inputs ([c5d2e0d](c5d2e0d)), closes [#227](#227)
* **main:** added stricter chrome launch args set ([bdfbef4](bdfbef4)), closes [#229](#229)
* **main:** exported appleDeviceSpecsForLaunchImages from module API ([dac56d4](dac56d4)), closes [#248](#248)
* **main:** switched to JPG as default output type ([bb5cfec](bb5cfec)), closes [#278](#278)
* **meta:** added xhtml option to introduce self-closing meta tags ([0dea81a](0dea81a)), closes [#192](#192)
* **node:** drop node 8 support due to its EOL ([030569b](030569b)), closes [#231](#231)

### BREAKING CHANGES

* **main:** Due to the large carbon footprint that PNG assets create, switched over using JPG
output with compression by default.
* **cli:** -h path override usage is dropped. It's replaced with -v shorthand.
* **node:** Users with node v8 will not be actively supported.
@onderceylan
Copy link
Collaborator

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants