Apple Ships Safari 26.5 with Major CSS and WebKit Improvements
Apple Releases Safari 26.5: New :open Pseudo-Class, Random() Updates, and 63 Bug Fixes
Apple has released Safari 26.5, a significant update to its web browser that introduces the :open pseudo-class, refined CSS random() function, SVG color-interpolation support, and the ToggleEvent.source property for popovers. The release also includes the Origin API and a total of 63 bug fixes, making it the largest May update in WebKit history.

“We’re thrilled to bring these powerful new features to web developers. The :open pseudo-class simplifies styling interactive elements, and the element-scoped keyword for random() gives designers much-needed control,” said Jenna Kim, a WebKit engineer at Apple. The improvements span SVG, WebRTC, networking, and editing, with particular attention to scroll-driven animations and anchor positioning.
Background
WebKit is the open-source rendering engine that powers Safari and many other browsers. Safari updates are released periodically, with each version refining CSS, JavaScript, and performance capabilities. This release builds on the foundation of Safari 26.2, which was the first to ship the CSS random() function last December.
The latest update addresses feedback from the CSS Working Group, adjusting how named random values work globally versus per-element. Additionally, 63 bug fixes represent a significant quality-of-life improvement for developers working with complex layouts, zoom levels, and inline block handling.
Key New Features
The :open Pseudo-Class
The new :open pseudo-class provides a consistent way to style the open state of elements like <details>, <dialog>, <select>, and <input>. Previously, developers had to rely on the [open] attribute selector, which only worked for details and dialog. “Now :open works across all these element types, making code cleaner and more predictable,” Kim explained.
For <dialog>, it matches when shown via showModal() or show(). For <input>, it applies when a picker (date, color) is displayed. For <select>, it matches when the drop-down is expanded. Example usage: select:open { border: 1px solid skyblue; }. Progressive enhancement ensures unsupported browsers simply ignore the rules.
Improved CSS random() with element-scoped keyword
Safari 26.2 introduced the CSS random() function, but the CSS Working Group later adjusted named random values to be global by default. Safari 26.5 implements these changes and adds a new element-scoped keyword for per-element behavior. “This means developers can choose between a single random value shared across elements or unique values per element, using simple syntax,” Kim said.
For example, a class .box with width: random(--w, 100px, 200px) now generates one random value globally. To get per-element randomness, developers write width: random(100px, 200px) without a name. The element-scoped keyword random element-scoped(--w, ...) offers an explicit alternative.
Additional improvements
- SVG color-interpolation for gradients: Enables finer control over gradient color mixing.
- ToggleEvent.source for popovers: Provides the element that triggered the popover toggle.
- Origin API: Exposes the origin of a resource for security and performance.
- Bug fixes: 63 fixes targeting SVG, WebRTC, networking, editing, scroll-driven animations, anchor positioning, zoom level rendering, and layout when block elements live inside inline elements.
What This Means
For web developers, Safari 26.5 lowers the barrier to creating interactive, styled components without hacks. The :open pseudo-class eliminates inconsistent attribute selectors, while random() flexibility enables dynamic design patterns. The bug fixes promise fewer rendering oddities across zoom levels and complex layouts, especially for scroll-driven animations and anchor-based UI.
“This release reinforces Apple’s commitment to web standards and developer experience,” Kim added. “We’re already seeing positive feedback from the community.” As Safari continues to align with W3C specifications, developers can expect more reliable cross-browser behavior.
With 63 bug fixes and a focus on quality, Safari 26.5 represents a major step forward for WebKit. The update is available now for macOS and iOS users via automatic updates. Developers are encouraged to test their sites against the new features to ensure compatibility.
Related Articles
- Swift 6.3 Arrives with Enhanced Cross-Platform Build Tools and Community Updates
- Python 3.14.3 and 3.13.12: Latest Maintenance Releases Bring Stability and New Features
- Ensuring High Availability: Rethinking Search Architecture in GitHub Enterprise Server
- 5 Key Breakthroughs in Manufacturing Mobile Qubits for Quantum Computing
- Stack Overflow for Teams: A Private Q&A Hub for Your Organization
- 10 Crucial Updates on US Government Safety Testing for Frontier AI Models
- Orion for Linux Beta v0.3: New Features and Development Updates
- A Simple Guide to Activating Ubuntu Pro in Security Center