{"id":6438,"date":"2026-10-28T01:57:18","date_gmt":"2026-10-28T04:57:18","guid":{"rendered":"https:\/\/tucumandevelopers.com\/index.php\/2026\/10\/28\/whats-important-19-css-refraction-effects-scroll-state-queries-custom-media-and-more\/"},"modified":"2026-10-28T01:57:18","modified_gmt":"2026-10-28T04:57:18","slug":"whats-important-19-css-refraction-effects-scroll-state-queries-custom-media-and-more","status":"publish","type":"post","link":"https:\/\/tucumandevelopers.com\/index.php\/2026\/10\/28\/whats-important-19-css-refraction-effects-scroll-state-queries-custom-media-and-more\/","title":{"rendered":"What\u2019s !important #19: CSS Refraction Effects, Scroll State Queries, @custom-media, and More"},"content":{"rendered":"<div>\n<div>\u2014 Leon ._. (<a href=\"https:\/\/bsky.app\/profile\/did:plc:5mchy3yba6puvai3dpo6wies?ref_src=embed\" rel=\"nofollow noopener\">@leonarnott.bsky.social<\/a>) <a href=\"https:\/\/bsky.app\/profile\/did:plc:5mchy3yba6puvai3dpo6wies\/post\/3lpku3zr6w7sw?ref_src=embed\" rel=\"nofollow noopener\">13:02 \u00b7 Sep 17, 2026<\/a><\/p><\/blockquote>\n<\/blockquote>\n<p>Again, three simple steps:<\/p>\n<ol>\n<li>Register&nbsp;<code>--bg-color<\/code>&nbsp;using&nbsp;<code>@property<\/code><\/li>\n<li>Animate&nbsp;<code>--bg-color<\/code>\u2019s value using&nbsp;<code>@keyframes<\/code><\/li>\n<li>Declare&nbsp;<code>\u2014bg-color: inherit<\/code>&nbsp;on&nbsp;<code>::selection<\/code><\/li>\n<\/ol>\n<p>And that\u2019s it, really. Simply use&nbsp;<code>var(--bg-color)<\/code>&nbsp;on&nbsp;<code>::selection<\/code>&nbsp;or some other visually restrictive element.<\/p>\n<h2 id=\"how-to-randomly-animate-an-element-along-another-element\">How to randomly animate an element along another element<\/h2>\n<p>Chris Coyier demonstrated&nbsp;<a href=\"https:\/\/blog.master.dev\/randomly-place-an-element-along-edge-of-another-element\/\" rel=\"nofollow noopener\">how to&nbsp;<code>random()<\/code>ly animate an element along the edge of another element<\/a>. There\u2019s a cute doggo, by the way. Probably should\u2019ve led with that.<\/p>\n<p>Polypane explained&nbsp;<a href=\"https:\/\/polypane.app\/blog\/the-root-scroller-and-how-not-to-lose-it\/\" rel=\"nofollow noopener\">how we might disable the root scroller accidentally<\/a>&nbsp;(which is surprisingly easy to do \u2014 I\u2019ve definitely done it), what we lose in doing so, and what to do instead.<\/p>\n<p>Also, have you ever completely misunderstood how the root (<code>:root<\/code>\/<code>html<\/code>) works? This is a solid explainer for that, too.<\/p>\n<h2 id=\"how-to-disable-the-doubletaptozoomin-functionality\">How to disable the double-tap-to-zoom-in functionality<\/h2>\n<p>Speaking of accidents, have you ever tapped on a target twice,&nbsp;<em>apparently<\/em>&nbsp;in quick succession, and ended up zooming in? Andy Bell revealed that&nbsp;<a href=\"https:\/\/piccalil.li\/blog\/stop-buttons-triggering-zoom-when-theyre-double-tapped\/\" rel=\"nofollow noopener\"><code>touch-action: manipulation<\/code>&nbsp;disables the double-tap-to-zoom-in functionality<\/a>. It isn\u2019t new, but I don\u2019t see many web developers using it. One for the CSS reset, I think?<\/p>\n<h2 id=\"new-web-platform-features-and-updates\">New web platform features and updates<\/h2>\n<p>Chrome and Firefox now ship every two weeks. The inaugural releases were fairly exciting (not smaller, as I assumed they\u2019d be). In addition, Safari 27 (along with iOS, iPadOS, and macOS 27) shipped with some of the same features as Firefox, making them Baseline in the same release window. High fives all around!<\/p>\n<ul>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Firefox\/Releases\/155\" rel=\"nofollow noopener\">Firefox 155<\/a>\n<ul>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Reference\/Values\/color_value\/alpha\" rel=\"nofollow noopener\"><code>alpha()<\/code><\/a> (now Baseline)<\/li>\n<li><a href=\"https:\/\/css-tricks.com\/almanac\/functions\/p\/progress\/\"><code>progress()<\/code><\/a> (now Baseline)<\/li>\n<li>Advanced <a href=\"https:\/\/css-tricks.com\/almanac\/functions\/a\/attr\/\"><code>attr()<\/code><\/a> (now Baseline)<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developer.chrome.com\/release-notes\/153\" rel=\"nofollow noopener\">Chrome 153<\/a>\n<ul>\n<li><a href=\"https:\/\/nerdy.dev\/css-scroll-axis-lock\" rel=\"nofollow noopener\"><code>scroll-axis-lock<\/code><\/a> (no Safari or Firefox support)<\/li>\n<li><a href=\"https:\/\/developer.chrome.com\/blog\/usermedia-html-element#the_roadmap_ahead\" rel=\"nofollow noopener\"><code>&lt;camera&gt;<\/code><\/a> (no Safari or Firefox support)<\/li>\n<li><a href=\"https:\/\/developer.chrome.com\/blog\/usermedia-html-element#the_roadmap_ahead\" rel=\"nofollow noopener\"><code>&lt;microphone&gt;<\/code><\/a> (no Safari or Firefox support)<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/webkit.org\/blog\/18325\/webkit-features-for-safari-27-0\/\" rel=\"nofollow noopener\">Safari 27<\/a>\n<ul>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Reference\/Values\/revert-rule\" rel=\"nofollow noopener\"><code>revert-rule<\/code><\/a> (now Baseline)<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Reference\/Values\/color_value\/alpha\" rel=\"nofollow noopener\"><code>alpha()<\/code><\/a> (now Baseline)<\/li>\n<li><a href=\"https:\/\/css-tricks.com\/almanac\/functions\/p\/progress\/\"><code>progress()<\/code><\/a> (now Baseline)<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Reference\/Values\/color_value\/light-dark#:~:text=\/*%20image%20url%20values%20*\/%0Alight%2Ddark(%0A%20%20url(%22light%2Dicon.png%22)%2C%0A%20%20url(%22dark%2Dicon.png%22)%0A)%3B\" rel=\"nofollow noopener\"><code>light-dark()<\/code><\/a> image values (now Baseline)<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/img#auto_3\" rel=\"nofollow noopener\"><code>sizes=auto<\/code><\/a> (now Baseline)<\/li>\n<li>3+ color values for <a href=\"https:\/\/css-tricks.com\/almanac\/functions\/c\/color-mix\/\"><code>color-mix()<\/code><\/a> (no Chrome support)<\/li>\n<li><a href=\"https:\/\/css-tricks.com\/the-siren-song-of-arianotify\/\"><code>ariaNotify<\/code><\/a> (no Chrome support)<\/li>\n<li><a href=\"https:\/\/css-tricks.com\/we-completely-missed-width-height-stretch\/\"><code>stretch<\/code><\/a> (no Firefox support)<\/li>\n<li><a href=\"https:\/\/www.bram.us\/2025\/11\/20\/anchor-positioning-is-transform-aware-in-chrome-144\/\" rel=\"nofollow noopener\">Transform-aware anchor positioning<\/a> (no Firefox support)<\/li>\n<li><a href=\"https:\/\/css-tricks.com\/abusing-customizable-selects\/\">Customizable <code>&lt;select&gt;<\/code><\/a> (no Firefox support)<\/li>\n<li><a href=\"https:\/\/css-tricks.com\/almanac\/functions\/h\/heading\/\"><code>:heading<\/code><\/a> (no Chrome or Firefox support)<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developer.chrome.com\/release-notes\/154\" rel=\"nofollow noopener\">Chrome 154<\/a>\n<ul>\n<li><a href=\"https:\/\/css-tricks.com\/text-decoration-inset-is-like-padding-for-text-decorations\/\"><code>text-decoration-inset<\/code><\/a>&nbsp;(no Safari support)<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Reference\/Properties\/frame-sizing\" rel=\"nofollow noopener\"><code>frame-sizing<\/code><\/a>&nbsp;(no Safari or Firefox support)<\/li>\n<li><a href=\"https:\/\/developer.chrome.com\/release-notes\/154#css_scroll-marker-group_modes\" rel=\"nofollow noopener\"><code>scroll-marker-group<\/code>&nbsp;modes<\/a>&nbsp;(no Safari or Firefox support)<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Firefox\/Releases\/157\" rel=\"nofollow noopener\">Firefox 157<\/a>\n<ul>\n<li><a href=\"https:\/\/www.bram.us\/2026\/03\/15\/at-rule\/\" rel=\"nofollow noopener\"><code>at-rule()<\/code><\/a>&nbsp;(no Safari support)<\/li>\n<li><a href=\"https:\/\/drafts.csswg.org\/css-overscroll-1\/#overscroll-shorthand\" rel=\"nofollow noopener\"><code>overscroll-behavior: chain<\/code><\/a>&nbsp;(no Safari support)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>And, as always, thanks for tuning in!<\/p>\n<\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Fuente: <a href=\"https:\/\/css-tricks.com\/whats-important-19\/\">Art\u00edculo original<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2014 Leon ._. (@leonarnott.bsky.social) 13:02 \u00b7 Sep 17, 2026 Again, three simple steps: Register&nbsp;&#8211;bg-color&nbsp;using&nbsp;@property Animate&nbsp;&#8211;bg-color\u2019s value using&nbsp;@keyframes Declare&nbsp;\u2014bg-color: inherit&nbsp;on&nbsp;::selection And that\u2019s it, really. Simply use&nbsp;var(&#8211;bg-color)&nbsp;on&nbsp;::selection&nbsp;or some other visually restrictive element. How to randomly animate an element along another element Chris Coyier demonstrated&nbsp;how to&nbsp;random()ly animate an element along the edge of another element. There\u2019s a cute [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6437,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"webixso_pending_account_ids":""},"categories":[42],"tags":[],"class_list":["post-6438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-csstricks"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/6438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/comments?post=6438"}],"version-history":[{"count":0,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/6438\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media\/6437"}],"wp:attachment":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media?parent=6438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/categories?post=6438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/tags?post=6438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}