Published: October 28, 2025
Chrome 142 is rolling out now, and this post shares some of the key features from the release. Read the full Chrome 142 release notes.
Highlights from this release:
- Match scroll markers with the
:target-beforeand:target-afterpseudo-classes. - Use range syntax in style container queries and the
if()CSS function. - React when users show interest in an element with
interestfor.
:target-before and :target-after pseudo-classes
These pseudo-classes match scroll markers that are before or after the active marker (matching :target-current) within the same scroll marker group, as determined by flat tree order:
:target-before: Matches all scroll markers that precede the active marker in the flat tree order within the group.:target-after: Matches all scroll markers that follow the active marker in the flat tree order within the group.
Range syntax for style container queries and if()
Chrome enhances CSS style queries and the if() function by adding support for
range syntax.
It extends style queries beyond exact value matching (for example, style(--theme: dark)). Developers can use comparison operators (such as > and <) to compare custom properties, literal values (for example, 10px or 25%), and values from substitution functions like attr() and env(). For a valid comparison, both sides must resolve to the same data type. It is limited to the following numeric types: <length>, <number>, <percentage>, <angle>, <time>, <frequency>, and <resolution>.
Examples:
Compare a custom property against a literal length:
@container style(--inner-padding > 1em) {
.card {
border: 2px solid;
}
}
Compare two literal values
@container style(1em < 20px) {
/* ... */
}
Using style ranges in if():
.item-grid {
background-color: if(style(attr(data-columns, type<number>) > 2): lightblue; else: white);
}
Interest Invokers (the interestfor attribute)
Chrome adds an interestfor attribute to <button> and <a> elements. This attribute adds "interest" behaviors to the element. When a user shows interest in the element, actions are triggered on the target element, for example, showing a popover.
The user agent detects when a user shows interest in the element through methods such as holding the pointer over the element, hitting special hotkeys on the keyboard, or long-pressing the element on touchscreens. When interest is shown or lost, an InterestEvent fires on the target, which has default actions for popovers, such as showing and hiding the popover.
Further reading
This covers only some key highlights. Check the following links for additional changes in Chrome 141.
- Release notes for Chrome 142.
- What's new in Chrome DevTools (142).
- ChromeStatus.com updates for Chrome 142.
- Chrome release calendar.
Subscribe
To stay up to date, subscribe to the Chrome Developers YouTube channel, and you'll get an email notification whenever we launch a new video. Or follow us on X or LinkedIn for new articles and blog posts.
As soon as Chrome 143 is released, we'll be right here to tell you what's new in Chrome!