We’re excited to announce Adaptive Dark Mode in Safari 27.3 beta. When enabled by a user, Safari adapts light websites and presents them as dark.
In the spring of 2019, Safari 12.1 became the first browser to support dark mode on the web. A lot of people love using dark mode, but not every website has a dark version. Almost 40% of web page loads are from users in dark mode, and yet only 10% of page loads support it. If you love dark mode, you’ve probably hit a site that felt particularly bright. Adaptive Dark Mode is designed to close that gap, providing a consistent dark experience across the web.
You can try it today in Safari 27.3 beta. To enable, first make sure your system appearance is set to dark. Then browse to a website with a bright background. Safari will offer a preview of Adaptive Dark Mode. Tap ‘Try’.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要Starting with iOS, iPadOS, visionOS, and macOS 27, WebKit offers a new API for Global Privacy Control (GPC), an emerging web standard that lets users opt out of data sharing and cross-context targeted advertising, as recognized under the CCPA. Developers using WKWebView or SwiftUI's WebPage can enable it via the new globalPrivacyControlEnabled property on WKWebpagePreferences or the isGlobalPrivacyControlEnabled property on WebPage.NavigationPreferences, which activates navigator.globalPrivacyControl and the Sec-GPC: 1 header for the main frame, subframes, and subresources. Example code in Swift and Objective-C shows how to set these properties in the navigation-policy delegate based on a user preference.
AI 摘要Safari Technology Preview Release 257 is now available for macOS Golden Gate and macOS Tahoe, bringing a wide range of WebKit fixes for developers to test. The release includes numerous CSS layout and rendering corrections (covering flexbox, grid, tables, text-box-trim, and line clamping), along with fixes for animations, canvas drawing, form controls including new support for rendering `` as a dropdown and preview support for an enhanced `` element. Additional improvements address JavaScript error handling, media playback issues such as ogg audio and video seeking, and editing behavior like text re-wrapping.
AI 摘要Safari on visionOS 27.3 introduces a limited developer preview of the proposed spatial CSS API, which brings spatial and 3D web capabilities to web authors through declarative CSS rather than JavaScript. The preview includes features such as spatial:portal transforms, position-anchor for snapping models together, @environment-map for managing lighting, portal-action:orbit for rotating scenes, and requestVolumetricScene() to present content outside the browser window. WebKit is seeking developer feedback on these features while emphasizing that spatial content should work across all devices, not just headsets.
AI 摘要Safari is now available on Apple HomeView, a new square, 7-inch smart display that users interact with by voice or touch, and since it runs on WebKit, most websites should already work without changes. Developers can enhance the experience by adding schema.org Recipe markup in JSON-LD to enable a step-by-step cooking view and including WebVTT captions in track elements for video. They should also avoid fragile assumptions like user agent sniffing or fixed viewport expectations, instead using semantic HTML, feature detection, and flexible, accessible layouts to handle HomeView's short, square screen.
AI 摘要Safari Technology Preview Release 256 is now available for macOS Golden Gate and macOS Tahoe, containing WebKit changes between revisions 323398@main and 324653@main. The release introduces new CSS features such as font-palette-mix(), text-combine-upright on ::marker, and continue: collapse with line-clamp, along with new canvas text drawing style options and object-fit support for SVG documents. It also resolves numerous accessibility, animation, CSS, forms, HTML, images, and JavaScript bugs, including performance improvements for scroll-driven animations and removal of deprecated body margin attributes.