Skip to content
Stacklumen is now a solutions companySee the list here

Firefox 161: CSS random(), typed CSS values and dictionary compression

Firefox 161 is out with CSS random(), the CSS Typed Object Model, custom clipboard formats and Compression Dictionary Transport, plus fixes for 110 security flaws.

Stacklumen blog card reading 'Firefox 161 is out. random() in CSS, and smaller updates over HTTP.' beside a diagram of a browser and server exchanging Use-As-Dictionary, Available-Dictionary and Content-Encoding: dcz headers, above a CSS rule using random().
On this page
  1. CSS random() arrives in Firefox
  2. Smaller downloads for files that change a little
  3. CSS values as typed objects
  4. Clipboard, navigation and SVG
  5. Behind a setting for now
  6. Security fixes
  7. What it means for your site
  8. Sources

Firefox 161 reached the release channel on 24 November 2026. For people who build websites, the main changes are CSS random(), the CSS Typed Object Model, custom clipboard formats and support for Compression Dictionary Transport over HTTP. The release also carries a large batch of security fixes.

CSS random() arrives in Firefox

Firefox now supports the CSS random() function. It returns a random value within a range you set, and it can snap that value to a step size. An optional key lets several random() calls share the same random base value, so related properties can move together.

A rule such as rotate: random(0deg, 360deg); gives each matching element its own angle without any JavaScript. This is useful for decorative effects like scattered shapes, confetti or varied card tilts.

Firefox also now accepts nested functions in the first parameter of var(), attr() and env(). Mozilla's examples include env(var(--safe-area-block-start)), where a custom property chooses which environment variable to read.

Smaller downloads for files that change a little

Firefox 161 supports Compression Dictionary Transport. It works in three steps:

  • The server marks a response as a dictionary with the Use-As-Dictionary header.
  • On a later matching request, the browser names the stored dictionary in the Available-Dictionary header.
  • The server can then send a response compressed against that dictionary, using the dcb (Brotli) or dcz (Zstandard) content encoding.

Mozilla notes this suits resources that change little between versions, such as JavaScript bundles. When you ship a new version of a bundle, a returning visitor's browser can receive it compressed against the version it already holds. Your server or CDN has to send these headers for this to take effect.

CSS values as typed objects

The CSS Typed Object Model is now supported. Scripts can read and write CSS values as typed objects, through Element.computedStyleMap() and HTMLElement.attributeStyleMap, rather than parsing and building strings. Mozilla notes that colour value interfaces such as CSSColorValue are not supported in Firefox or any other browser yet.

Clipboard, navigation and SVG

  • Custom clipboard formats. Clipboard.write() and Clipboard.read() accept custom formats, written as MIME types prefixed with web , such as web text/x-my-format. Only a page from the same origin as the writing page can read them. This lets an editor or app copy and paste its own data between its pages.
  • Navigation API. NavigationTransition.to is supported. It returns the destination of the navigation in progress, so code outside the navigate handler can see where the user is going, for example to report which navigation failed.
  • SVG referrer policy. The referrerpolicy attribute now works on SVG <image>, <script> and <feImage> elements, the same way it does on HTML <img> and <script>.
  • WebTransport and WebRTC. WebTransport gains properties for the number of incoming streams an app expects, and RTCRtpSender.setParameters() can request a key frame in the same call that changes encoding settings.

Behind a setting for now

Several features ship in Firefox 161 but are off by default in the release version. They include margin-trim for block containers, cross-document view transitions, blocking="render" on links, scripts and styles, and letting prefers-color-scheme follow a single scheme declared in <meta name="color-scheme">. They can be switched on in about:config for testing. Do not rely on them for visitors yet.

Security fixes

Mozilla's advisory for this release lists 110 CVEs fixed in Firefox 161: 59 rated high, 30 moderate and 21 low. The highest impact rating is high, so it is worth checking that the machines your team uses have moved to 161.

What it means for your site

  • If you already use random() for Chrome, check those pages in Firefox 161. Keep a fixed fallback value for browsers that do not support it yet.
  • If you serve large JavaScript bundles that change often, ask your host or CDN whether it supports Compression Dictionary Transport. The headers above are the ones to look for.
  • If your app copies structured data, the web clipboard formats now work in Firefox, so a same-origin copy and paste can keep that structure.
  • Treat the features behind a setting as previews. Test them, but keep your current approach in production.
  • Update Firefox on your own machines and your team's, given the number of high severity fixes.

Sources

New posts by email

Product updates and field notes from Stacklumen, in one email a day or one a week.

How often