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

Add dark mode support for iOS #51

Closed
onderceylan opened this issue Oct 16, 2019 · 1 comment · Fixed by #55
Closed

Add dark mode support for iOS #51

onderceylan opened this issue Oct 16, 2019 · 1 comment · Fixed by #55
Assignees
Labels
feature request New feature or request released

Comments

@onderceylan
Copy link
Collaborator

onderceylan commented Oct 16, 2019

I just found out that we can actually use dark mode media attributes (prefers-color-scheme: dark) to differentiate splash screens on iOS 13, based on user preference. The same media attribute doesn't have any affect on icons, even though it's the same web element and same media attr.

Light mode (default):
<link rel="apple-touch-startup-image" href="light/apple-splash-2048-2732.jpeg" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">

Dark mode:
<link rel="apple-touch-startup-image" href="dark/apple-splash-2048-2732.jpeg" media="(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">

It has to be declared in that order, tags with no prefers-color-scheme media attr declared first and dark ones declared after.

@onderceylan onderceylan added the feature request New feature or request label Oct 16, 2019
onderceylan added a commit that referenced this issue Oct 24, 2019
Generate iOS splash screen meta with (prefers-color-scheme: dark) media attr  [default: false]

BREAKING CHANGE: generateImages method from the module API now returns HTMLMeta object with the
chunks of HTML content, instead of one big HTML string

fix #51
onderceylan added a commit that referenced this issue Oct 25, 2019
Generate iOS splash screen meta with (prefers-color-scheme: dark) media attr  [default: false]

BREAKING CHANGE: generateImages method from the module API now returns HTMLMeta object with the
chunks of HTML content, instead of one big HTML string

fix #51
onderceylan pushed a commit that referenced this issue Oct 25, 2019
# [2.0.0](v1.3.1...v2.0.0) (2019-10-25)

### Bug Fixes

* **browser:** added error handling for chrome-launcher ([c6ed23a](c6ed23a)), closes [#50](#50)
* **package:** suppressed security warning by changing pkg v strategy ([9987e39](9987e39)), closes [#53](#53)

### Features

* **file:** avoided saving a shell html file ([b96d545](b96d545)), closes [#52](#52)
* **icon:** added optional favicon generation ([699686a](699686a)), closes [#47](#47)
* **main:** added dark mode support for iOS ([f4aca1c](f4aca1c)), closes [#51](#51)
* **pptr:** switched over puppeteer-core to avoid chromium install ([05edb2e](05edb2e)), closes [#50](#50)
* **pwa:** added single quotes option for generated HTML tags ([351a3cc](351a3cc)), closes [#49](#49)

### BREAKING CHANGES

* **main:** generateImages method from the module API now returns HTMLMeta object with the
chunks of HTML content, instead of one big HTML string
@onderceylan
Copy link
Collaborator Author

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@onderceylan onderceylan self-assigned this Nov 10, 2019
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.

1 participant