The useReducer React Hook is a good alternative to tools like Redux, Recoil, or MobX.
Node.js v22.5.0 introduced a native SQLite module, which is is similar to what other JavaScript runtimes like Deno and Bun already have.
Understanding and supporting pinch, text, and browser zoom significantly enhances the user experience. Let’s explore a few ways to do so.
Playwright is a popular framework for automating and testing web applications across multiple browsers in JavaScript, Python, Java, and C#. […]
2 Replies to "New in Chrome 76: The frosted glass effect with backdrop-filter"
Instead of writing
@supports (backdrop-filter: none) {
…
backdrop-filter: blur(8px);
…
}
one should be writing
@supports (backdrop-filter: blur(8px)) {
…
backdrop-filter: blur(8px);
…
}
because you’re not in fact interested if the browser supports “backdrop-filter: none”, right?
This is especially important once you realize that the same property (e.g. display) supports values with wide range of support by different UAs.
Hi Mikko,
The idea is to query the support of the property instead of the value. Querying for “backdrop-filter: none” will throw the same true / false result as querying for “backdrop-filter: 8px”, but allow us to change the value in a single place if for whatever reason we decide to do that in the future.
It might not be such a dramatic impact in the small scale, but going with a query for property+value can lead to issues as the codebase grows and we start to have a lot of repetition and forgotten queries that doesn’t really make sense.
Your point is certainly valid for properties such as display or position, but for most others, querying for property instead of property+value is a better approach in my opinion.