391043 Stack
📖 Tutorial

Safari Technology Preview 240: New CSS Features and Bug Fixes

Last updated: 2026-05-11 00:54:42 Intermediate
Complete guide
Follow along with this comprehensive guide

Introduction

Apple has released Safari Technology Preview 240, the latest test version of its web browser designed for developers and early adopters. This update brings a host of improvements across CSS, editing, forms, HTML, and media handling. Available for macOS Tahoe and macOS Sequoia, the build incorporates changes from WebKit revisions 308418@main to 309286@main. Existing users can update via System Settings > General > Software Update.

Safari Technology Preview 240: New CSS Features and Bug Fixes
Source: webkit.org

CSS Enhancements

New Features

The standout addition is support for the revert-rule CSS keyword. This keyword allows developers to roll back a cascade layer for a specific rule, effectively removing the current rule's influence as if it never existed. This provides finer control over style stacking and inheritance. (308733@main)

Resolved Issues

  • Custom scrollbar cutting: Fixed a macOS bug where custom CSS scrollbars were clipped and the scrollbar corner rect had incorrect sizing. (309119@main)
  • Hanging punctuation quotes: The hanging-punctuation property now correctly treats the apostrophe (U+0027) and quotation mark (U+0022) as hangable quotes. (308597@main)
  • Ideographic space hanging: Added support for ideographic space (U+3000) to hang when used as the first value in hanging-punctuation. (308605@main)

Editing Improvements

Resolved Issues

  • Font picker usability: Fixed an issue where the font style selection became unresponsive after changing fonts when editing multiple lines of text. (308562@main)
  • Emoji copy/paste: Emoji images are now preserved correctly when copying and pasting content across different websites. (309176@main)
  • Selection jump: Text selection no longer jumps unexpectedly when selecting absolutely-positioned content inside an element with user-select: none. (308451@main)

Forms Fixes

Resolved Issues

  • Keyboard tabbing after button disable: Fixed a bug where keyboard focus position was lost when a focused button became disabled, causing focus to jump to the start of the page. (308991@main)

HTML Parsing Updates

Resolved Issues

  • Viewport meta parsing: Updated parsing to correctly treat form feed as ASCII whitespace, aligning with the HTML specification. (309044@main)
  • Pixel-length margin attributes: Fixed incorrect parsing of pixel-length margin attributes on <body>, <iframe>, and <frame> elements. (308526@main)

Media and Audio/Video Enhancements

Resolved Issues

  • WebM audio decoding: Fixed an issue where decoding WebM audio files with more than two channels would fail. (308749@main)
  • VP8 in WebM support: MediaCapabilities.decodingInfo() now correctly reports VP8 in WebM as supported. (308789@main)
  • MP4 Opus decoding: Fixed an issue where MP4 files containing Opus audio tracks could not be decoded with decodeAudioData. (309140@main)
  • Live Text on paused fullscreen video: Live Text selection is now available on paused fullscreen videos. (308498@main)
  • FairPlay-protected VP9 playback: Fixed an issue where FairPlay-protected VP9 content failed to play via MediaSource. (308622@main)
  • Autoplay text track loading: Autoplay now waits for default text tracks to finish loading before proceeding. (308796@main)
  • currentTime getter: The currentTime getter now returns defaultPlaybackStartPosition when no media player exists. (308654@main)
  • Timeupdate event on playback reset: HTMLMediaElement now fires a timeupdate event when resetting playback position during media load, as required by the specification. (308695@main)
  • Preload attribute issue: Fixed an issue where the media player preload attribute was not behaving correctly. (308796@main – note: original text incomplete, but we include the available info)

Conclusion

Safari Technology Preview 240 continues Apple's commitment to refining the browsing experience for developers. With targeted fixes in CSS, editing, forms, HTML, and media, this release aims to improve compatibility and stability. Developers are encouraged to test their websites against these changes and provide feedback through the WebKit project.