# Safari Technology Preview

Published articles for Safari Technology Preview.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Release Notes for Safari Technology Preview 256

DevFeed: [Release Notes for Safari Technology Preview 256](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-256-118941.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18602/release-notes-for-safari-technology-preview-256/>)

Author: Jon Davis

Published: 2026-11-05T00:09:57Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [releases](<https://devfeed.tech/topics/releases.md>)

Tags: [macos](<https://devfeed.tech/tags/macos.md>), [macos-golden-gate](<https://devfeed.tech/tags/macos-golden-gate.md>), [preview](<https://devfeed.tech/tags/preview.md>), [release](<https://devfeed.tech/tags/release.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>)

### AI overview

Safari Technology Preview 256 is available for macOS Golden Gate and macOS Tahoe; installed copies can be updated in System Settings under General -> Software Update. The release adds web platform capabilities including CSS `font-palette-mix()` on Cocoa, canvas text style options, SVG 2 text layout, and WebGPU texture component swizzling. It also improves navigation and selector performance and includes fixes across JavaScript execution, CSS layout, media playback, networking, rendering, Web APIs, extensions, and developer tools. Notable security-related changes include blocking Geolocation in non-secure contexts, correcting secure-context handling for `data:` documents, and warning when COOP/COEP isolation is expected but not achieved. XML external entities are deprecated with a console warning; `<body>` `rightmargin` and `bottommargin` attributes are removed. These notes cover the listed WebKit changes from revisions 323398@main through 324653@main.

### Source excerpt

Safari Technology Preview Release 256 is now available for download for macOS Golden Gate and macOS Tahoe.

## Release Notes for Safari Technology Preview 255

DevFeed: [Release Notes for Safari Technology Preview 255](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-255-96328.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18482/release-notes-for-safari-technology-preview-255/>)

Author: Saron Yitbarek

Published: 2026-10-22T21:22:48Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [releases](<https://devfeed.tech/topics/releases.md>), [web animation](<https://devfeed.tech/topics/web-animation.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [animations](<https://devfeed.tech/tags/animations.md>), [api](<https://devfeed.tech/tags/api.md>), [aspect](<https://devfeed.tech/tags/aspect.md>), [attr](<https://devfeed.tech/tags/attr.md>), [audio](<https://devfeed.tech/tags/audio.md>), [auto-fill](<https://devfeed.tech/tags/auto-fill.md>), [await](<https://devfeed.tech/tags/await.md>), [beacon](<https://devfeed.tech/tags/beacon.md>), [block](<https://devfeed.tech/tags/block.md>), [button](<https://devfeed.tech/tags/button.md>), [download](<https://devfeed.tech/tags/download.md>), [macos](<https://devfeed.tech/tags/macos.md>), [macos-golden-gate](<https://devfeed.tech/tags/macos-golden-gate.md>), [news](<https://devfeed.tech/tags/news.md>), [notes](<https://devfeed.tech/tags/notes.md>), [preview](<https://devfeed.tech/tags/preview.md>), [release](<https://devfeed.tech/tags/release.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>)

### AI overview

Safari Technology Preview 255 is available for macOS Golden Gate and macOS Tahoe, with fixes spanning WebKit and new features in forms, SVG, web APIs, extensions, and Web Inspector. The notes highlight extensive CSS and layout corrections, including many `line-clamp` fixes, plus JavaScript, media playback and codec, networking, accessibility, and rendering fixes. New capabilities include buttons in native select appearance, SVG `textPath` side support, transferable streams for `AudioWorklet`, the `cross-origin-isolated` Permissions Policy feature, extension notification methods, and Web Inspector animation editing and console previews. One known issue remains: `document.activeElement` returns `<html>` rather than `null` in HTML documents without a body, differing from other browsers and affecting WebDriver's Get Active Element command.

### Source excerpt

Safari Technology Preview Release 255 is now available for download for macOS Golden Gate and macOS Tahoe.

## Release Notes for Safari Technology Preview 254

DevFeed: [Release Notes for Safari Technology Preview 254](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-254-77513.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18420/release-notes-for-safari-technology-preview-254/>)

Author: Jon Davis

Published: 2026-10-08T23:29:40Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [view transitions](<https://devfeed.tech/topics/view-transitions.md>), [web animation](<https://devfeed.tech/topics/web-animation.md>), [Canvas](<https://devfeed.tech/topics/canvas.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>)

Tags: [macos](<https://devfeed.tech/tags/macos.md>), [macos-golden-gate](<https://devfeed.tech/tags/macos-golden-gate.md>), [release](<https://devfeed.tech/tags/release.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>)

### AI overview

Safari Technology Preview 254 is available for macOS Golden Gate and macOS Tahoe. The release notes describe WebKit changes, including CSS features and fixes, JavaScript and Web API corrections, accessibility updates, and improvements to WebDriver, WebAssembly, WebGPU, and media handling.

### Source excerpt

Safari Technology Preview Release 254 is now available for download for macOS Golden Gate and macOS Tahoe.

## Web-Perf Wednesday 011 - SpeedCurve's INP Observer Missed Its Threshold

DevFeed: [Web-Perf Wednesday 011 - SpeedCurve's INP Observer Missed Its Threshold](<https://devfeed.tech/articles/web-perf-wednesday-011-speedcurve-s-inp-observer-missed-its-threshold-62449.md>)

Original publisher: [Read original article](<https://csswizardry.com/2026/09/web-perf-wednesday-011-speedcurves-inp-observer-missed-its-threshold/>)

Author: Harry Roberts

Published: 2026-09-30T11:00:00Z

Content type: article

Language: en

Sources: [CSS Wizardry](<https://devfeed.tech/sources/css-wizardry.md>)

Topics: [observability](<https://devfeed.tech/topics/observability.md>), [Interaction to Next Paint](<https://devfeed.tech/topics/interaction-to-next-paint.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [inp](<https://devfeed.tech/tags/inp.md>), [perf](<https://devfeed.tech/tags/perf.md>), [performance](<https://devfeed.tech/tags/performance.md>), [releases](<https://devfeed.tech/tags/releases.md>), [rum](<https://devfeed.tech/tags/rum.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [tooling](<https://devfeed.tech/tags/tooling.md>)

### AI overview

A bug in SpeedCurve's lux.js wrapper nested Event Timing observer options incorrectly, leaving the browser at its default 104 ms threshold. Interactions below that threshold could be omitted from the data used to calculate INP and its attribution. The fix was merged on 24 September and adds an integration test for sub-104 ms interactions. The article also notes smaller Firefox and Safari Technology Preview changes and recommends tracking lux.js versions and rollout timing when comparing RUM data.

### Source excerpt

A long-standing lux.js bug left Event Timing on its 104 ms default, while browser releases improve testing and rendering performance.

## Release Notes for Safari Technology Preview 253

DevFeed: [Release Notes for Safari Technology Preview 253](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-253-58984.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18357/release-notes-for-safari-technology-preview-253/>)

Author: Saron Yitbarek

Published: 2026-09-23T21:46:47Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [WebKit](<https://devfeed.tech/topics/webkit.md>), [CSS](<https://devfeed.tech/topics/css.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [web-standards](<https://devfeed.tech/topics/web-standards.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [animation](<https://devfeed.tech/tags/animation.md>), [download](<https://devfeed.tech/tags/download.md>), [macos](<https://devfeed.tech/tags/macos.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [news](<https://devfeed.tech/tags/news.md>), [release](<https://devfeed.tech/tags/release.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [software](<https://devfeed.tech/tags/software.md>), [webkit](<https://devfeed.tech/tags/webkit.md>)

### AI overview

Safari Technology Preview 253 is available for macOS and includes WebKit changes covering accessibility, animations, CSS, and related resolved issues.

### Source excerpt

Safari Technology Preview Release 253 is now available for download for macOS Golden Gate and macOS Tahoe.

## Release Notes for Safari Technology Preview 252

DevFeed: [Release Notes for Safari Technology Preview 252](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-252-49198.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18304/release-notes-for-safari-technology-preview-252/>)

Author: Jon Davis

Published: 2026-09-11T17:02:22Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [WebKit](<https://devfeed.tech/topics/webkit.md>), [CSS](<https://devfeed.tech/topics/css.md>), [animations](<https://devfeed.tech/topics/animations.md>), [Web Accessibility (a11y)](<https://devfeed.tech/topics/web-accessibility.md>), [macOS](<https://devfeed.tech/topics/macos.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [animation](<https://devfeed.tech/tags/animation.md>), [css](<https://devfeed.tech/tags/css.md>), [macos](<https://devfeed.tech/tags/macos.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [webkit](<https://devfeed.tech/tags/webkit.md>)

### AI overview

Safari Technology Preview 252 is available for macOS and includes WebKit fixes and new features covering accessibility, animations, and CSS behavior.

### Source excerpt

Safari Technology Preview Release 252 is now available for download for macOS Golden Gate and macOS Tahoe.

## Release Notes for Safari Technology Preview 251

DevFeed: [Release Notes for Safari Technology Preview 251](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-251-49195.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18194/release-notes-for-safari-technology-preview-251/>)

Author: Saron Yitbarek

Published: 2026-08-26T21:36:31Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [releases](<https://devfeed.tech/topics/releases.md>), [CSS](<https://devfeed.tech/topics/css.md>), [WebKit](<https://devfeed.tech/topics/webkit.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Web Accessibility (a11y)](<https://devfeed.tech/topics/web-accessibility.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [css](<https://devfeed.tech/tags/css.md>), [macos](<https://devfeed.tech/tags/macos.md>), [news](<https://devfeed.tech/tags/news.md>), [release](<https://devfeed.tech/tags/release.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [scroll-snap](<https://devfeed.tech/tags/scroll-snap.md>), [webkit](<https://devfeed.tech/tags/webkit.md>)

### AI overview

Safari Technology Preview Release 251 is available for macOS Golden Gate and macOS Tahoe. The release notes describe WebKit updates, including accessibility fixes, new CSS support, and resolved issues involving layout, queries, serialization, and scroll snapping.

### Source excerpt

Safari Technology Preview Release 251 is now available for download for macOS Golden Gate and macOS Tahoe.

## When Safari's 'Ignore Cache' Ignored Cache-Control

DevFeed: [When Safari's 'Ignore Cache' Ignored Cache-Control](<https://devfeed.tech/articles/when-safari-s-ignore-cache-ignored-cache-control-45697.md>)

Original publisher: [Read original article](<https://csswizardry.com/2026/08/when-safaris-ignore-cache-ignored-cache-control/>)

Author: Harry Roberts

Published: 2026-08-17T16:11:40Z

Content type: article

Language: en

Sources: [CSS Wizardry](<https://devfeed.tech/sources/css-wizardry.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [WebKit](<https://devfeed.tech/topics/webkit.md>), [browser](<https://devfeed.tech/topics/browser.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [caching](<https://devfeed.tech/tags/caching.md>), [devtools](<https://devfeed.tech/tags/devtools.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [headers](<https://devfeed.tech/tags/headers.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>)

### AI overview

Safari Technology Preview 250 fixed a Web Inspector bug in which disabling the resource cache overwrote Cache-Control request headers supplied by a page. The article explains the distinction between bypassing cached resources and modifying outgoing requests, and describes the related WebKit regression test.

### Source excerpt

Safari Technology Preview 250 fixed a subtle Web Inspector bug that overwrote page-authored Cache-Control request headers when the resource cache was disabled.

## Release Notes for Safari Technology Preview 250

DevFeed: [Release Notes for Safari Technology Preview 250](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-250-49194.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18191/release-notes-for-safari-technology-preview-250/>)

Author: Jon Davis

Published: 2026-08-13T21:24:55Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [WebKit](<https://devfeed.tech/topics/webkit.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [CSS](<https://devfeed.tech/topics/css.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [API](<https://devfeed.tech/topics/api.md>), [Web Accessibility (a11y)](<https://devfeed.tech/topics/web-accessibility.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [api](<https://devfeed.tech/tags/api.md>), [css](<https://devfeed.tech/tags/css.md>), [download](<https://devfeed.tech/tags/download.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [macos](<https://devfeed.tech/tags/macos.md>), [preview](<https://devfeed.tech/tags/preview.md>), [release](<https://devfeed.tech/tags/release.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [technology](<https://devfeed.tech/tags/technology.md>), [web](<https://devfeed.tech/tags/web.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>), [webkit](<https://devfeed.tech/tags/webkit.md>)

### AI overview

Safari Technology Preview 250 is available for macOS and includes WebKit updates spanning accessibility, CSS, JavaScript, WebAssembly, media, networking, scrolling, and related web platform features.

### Source excerpt

Safari Technology Preview Release 250 is now available for download for macOS Golden Gate and macOS Tahoe.

## Release Notes for Safari Technology Preview 249

DevFeed: [Release Notes for Safari Technology Preview 249](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-249-49193.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18182/release-notes-for-safari-technology-preview-249/>)

Author: Saron Yitbarek

Published: 2026-07-29T21:46:12Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [CSS](<https://devfeed.tech/topics/css.md>), [WebKit](<https://devfeed.tech/topics/webkit.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Web Accessibility (a11y)](<https://devfeed.tech/topics/web-accessibility.md>), [animations](<https://devfeed.tech/topics/animations.md>), [macOS](<https://devfeed.tech/topics/macos.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [animation](<https://devfeed.tech/tags/animation.md>), [css](<https://devfeed.tech/tags/css.md>), [macos](<https://devfeed.tech/tags/macos.md>), [news](<https://devfeed.tech/tags/news.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [web](<https://devfeed.tech/tags/web.md>), [webkit](<https://devfeed.tech/tags/webkit.md>)

### AI overview

Safari Technology Preview 249 is available for macOS and includes WebKit updates covering accessibility, animations, CSS features, layout, rendering, and related resolved issues.

### Source excerpt

Safari Technology Preview Release 249 is now available for download for macOS Golden Gate and macOS Tahoe.

## Release Notes for Safari Technology Preview 248

DevFeed: [Release Notes for Safari Technology Preview 248](<https://devfeed.tech/articles/release-notes-for-safari-technology-preview-248-49191.md>)

Original publisher: [Read original article](<https://webkit.org/blog/18162/release-notes-for-safari-technology-preview-248/>)

Author: Jon Davis

Published: 2026-07-22T18:58:31Z

Content type: release

Language: en

Sources: [WebKit](<https://devfeed.tech/sources/webkit.md>)

Topics: [WebKit](<https://devfeed.tech/topics/webkit.md>), [CSS](<https://devfeed.tech/topics/css.md>), [Release notes](<https://devfeed.tech/topics/release-notes.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [Web Accessibility (a11y)](<https://devfeed.tech/topics/web-accessibility.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>), [Web platform](<https://devfeed.tech/topics/web-platform.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [download](<https://devfeed.tech/tags/download.md>), [macos](<https://devfeed.tech/tags/macos.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [safari](<https://devfeed.tech/tags/safari.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

Safari Technology Preview Release 248 is available for macOS Golden Gate and macOS Tahoe. The release notes describe WebKit fixes and updates involving accessibility, CSS, editing, forms, rendering, and related web platform behavior.

### Source excerpt

Safari Technology Preview Release 248 is now available for download for macOS Golden Gate and macOS Tahoe.

## Should masonry be part of CSS grid?

DevFeed: [Should masonry be part of CSS grid?](<https://devfeed.tech/articles/should-masonry-be-part-of-css-grid-45288.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/css-grid-masonry/>)

Author: Ahmad Shadeed

Published: 2024-10-30T00:00:00Z

Content type: article

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Responsive Design](<https://devfeed.tech/topics/responsive-design.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Web platform](<https://devfeed.tech/topics/web-platform.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [css](<https://devfeed.tech/tags/css.md>), [css-grid](<https://devfeed.tech/tags/css-grid.md>), [display](<https://devfeed.tech/tags/display.md>), [examples](<https://devfeed.tech/tags/examples.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [grid](<https://devfeed.tech/tags/grid.md>), [layout](<https://devfeed.tech/tags/layout.md>), [pinterest](<https://devfeed.tech/tags/pinterest.md>), [responsive](<https://devfeed.tech/tags/responsive.md>), [responsive-design](<https://devfeed.tech/tags/responsive-design.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

An exploration of CSS masonry layout, including the debate over whether it should be integrated into CSS Grid or introduced as a separate layout module. The article discusses syntax, browser support, progressive enhancement, and responsive design implications.

### Source excerpt

An exploration of examples showing masonry as both a part of CSS Grid and as its own display type.

## Day 99: native nesting

DevFeed: [Day 99: native nesting](<https://devfeed.tech/articles/day-99-native-nesting-52295.md>)

Original publisher: [Read original article](<https://www.matuzo.at/blog/2023/100daysof-day99>)

Author: Manuel Matuzović

Published: 2023-02-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Manuel Matuzović](<https://devfeed.tech/sources/manuel-matuzovic-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Code](<https://devfeed.tech/topics/code.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [css](<https://devfeed.tech/tags/css.md>), [nesting](<https://devfeed.tech/tags/nesting.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [selector](<https://devfeed.tech/tags/selector.md>)

### AI overview

A practical introduction to native CSS nesting, explaining the required selector syntax and demonstrating nested selectors, pseudo-classes, media queries, and deeper nesting patterns. The examples were tested in Chrome Dev, Safari Technology Preview, and Polypane 13.

### Source excerpt

Nesting in CSS is coming soon! For me personally not the killer feature, at least compared to cascade layers or container queries, but still exciting. Let's see how it works. The most important thing to know about native nesting in CSS is that the nested selector always must start with a symbol (. # : [ * + > ~) because of limitations in browser parsing engines. The following code doesn't work: /* Doesn't work */ ul { li { border-color: green; } } To work around that limitation the nested selector can start with an &. ul { & li { border-color: green; } } /* Same as: ul li { } */ Besides this limitation, everything works as expected for me. Here are some of the things I've tested: a { &:hover { background-color: aqua; } &:focus-visible { background-color: aqua; } } /* Same as: a:hover { } a:focus-visible { } */ a { &:is(:hover, :focus-visible) { background-color: aqua; } } /* Same as: a:is(:hover, :focus-visible) { } */ h2 { font-family: sans-serif; &::first-letter { color: red; } } /* Same as: h2 { } h2::first-letter { } */ h2 { & + p { background-color: red; } } /* Same as: h2 + p { } */ h2 { .parent & { background-color: aqua; } } /* Same as: .parent h2 { } */ h2 { @media (min-width: 400px) { background: red; } } /* Same as: @media (min-width: 400px) { h2 { } } */ h2 { @media (min-width: 400px) { background: red; &::before { content: "!"; color: #fff; } & ~ p { & span { background-color: #000; } :is(span) { color: #fff; } } } } /* Same as: @media (min-width: 400px) { h2 { } h2::before { } h2 ~ p span { } h2 ~ p :is(span) { } } */ div { & & & h3 { background-color: green; } } /* Same as: div div div h3 { } */ h3 { :is(div) & { color: #fff; } } /* Same as: :is(div) h3 { } */ a { &[download] { border: 1px solid red; } } /* Same as: a[download] { } */ You can try it today in Chrome Dev, Safari Technology Preview, or Polypane 13. My blog doesn't support comments yet, but you can reply via blog@matuzo.at.

## Day 96: the margin-trim property

DevFeed: [Day 96: the margin-trim property](<https://devfeed.tech/articles/day-96-the-margin-trim-property-52292.md>)

Original publisher: [Read original article](<https://www.matuzo.at/blog/2023/100daysof-day96>)

Author: Manuel Matuzović

Published: 2023-02-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Manuel Matuzović](<https://devfeed.tech/sources/manuel-matuzovic-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [margin](<https://devfeed.tech/tags/margin.md>), [property](<https://devfeed.tech/tags/property.md>), [safari-technology-preview](<https://devfeed.tech/tags/safari-technology-preview.md>), [selector](<https://devfeed.tech/tags/selector.md>)

### AI overview

A brief tutorial on the CSS margin-trim property, which lets a container trim child margins at its edges. It compares several existing spacing techniques and notes that Safari Technology Preview is the only browser supporting the property at the time described.

### Source excerpt

The margin-trim property allows a container element to trim the margins of its children where they adjoin the container's edges. Let's say we have a parent element and 4 children, and we use margin-block-end to add some spacing between these elements. <ul> <li>A</li> <li>B</li> <li>C</li> <li>D</li> </ul> li { margin-block-end: 1rem; } A B C D That's great, but to avoid the extra space at the end of the list, we want to make sure that the last item doesn't get any margin. To achieve that, I've used at least 3 different solutions in the past. Apply a margin on all elements and remove it from the last. Okay, why not. li { margin-block-end: 1rem; } li:last-child { margin-block-end: 0; } Apply a margin on all elements but the last. Looks clever, less lines, but harder to read. li:not(:last-child) { margin-block-end: 1rem; } Use the lobotimized owl selector My favorite for the longest time. ul > * + * { margin-block-start: 1rem; } There are pros and cons to all solutions. Anyway, eventually we might not have to use any of them when we have this specific problem because margin-trim solves it more elegantly. We can define the property on the parent element and tell it where it should trim margins. Allowed values are none, block, block-start, block-end, inline, inline-start, and inline-end. ul { margin-trim: block-end; } li { margin-block-end: 1rem; } Note: Safari Technology Preview is currently the only browser that supports margin-trim. My blog doesn't support comments yet, but you can reply via blog@matuzo.at.