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

推荐订阅源

J
Java Code Geeks
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
量子位
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
D
DataBreaches.Net
B
Blog
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
H
Help Net Security
The Cloudflare Blog
U
Unit 42

CSS-Tricks

Let’s Use the Emergent CSS random() Function in all the Browsers | CSS-Tricks Creating Web Widgets Using the Document Picture-in-Picture API | CSS-Tricks animation-trigger | CSS-Tricks MicroLighter: Syntax Highlighter | CSS-Tricks WordPress PHP-Only Block Registration | CSS-Tricks Resolved: CSS Class Prefix Selector | CSS-Tricks CSS Navigation Matching, Early Days | CSS-Tricks WordPress.com Student Plan | CSS-Tricks Dark mode toggles: two states are enough | CSS-Tricks What’s !important #17: Custom Highlight API, CSS Navigation Matching, Fixing text-stroke, and More | CSS-Tricks Blocked aria-hidden: The Warning is Right, and Every Fix You've Found is Wrong | CSS-Tricks Animating CSS border-image | CSS-Tricks SmashingConf Freiburg 2026, September 7-10 | CSS-Tricks Using and Styling the Dialog Element | CSS-Tricks 2026 State of CSS, Devs Surveys | CSS-Tricks Gap Decorations Are Now Available, Here’s What’s New | CSS-Tricks What’s !important #16: sibling-index() Animations, Use Cases for the infinity Keyword, Container Stuck Queries, and More | CSS-Tricks writing-mode | CSS-Tricks pointer-events | CSS-Tricks What’s !important #15: Boundary-aware CSS, Time-based CSS, Full-bleed CSS, and More | CSS-Tricks Get Ready For the Powerful CSS border-shape Property! | CSS-Tricks What’s !important #14: Gap Decorations, random(), <select> field sizing, and More | CSS-Tricks The Shifting Line Between CSS States and JavaScript Events | CSS-Tricks translateZ() | CSS-Tricks translateY() | CSS-Tricks translateX() | CSS-Tricks translate() | CSS-Tricks Using Scroll-Driven Animations for Opposing Scroll Directions | CSS-Tricks A First Look at Scroll-Triggered Animations | CSS-Tricks The Siren Song of  ariaNotify() | CSS-Tricks
What’s !important #18: <geolocation>, Syntax ::highlight(...
Daniel Schwarz · 2026-08-31 · via CSS-Tricks

Well, that’s a wrap. No, not a flex-wrap, but rather today marks a new day, week, month, season, aaaand new edition of What’s important (#18), bringing you the best content that CSS developers have produced over the last couple of weeks or so.

Abhishek Jakhar explained why tooltips should be delayed then instant (basically, so that we don’t trigger them accidentally, and then when we don’t want them anymore, so that they disappear immediately). Abhishek showed us how to implement all of that, too. One thing that I’d like to point out is that if the hover-able region is too small, the tooltip can be de-triggered unintentionally, so I’d keep the delay in that case.

Chris Coyier then responded to that with a modern implementation that utilizes interest invokers, which come with two key CSS properties: interest-delay-start and interest-delay-end. Only Chrome supports interest invokers at the moment, but progressive enhancement, right?

<geolocation> and how to use it today

Speaking of progressive enhancement, the Geolocation API has always been complicated because of all of the external hardware involved (GPS satellites, Wi-Fi networks, cellular towers, etc.) and how frustrating it can be to change the permission status later. <geolocation> fixes a lot of that but introduces a few new quirks. For example, there are some…styling restrictions.

Two location permission Chrome dialogs offering options to manage location access settings.
Source: Piccalilli.

And since only Chrome supports it, I explained how to use <geolocation> alongside the current Geolocation API, which means that you can use it today, essentially.

MicroLighter: a ::highlight()-based syntax highlighter

Dave Rupert made a small syntax highlighter called MicroLighter using the new Custom Highlight API. He also showed us how to use MicroLighter, and Geoff talked a bit about it too.

A web page for MicroLighter, displaying feature highlights and installation instructions.

How to get CSS grid information into CSS variables

Temani Afif demonstrated how to get CSS grid information into CSS custom properties. Specifically, how to get the number of rows and columns, as well as the coordinates (x/y indexes) of each cell. The only condition is that the columns must have equal widths, but with the way that CSS has been evolving lately, that could definitely change.

Temani also showed us how we can use this to determine hover proximity, which is very cool:

Dark mode: two-state or tri-state?

Lea Verou says two-state, but Bramus says tri-state — what do you say? Personally, I like the auto-until-overridden two-state approach, as described by Vale.Rocks:

An introduction to the class prefix selector

Bramus also introduced the class prefix selector, which, even though it isn’t supported anywhere yet, is very simple and very useful (as you can see below), so I’m expecting a quick turnaround on this one.

.something-* {
  /* ... */
}

This is cleaner and more performant than attribute selectors:

[class^="something-"] {
  /* Matches class="something-xxx" */
}

[class*=" something-"] {
  /* Matches class="xxx something-xxx" */
}

[class*="something-"] {
  /* Matches class="my-something-xxx" */
}

Here’s what Geoff had to say about the class prefix selector.

…and the named-feature() function

Bramus (who is kind of on a roll here, to be honest), also introduced the @supports named-feature() function. This one’s supported by Chrome though, and basically queries support for very specific things that would otherwise be impossible to query, such as whether the browser respects transforms when anchor positioning elements, but hopefully it makes @supports more capable all-round.

How to balance wrapped flex items across rows or columns

What’s also new to Chrome is flex-wrap: balance, which is basically text-wrap: balance but for flex items. Ahmad Shadeed explained what flex-wrap: balance does and what we can use it for.

New web platform features and updates

Autumn/fall, here we come!