New WebKit Features in Safari 12.1
With users’ ability to choose between light and dark color schemes, websites can start to look out of place, or worse, become a blinding and painful experience. To help websites better integrate with the dark appearance setting in macOS Mojave, WebKit provides the
supported-color-schemes
property andprefers-color-scheme
media query to allow a webpage to support light and dark color schemes.Web content authors can use the
@media(prefers-color-scheme: dark)
media query to provide dark mode styles that override a default light theme. Alternatively,@media(prefers-color-scheme: light)
can be used to provide light styles that override a default dark theme.[…]
The Payment Request API has been updated with granular errors, support for default addresses and contacts configured in Wallet and Apple Pay settings, and special field support for Japan. These changes now bring the Payment Request API to parity with the Apple Pay JS payment system, but with all of the benefits of web standards compatibility. Payment Request is now the recommended way to pay implement Apple Pay on the web.
[…]
The Web Share API adds
navigator.share()
, a promise-based API developers can use to invoke a native sharing dialog provided the host operating system. This allows users to share text, links, and other content to an arbitrary destination of their choice, such as apps or contacts.[…]
Another newly supported element in WebKit is the
<datalist>
element. The<datalist>
element contains a list of<option>
elements that provides suggested values for<input>
elements.
Previously: Dark Side of the Mac: Appearance & Materials.