惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
Help Net Security
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LINUX DO - 最新话题
PCI Perspectives
PCI Perspectives
博客园 - 三生石上(FineUI控件)
V2EX - 技术
V2EX - 技术
Spread Privacy
Spread Privacy
T
Tor Project blog
量子位
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
小众软件
小众软件
博客园 - 叶小钗
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
Y
Y Combinator Blog
N
News | PayPal Newsroom
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tenable Blog
Scott Helme
Scott Helme
G
GRAHAM CLULEY
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
IT之家
IT之家
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
博客园 - 司徒正美
Application and Cybersecurity Blog
Application and Cybersecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Attack and Defense Labs
Attack and Defense Labs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Last Watchdog
The Last Watchdog
L
LangChain Blog
C
Check Point Blog
Google Online Security Blog
Google Online Security Blog
V
Visual Studio Blog
Latest news
Latest news

developer.chrome.com: Blog

A developer toolkit to make your website agent-ready  |  Blog  |  Chrome for Developers Unlock runtime insights: Introducing third-party developer tools for Chrome DevTools for agents  |  Blog  |  Chrome for Developers What's New in WebGPU (Chrome 149-150)  |  Blog  |  Chrome for Developers Join the WebMCP origin trial  |  Blog  |  Chrome for Developers Seamless PWA origin migration: Change domains without losing users  |  Blog  |  Chrome for Developers Chrome 150 beta  |  Blog  |  Chrome for Developers New in Chrome 149  |  Blog  |  Chrome for Developers What's new in DevTools (Chrome 149)  |  Blog  |  Chrome for Developers Build new features using built-in AI in Chrome  |  Blog  |  Chrome for Developers What's new in web extensions: I/O 2026 recap  |  Blog  |  Chrome for Developers New in Chrome at Google I/O 2026  |  Blog  |  Chrome for Developers Modernize authentication with passkeys, digital credentials, and more  |  Blog  |  Chrome for Developers 15 updates from Google I/O 2026: Powering the agentic web with new capabilities, tools, and features in Chrome  |  Blog  |  Chrome for Developers Streamline your AI coding workflow with Chrome DevTools for agents 1.0  |  Blog  |  Chrome for Developers Declarative partial updates  |  Blog  |  Chrome for Developers Introducing the HTML-in-Canvas API origin trial  |  Blog  |  Chrome for Developers Streamlined sign-in: Immediate UI mode is now available  |  Blog  |  Chrome for Developers Install web apps with the new HTML install element | Blog | Chrome for Developers Chrome 149 beta | Blog | Chrome for Developers New in Chrome 148 | Blog | Chrome for Developers What's new in DevTools (Chrome 148) | Blog | Chrome for Developers Container Timing origin trial | Blog | Chrome for Developers Empower your team with expanded roles in the Developer Dashboard | Blog | Chrome for Developers Localization support for web app manifests | Blog | Chrome for Developers Unlock Structured Clone for Chrome Extension Messaging | Blog | Chrome for Developers What's New in WebGPU (Chrome 147-148) | Blog | Chrome for Developers Final Soft Navigations origin trial starting in Chrome 147 | Blog | Chrome for Developers Connection Allowlists origin trial: Secure your web application's network  |  Blog  |  Chrome for Developers Improved Japanese phonetic name support in Chrome autofill  |  Blog  |  Chrome for Developers Take our course about AI evaluations  |  Blog  |  Chrome for Developers Chrome 148 beta | Blog | Chrome for Developers Chrome Web Store: A smarter, faster appeals process | Blog | Chrome for Developers New in Chrome 147 | Blog | Chrome for Developers What's new in DevTools (Chrome 147) | Blog | Chrome for Developers Chrome 147 enables concurrent and nested view transitions with element-scoped view transitions | Blog | Chrome for Developers Enter video Picture-in-Picture automatically on more sites | Blog | Chrome for Developers When to use WebMCP and MCP | Blog | Chrome for Developers Chrome 147 beta | Blog | Chrome for Developers New in Chrome 146 | Blog | Chrome for Developers What's new in DevTools (Chrome 146) | Blog | Chrome for Developers
Gap decorations: Now available in Chromium  |  Blog  |  Chrome for Developers
LinkedIn · 2026-05-15 · via developer.chrome.com: Blog

Gap decorations: Now available in Chromium

Javier Contreras

Sam Davis Omekara

Published: May 15, 2026

CSS gap decorations are available in Chrome and Edge starting in version 149. Style the gaps between grid, flexbox, and multi-column layouts without using borders or pseudo-elements. This feature was built in collaboration between the Microsoft Edge and Google Chrome teams.

The problem

A grid layout with lines between columns and rows.

Styling gaps between layout items has always required workarounds. Borders on individual items, pseudo-elements, background hacks. These approaches have costs:

  • They depend on structure. Adding a visual separator means changing your markup or writing selectors for specific items.
  • They interfere with accessibility. Extra DOM elements show up in the accessibility tree when they shouldn't.
  • They're hard to maintain. Responsive layouts break the assumptions your gap styling was built on.
  • They hurt performance. More DOM nodes, more layout work.
  • They have poor authoring ergonomics. Complex geometric calculations were often needed to get things working correctly.

The column-rule property handles gap decorations for multi-column layouts, but grid and flexbox previously lacked equivalent functionality.

The solution

Grid and flexbox containers now accept column-rule. A new row-rule property handles horizontal gaps. These decorations are purely visual and don't affect existing layouts. If you use the column-rule property in multi-column layouts, existing behavior remains the same.

For example, here is a flex container with three panels using a list of styles for its column and row rules:

.flex-split {
  column-rule-width: 2px;
  column-rule-style: dashed, solid;
  column-rule-color: #d4d0c8;
}
A thre panel layout with column rules.
Try the split screen with gap decorations demo

As illustrated in this example, both row-rule and column-rule accept the same shorthand for width, style, and color. Use the rule shorthand to set both at once.

New properties

However, we didn't just bring column-rule to other layout modes and add the row counterpart. We also introduced controls for fine-tuning your decorations: how they break at intersections, how far they inset from gap edges, when they appear relative to items, and how to vary styles across gaps. Rule width, color, and insets are all animatable too.

The repeat() syntax

Gap decorations support repeat() for their width, style, and color values. This lets you vary decorations across gaps in short form, similar to the repeat() syntax used for track definitions in grid:

.settings-panel {
  row-rule: 1px solid #243352;
  row-rule-width: repeat(2, 1px), 4px;
}
A list of settings with row rules.
Try the settings view with gap decorations demo

This gives the first two row gaps a 1px rule and the third a 4px rule, cycling if there are more gaps than values. You can also pass multiple values directly without repeat(). For example, alternating row rule styles for hour and half-hour boundaries in a calendar:

.calendar {
  row-rule-width: 2px, 1px;
  row-rule-style: solid, dashed;
  row-rule-color: #e8e4df, #f0ece7;
}
A calendar layout with alternating borders.
Try the calendar with gap decorations demo. This demo alternates between a solid rule for hour boundaries and a dashed rule for half-hours.

Control decoration breaks

The column-rule-break and row-rule-break properties control how decorations behave at gap intersections:

  • normal (default): Behavior depends on the type of container. More information is in the specification.
  • none: Decorations run continuously through intersections.
  • intersection: Decorations break where row and column gaps cross.

For example, if you set rule-break to intersection in a grid container, rules break at gap intersections rather than continuing through:

.dashboard {
  column-rule-style: solid;
  column-rule-color: #fbbf24, #34d399;
  column-rule-width: 1px, 3px;
  column-rule-break: intersection;
  row-rule: 1px solid #1e1e36;
}
A dashboard layout with column rules.
Try the dashboard grid with gap decorations demo.

If you set rule-break to none, the rules run continuously through intersections:

.grid {
  column-rule: 1px solid #5a9e9e;
  row-rule: 1px solid #c27a6b;
  rule-break: none;
}

You can try this value in the interactive playground.

Extend or shrink decorations

The column-rule-inset and row-rule-inset properties control how far decorations extend within a gap. You can set insets on all sides at once with the shorthand, or target insets asymmetrically with column-rule-inset-cap (for endpoints that have no crossing gaps) and column-rule-inset-junction (for endpoints that intersect with other gaps).

Values can be lengths, percentages, or the overlap-join keyword, which joins gap decorations into corners. For example, setting rule-inset to 5px shrinks all decorations inwards 5px:

.container {
  display: flex;
  flex-wrap: wrap;
  column-rule: 1px solid #2a2a45;
  column-rule-color: #60a5fa, #34d399, #a78bfa;
  rule-inset: 5px;
  row-rule: 1px solid #2a2a45;
}
A dashboard grid with lines.
Try the dynamic flex items with gap decorations demo.

Setting rule-inset-cap to 0px and rule-inset-junction to 10px gives decorations that are flush at container edges but inset at intersections. The dashboard demo shown earlier uses this approach, and the insets animate on hover:

.dashboard {
  rule-inset-cap: 0px;
  rule-inset-junction: 10px;
  transition: rule-inset-junction 0.4s;
}
.dashboard:hover {
  rule-inset-junction: 0px;
}
A dashboard layout with column rules.
Try the dashboard grid with gap decorations demo.

Visibility

The column-rule-visibility-items and row-rule-visibility-items properties control when rules appear based on item adjacency:

  • normal (default): Depends on container type.
  • all: Rules appear in every gap, even empty ones.
  • around: Rules appear wherever there are one or more adjacent items.
  • between: Rules appear only between two adjacent items.

The rule-visibility-items shorthand sets both at once. Setting rule-visibility-items to between will show rules only between adjacent items:

section {
  rule: 2px solid black;
  rule-visibility-items: between;
}
An editorial layout with rules between rows and columns.
Try the article grid with gap decorations demo.

On the other hand, setting rule-visibility-items to all will show rules in every gap, even those without adjacent items:

section {
  rule: 2px solid black;
  rule-visibility-items: all;
}

Toggle the value in the live demo to see the difference!

Animate decorations

Rule width, color, and insets are animatable. You can transition them on hover or any other state change. The dashboard demo shown earlier transitions rule colors and insets on hover:

.dashboard {
  column-rule-color: #fbbf24, #34d399;
  rule-inset-junction: 10px;
  transition: column-rule-color 0.4s, rule-inset-junction 0.4s;
}

.dashboard:hover {
  column-rule-color: #3b82f6, #3b82f6;
  rule-inset-junction: 0px;
}

Demos

All demos shown in this post are available at the Edge demo site.

The developer trial blog post includes several more demos, including an interactive playground, a burger menu, a notebook layout, and a magazine-style layout with a sudoku grid.

Changes since the developer trial

If you tried gap decorations during the developer trial (Chrome 139), note the following changes:

  • The feature is available by default; no flags are needed.
  • Some property names were updated to align with the latest specification (for example, column-rule-outset and row-rule-outset became column-rule-inset and row-rule-inset).
  • The column-rule-visibility-items and row-rule-visibility-items properties were added.
  • Animation support was added.

Use gap decorations today

Gap decorations work in Chrome and Edge, starting with version 149. If your gap decorations are purely decorative, the feature is a progressive enhancement; in browsers without support, gaps render normally with no visible decorations. A polyfill is in development for browsers that don't yet have support.

File bugs at the Chromium issue tracker. For more background, see the CSS Gap Decorations specification.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-05-15 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-15 UTC."],[],[]]