:open pseudo-class, CSS random() improvements, SVG gradient color interpolation, ToggleEvent.source, Origin API, and 63 bug fixes — everything you need to know about the biggest May release of WebKit yet.
On May 11, 2026, Apple released Safari 26.5, the latest version of its flagship browser. While not a revolutionary release, Safari 26.5 brings meaningful improvements to CSS authoring, web APIs, and overall browser quality that every web developer should know about.
The headline features include the :open pseudo-class for styling interactive
element states, CSS random() enhancements with global named
values and a new element-scoped keyword, color-interpolation
support for SVG gradients, the ToggleEvent.source property for the Popover API,
and the new Origin API for structured origin comparisons. But the real story
is the sheer volume of fixes — 63 bug fixes make this the most
quality-focused May release in WebKit's history.
Let's dive into each feature with practical code examples and real-world context.
Unified styling for open <details>, <dialog>, <select>, and <input> elements. Replaces the limited [open] attribute selector.
Global named values by default, new element-scoped keyword for per-element randomness. Removed deprecated element-shared.
New property for controlling color interpolation in SVG gradients, including linearRGB color space support.
Identifies which element triggered popover toggling. Simplifies complex popover interactions and event handling.
Structured API for origin-based operations — scheme, host, and port access without manual URL parsing.
Scroll-driven animations, Anchor Positioning, CSS Grid, SVG, WebRTC, zoom rendering, and more receive significant fixes.
The :open pseudo-class is the most immediately useful CSS feature in Safari 26.5.
It provides a single, consistent way to style the open state of several interactive elements
that previously had inconsistent styling support.
Previously, the only way to style an open <details> or
<dialog> was the [open] attribute selector. This worked
for those two elements, but had no effect on <select> dropdowns or
<input> pickers (date pickers, color pickers, etc.).
With :open, you write one selector that works across all four element types:
For <dialog>, :open matches whether the dialog was opened
with showModal() or show(). For <input>, it
applies when an associated picker is displayed — date pickers, color pickers, and similar
native controls.
This is a clean progressive enhancement: browsers that don't support :open
simply ignore the rules, and the elements function normally. No polyfill required.
Safari was the first browser to ship CSS random() in version 26.2
(December 2025). Since then, the CSS Working Group refined the specification, and Safari 26.5
implements the changes including the new element-scoped keyword.
Without a named value, random() generates a fresh number every time it's
evaluated. This gives each element a unique value:
Using a custom property identifier as the first argument creates a named random value. In Safari 26.5, these names are globally scoped — all instances of the same name share one random result across the entire document.
The change from Safari 26.2 (where named values were per-element) to Safari 26.5 (global
by default) means that previously authored CSS using named random() will
behave differently. This is a spec-level change, and Safari 26.5 aligns
with the updated specification.
The new element-scoped keyword restores per-element behavior when you need
it. The deprecated element-shared keyword has been removed.
As a practical showcase, imagine generating a colorful set of cards where each card gets a random background, but you want the title text and border to match consistently:
Safari 26.5 adds support for the color-interpolation property in SVG gradient
contexts. This property controls how colors are interpolated between gradient stops,
supporting both auto (default) and linearRGB values.
The linearRGB value uses a linear RGB color space, which produces more
perceptually uniform color transitions compared to the default sRGB interpolation.
This is particularly noticeable in blue-to-purple gradients and other transitions
where sRGB interpolation can produce muddy midpoints.
This is especially useful for data visualizations, icon sets, and any SVG-heavy UI
where gradient quality matters. Combined with SVG animations, linearRGB
interpolation produces significantly smoother color transitions.
The Popover API has been a game-changer for building overlays, tooltips, and menus without
JavaScript libraries. Safari 26.5 adds the ToggleEvent.source property, which
identifies which element triggered the toggling of a popover target.
Previously, if you had multiple buttons that could open the same popover, you had to
manually track which button was clicked. Now ToggleEvent.source gives you
this information directly:
This is a small API addition, but it significantly simplifies building complex popover interactions — like context menus, action sheets, and multi-trigger tooltip systems — without resorting to data attributes or closure-based tracking.
Safari 26.5 introduces the Origin API, a new JavaScript interface for origin-based operations. While the full API surface is still evolving, it provides programmatic access to origin components — scheme, host, and port — without manual URL parsing.
This API is useful for:
The quantity and quality of bug fixes in Safari 26.5 is remarkable. Jen Simmons at WebKit described it as "the biggest May release of WebKit yet," with improvements spanning nearly every subsystem:
Fixed scroll animation timeline range names, pause-on-dynamic-state, view timeline near-boundary progress values, and back-forward cache restoration.
Fixed chains of 3+ anchor-positioned elements, anchor() fallback with unitless zero, display:contents anchor scope, and sticky-children anchoring.
Subgrid inside grid-lanes sizing, collapsed border table rowspan, absolutely positioned elements in block-in-inline containers, and column-count:1 text display.
Fixed lh/rlh double-zoom with number line-height, aspect-ratio on zoomed pages, and evaluation-time zoom for unzoomed properties.
Fixed @font-face fallback with different styles, hanging-punctuation handling of U+0027/U+0022, and ideographic space hanging.
Significant SVG rendering improvements and WebRTC stability fixes across multiple scenarios.
Notable individual fixes include: :has(:empty) invalidation when child content
changes, display: contents anchor scope establishment, and chained anchor-positioned
element resolution. The lh and rlh unit fixes are especially
important for anyone using line-height-based CSS sizing.
:open pseudo-class provides a unified way to style the open state of interactive elements like <details>, <dialog>, <select>, and <input>. It replaces the [open] attribute selector which only worked on <details> and <dialog> but not on <select> or <input> elements. It's available in Safari 26.5 and beyond, and is designed as progressive enhancement — browsers without support simply ignore the rules.random(--size, 100px, 200px) now create a global result instead of being scoped to individual elements. This aligns with the updated CSS specification. Safari 26.5 also added the element-scoped keyword for when you need per-element behavior, and removed the deprecated element-shared keyword. Previously-authored CSS using named random() in Safari 26.2 may produce different results in 26.5 due to this spec change.color-interpolation property in SVG gradient contexts, including the linearRGB value. This allows developers to control how colors are interpolated along SVG gradients for more accurate and perceptually uniform color transitions, especially in blue-to-purple gradients where sRGB interpolation can produce muddy midpoints.event.source tells you which one was clicked, eliminating the need for data attributes or closure-based tracking. This simplifies building complex popover interactions like context menus, action sheets, and multi-trigger tooltips.URL parsing. It's useful for security checks (validating third-party script origins), Service Worker scoping, cross-origin request validation, and origin-based configuration loading.:has(:empty) invalidation, chained anchor-positioned element resolution, and lh/rlh unit double-zoom correction.Safari 26.5 is a free update available through macOS Software Update, iOS/iPadOS Settings, and visionOS. For most users and developers, there's no reason not to upgrade — the new features are backward-compatible, and the 63 bug fixes make everyday browsing and development smoother.
The :open pseudo-class and CSS random() improvements are the
standouts for frontend developers. The ToggleEvent.source property and
color-interpolation support are more niche but valuable for popover-heavy
interfaces and SVG-heavy designs respectively.
Bottom line: Safari 26.5 demonstrates Apple's renewed commitment to WebKit quality. It may not have the headline-grabbing features of a major annual release, but the cumulative effect of 63 fixes across scroll animations, anchor positioning, layout, and zoom makes the web platform noticeably more robust. For developers supporting Safari users, testing against 26.5 is well worth the effort.
Keeping up with browser updates across Safari, Chrome, and Firefox is a full-time job. If you're building a web application and need it to work reliably across all modern browsers — including the latest Safari features — I can help.
I'm a full-stack developer with 20+ years of experience building for the web, with deep expertise in cross-browser compatibility, modern CSS, and JavaScript APIs. Based in Minsk and working worldwide, let's discuss your project.
Tell me about your project — I'll provide expert advice on cross-browser compatibility and modern web development. Free of charge.