Chrome 159 stops padding computed background lists to the layer count

Chrome 159 and Edge 159 change what getComputedStyle returns for background-* properties. Rendering stays the same, but code that reads layer lists may not.

News4 min read
Three thin glass panes standing in a row in darkness, holding a teal gradient, fine grain and a faint grid
In short
  • Chrome 159 reaches stable on December 8, 2026, and Edge 159 on December 10. Both keep the number of comma-separated values you wrote for background-* longhands in the computed value.
  • Before, Chrome repeated or truncated those lists to match the background-image layer count. Firefox and Safari already followed the spec.
  • Painting does not change. Only code that reads computed styles, such as getComputedStyle, sees different strings.
159Chrome and Edge version
3Engines that now agree
8December stable date for Chrome

Google's Chrome team listed the change in the Chrome 159 release notes as "Background layer count independence". Microsoft documents the same behavior in the Microsoft Edge 159 web platform release notes. Chrome 159 is due on December 8, 2026, after its stable cut on December 1, and Edge 159 follows on December 10.

What changes is the string your scripts get back. If you are wondering who should check this, it depends on your web development team structure: usually whoever owns the design-system tooling or the visual tests. Here is what to look for.

What changes in Chrome 159?

From version 159, the computed value of each background-* longhand keeps the list exactly as you wrote it. A background is a list of layers: background-image sets how many there are, and the other longhands (background-repeat, background-size, background-position, background-clip and the rest) take one value per layer. You can write fewer values than layers, or more.

Until now, Chrome rewrote those lists in the computed value. Too few values were repeated to fill every layer. Extra values were cut off. Here is the difference:

.hero {
  background-image: url(grain.png), linear-gradient(#0b0d10, #1b2330), url(paper.jpg);
  background-repeat: repeat, no-repeat;
}

getComputedStyle(hero).backgroundRepeat
// Chrome 158 and earlier: "repeat, no-repeat, repeat"
// Chrome 159, Edge 159:   "repeat, no-repeat"

The third layer still renders with repeat. The browser cycles the list at paint time, as before. The Edge notes put it plainly: repeating and truncating still happen when the browser renders the layers, so the change only affects what you read back.

Why did Chrome change it?

Because the spec says so and the other engines already did it. Appendix A of CSS Values and Units Level 4 treats repetition and truncation as used-value behavior: "The computed values of the coordinating list properties are not affected by such truncation or repetition."

The Chrome Platform Status entry says the CSS Working Group recently confirmed that rule, which left Chrome as the only browser that diverged. Firefox already implemented it, and Safari shipped it after Safari Technology Preview 246.

Which code can break?

Only code that reads computed background values and assumes one entry per layer can break. Code that only paints is safe. Check these four places:

  • Visual and style snapshot tests. Tests that store getComputedStyle output will show diffs in Chrome 159 even though the screenshots match.
  • Animation and theming scripts. Code that splits backgroundPosition or backgroundSize by comma and indexes it by layer can hit undefined for the last layers.
  • Design-tool exporters and inspectors. Anything that copies computed styles into tokens or another element now copies the short list, which still renders the same.
  • Cross-browser branches. If you wrote a Chrome-only workaround for the old padding, you can remove it. Firefox and Safari never needed it.

If your hero stacks a grain layer over a gradient, the way our grain and noise guide describes, that is exactly the three-layer case above.

How do you read background layers safely?

Do the repeat yourself. Split the lists at top-level commas only, since gradients and url() values contain commas, then map each layer to values[i % values.length]. That is the same rule the browser uses when it paints:

function splitList(s) {
  const out = []; let depth = 0, start = 0;
  for (let i = 0; i < s.length; i++) {
    if (s[i] === '(') depth++;
    else if (s[i] === ')') depth--;
    else if (s[i] === ',' && depth === 0) { out.push(s.slice(start, i).trim()); start = i + 1; }
  }
  out.push(s.slice(start).trim());
  return out;
}

function layerValues(el, prop) {
  const cs = getComputedStyle(el);
  const layers = splitList(cs.backgroundImage).length;
  const values = splitList(cs[prop]);
  return Array.from({ length: layers }, (_, i) => values[i % values.length]);
}

layerValues(hero, 'backgroundRepeat'); // ["repeat", "no-repeat", "repeat"]

The helper gives the same result in Chrome 158, Chrome 159, Firefox and Safari, so you can ship it before December 8. Two more habits help:

  1. Write one value per layer in CSS you control. It reads better and removes the question entirely.
  2. Snapshot pixels, not strings, for background tests. Rendering did not change in this release, so screenshot diffs stay stable while string snapshots do not.

For a refresher on how layer lists work, see our background-image guide. The per-layer background-blend-mode list follows the same rule, covered in blend modes for background images.

Questions about Chrome 159 background lists

Will my backgrounds look different in Chrome 159?

No. The browser still repeats or truncates the lists when it paints the layers. The change only affects the computed value that scripts read back.

Which browsers already behaved this way?

Firefox and Safari. Chrome was the only engine that padded or cut computed background lists to the background-image layer count, and Chrome 159 brings it in line with them.

Do I need to change my CSS?

No. CSS that sets fewer or more values than layers keeps working. Only JavaScript that reads computed background values and assumes one value per layer needs a review.

Keep reading

Built for the web.
Free to download.