Today we are pleased to share what new’s in WebKit for Safari 16.5.
After the massive, web-developer-feature-packed release of Safari 16.4, this version focuses predominately on polishing existing features and fixing bugs. Safari 16.5 does contain a handful of new features including CSS Nesting,
:user-invalid, support for pre-orders and deferred payments with Apple Pay, and an update to Lockdown Mode.
Safari 16.5 includes support for CSS Nesting. A long-time favorite feature of pre-processors, nesting allows web developers to write code like this:
Learn all about CSS Nesting — including the current limitation that prevents the use of an element selector (like
article) without including a symbol (like
&) before the element — in Try out CSS Nesting today.
The CSS Working Group is currently working on a very promising idea for removing the requirement that every nested selector begin with a symbol. Hopefully sometime in the future, that limitation will no longer exist.
CSS user valid and invalid pseudo-classes
:invalid could be used to target an
input field or other form field based on whether it is in a valid or invalid state. But there’s been one problem — as soon as a user starts typing, the content is evaluated and declared invalid if it doesn’t match. For example, an email address is marked
:invalid as the first half is typed, before the
:user-valid pseudo-classes are much smarter about when they are triggered, removing the need for JS. Compare
:user-invalid in a browser with support to see the difference.
These new pseudo-classes are especially helpful when combined with
:has() to provide powerful tools for styling anything on the page, like the label of a form field.
Apple Pay on the web now supports pre-orders and deferred payments.
Lockdown mode is an optional, extreme protection that’s designed for the very few individuals who, because of who they are or what they do, might be personally targeted by some of the most sophisticated digital threats. Most people are never targeted by attacks of this nature.
WebKit for Safari 16.5 provides multiple bug fixes and feature polish.
- Fixed Scroll to Text Fragment sometimes scrolling to the top after reloading the page.
- Fixed support for
xresolution unit in
- Fixed reflecting trimmed
inline-endmargins for grid or flex items in computed styles.
- Fixed the top offset of self collapsing children at the end of a block container with
- Fixed triggering layout when changing
- Fixed increasing
column-countabove 2 not updating the layout.
- Fixed CSS custom properties not applying to an SVG
useelement’s shadow tree.
- Fixed new CSS property unexpectedly dropped from an empty CSS rule when tabbing through or editing a selector.
-webkit-image-set()an alias of
Editing & Forms
- Fixed hairline on the selection of bidi text.
- Fixed photo library picker showing videos for
- Updated digital display in
Intl.DurationFormatto match spec changes.
- Fixed text wrapping for bidi text when line-breaking.
- Fixed non-audible AudioContext preventing the audio session to change from play-and-record after stopping capture.
- Fixed handling video streams containing a
CodecDelayvalue that caused an audible pop at the beginning of video playback.
- Fixed video freezing in a video conference when removing AirPods Pro during the call.
- Fixed snapping to the last snap position when performing layout when scroll snapping occurs with a physical mouse wheel.
- Fixed pinch-to-zoom when toggling on and off scroll snapping.
- Fixed scroll snapping jumping to the previous page when swiping to the next page.
- Fixed scroll snapping to work with a physical scroll wheel on a mouse.
- Fixed form controls rendering.
- Fixed visual updates for
position: absoluteis set.
- Fixed an unexpected visible first frame of a
!importantstyle overrides the animated value.
- Fixed filling metadata headers for preflight requests.
- Fixed OffscreenCanvas WebGL to fire the context lost event.
getFileHandle()to return a TypeMismatchError on unexpected entry type.
- Fixed “Untitled” label on the back to previous app button when opening a web app via a link.
- Fixed WASM SIMD breaking WebP decoding applications.
- Added initial support for
- Fixed element
::backdroprules showing up without a backdrop.
- Fixed “Selected element” console entry filling an entire row.
- Fixed an issue causing the mini console to always opens when choosing “Inspect Element”, even if it was previously closed.
We love hearing from you. Send a tweet to @webkit to share your thoughts on Safari 16.5. Find us on Mastodon at @email@example.com and @firstname.lastname@example.org. If you run into any issues, we welcome your feedback on Safari UI, or your WebKit bug report about web technologies or Web Inspector. Filing issues really does make a difference.
Updating to Safari 16.5
Safari 16.5 is available for macOS Ventura, macOS Monterey, macOS Big Sur, iPadOS 16, and iOS 16. Update to Safari 16.5 on macOS Monterey or macOS Big Sur by going to System Preferences → Software Update → More info, and choosing to update Safari. Or update on macOS Ventura, iOS or iPadOS, by going to Settings → General → Software Update.