---
title: "The opportunities offered by CSS's if()"
publication: "Frontend Focus"
issue: 700
published_at: "2025-07-09"
canonical_url: "https://frontendfoc.us/issues/700"
---

Plus exploring stacking popovers. |       

Together with [![WorkOS\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_514,h_98/e_make_transparent/co_white,e_outline:9/tdfxwgk852ui9leli4wm.png)](https://workos.com/blog/radar?utm_source=cpff&utm_medium=newsletter&utm_campaign=q22025)        

🚀 **Frontend** Focus 

#​700 — July 9, 2025 | [Read on the web](https://frontendfoc.us/issues/700)      

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1752063792/yhuyagm43dcjnbae2ti1.png)](https://developer.chrome.com/blog/if-article)  

[CSS Conditionals with the New `if()` Function](https://developer.chrome.com/blog/if-article) — The `if` function opens up a slew of architectural opportunities for CSS. Here’s a look at how we can now use such inline conditionals along with `media`, `supports`, and `style` queries – [in Chrome 137+](https://caniuse.com/?search=if%28%29) at least, though support should grow given the [CSS WG's consensus](https://lea.verou.me/blog/2024/css-conditionals/) on the feature. Demos and code aplenty. 

Una Kravets   

❇️ Talking of `if()`, [here's a fun demo from YongSeok Jang](https://yongsk0066.github.io/css_if_logic_gate/) showing how it can be used to illustrate logic gates with just CSS.  

['We Studied 100 Dev Tool Landing Pages, Here’s What Really Works in 2025'](https://evilmartians.com/chronicles/we-studied-100-devtool-landing-pages-here-is-what-actually-works-in-2025) — You're bound to find a takeaway or two from here that will prove useful – a good roundup of modern day landing pages, even. 

Anton Lovchikov   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/96463cb3.png)](https://workos.com/blog/radar?utm_source=cpff&utm_medium=newsletter&utm_campaign=q22025) 

[Login Is Just the Start. Protect Your Flow from Real Threats](https://workos.com/blog/radar?utm_source=cpff&utm_medium=newsletter&utm_campaign=q22025) — Block bots, brute force attacks, and free trial abuse before they hit your app. AuthKit gives you a fully hosted, customizable login UI with SSO, MFA, and more. Add Radar for real-time threat prevention. Trusted by fast-moving teams like Cursor. 

WorkOS sponsor   

[CSS Intelligence: Speculating on the Future of a Smarter Language](https://www.smashingmagazine.com/2025/07/css-intelligence-speculating-future-smarter-language/) — Thanks to a growing number of ‘logical powers’, Gabriel explores how CSS is evolving to be something of a smarter language. His post looks at where things are heading, asks if things are becoming too complex, and prods at how developers are reacting to this shift. 

Gabriel Shoyombo     

⚡️ IN BRIEF 

- 🙋 Ahead of this year's State of HTML survey, Lea Verou [wants to know which upcoming features](https://lea.verou.me/blog/2025/design-state-of-html/) are on your radar.
- 💨 The Microsoft Edge team has [reached a major milestone](https://blogs.windows.com/msedgedev/2025/07/07/microsoft-edge-sets-a-new-standard-for-speed-and-responsiveness/) of achieving a global First Contentful Paint (FCP) below 300ms.
- 📍 Let's Encrypt has issued its [first certificate for an IP address](https://letsencrypt.org/2025/07/01/issuing-our-first-ip-address-certificate/), an option they're now slowing rolling out over the rest of the year.
- 🌈 Think you know RGB? [Here's a pop quiz, hot shot](https://maxwellito.github.io/do-you-know-rgb/).      

📙 Articles, Opinions & Tutorials  

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1752064711/kxydjciyaptwedrhztpq.png)](https://una.im/popover-hint/)  

[What is `popover=hint`?](https://una.im/popover-hint/) — The `hint` popover type arrived earlier this year, and here Una breaks it down, complete with animated visuals showing the stacking ability in action, and code examples. Una notes features such as this “_make building layered UI elements that are currently really hard to implement much easier_”. 

Una Kravets   

[Better CSS Shapes Using `shape()`: `close` and `move`](https://css-tricks.com/better-css-shapes-using-shape-part-4-close-and-move/) — Temani wraps up their great series on getting the most out of the `shape()` function, this time by focusing in on two commands that you’ll likely rarely use, but are “_incredibly useful when you need them_”. 

Temani Afif   

[Server-Side Support for MCP in Next.js](https://go.clerk.com/Tu4GcSI) — Multitenancy in Next.js is now one API call away. Scorecard slashed 1,000 LOC to 70 using Clerk’s new support. 

Clerk sponsor   

[How to Create Kinetic Image Animations with _React Three Fiber_](https://tympanus.net/codrops/2025/07/09/how-to-create-kinetic-image-animations-with-react-three-fiber/) — A fantastic visual effect for the Web (which can [try live here](https://tympanus.net/Tutorials/KineticImages/)) that’s explained in technical detail. It’s amazing with [React Three Fiber](https://r3f.docs.pmnd.rs/getting-started/introduction) pull off and might inspire you to have a play for yourself. 

Dominik Fojcik   

⚛️ The link above comes [via the _React Status_ newsletter](https://react.statuscode.com). If you've any interest in the React ecosystem, then it's well worth a look.  

[Custom 3D Models in Mapbox: A Step-by-Step Guide](https://bleech.de/en/blog/custom-3d-models-in-mapbox/) — Niche, but potentially very useful for specific custom mapping situations. 
Mykola Chernyshevskyi   

[Automating Frontend Accessibility with Storybook 9](https://storybook.js.org/blog/the-accessibility-pipeline-for-frontend-teams/) 
Dominic Nguyen   

['Tailwind is the Worst Form of CSS, Except for all the Others'](https://www.mux.com/blog/tailwind-is-the-worst-form-of-css-except-for-all-the-others) 
Darius Cepulis   

[Design Guidelines for Better Notifications UX](https://www.smashingmagazine.com/2025/07/design-guidelines-better-notifications-ux/) 
Vitaly Friedman    

🧰 Tools, Code & Resources   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/vgh1v6w5i2jck3fof1vj.jpg)](https://github.com/zachleat/line-numbers)  

[line-numbers: A Web Component to Add Line Numbers Next to Various HTML Elements](https://github.com/zachleat/line-numbers) — Useful for custom apps that show source code or other snippets that require line numbering. See [examples](https://zachleat.github.io/line-numbers/demo.html) here, which demonstrate the flexibility customization options for the line numbering. 

Zach Leatherman   

[SurveyJS: JavaScript Libraries that Help You Build & Render Surveys & Forms on the Client](https://surveyjs.io/?utm_source=frontend&utm_medium=email&utm_campaign=q3_2025) — SurveyJS provides JSON schemas of your forms to capture responses easily and send them to your own backend API (Node.js, .NET, PHP, etc.). 

SurveyJS sponsor   

[Monorail: Turn CSS Keyframe Animations into an Interactive Graph](https://muffinman.io/monorail/) — A potentially useful visualization for something you might not inherently get a feel for otherwise. Play with the demo on the main page to get the idea. 

Stanko   

[snapDOM 1.8: Captures DOM Nodes as Images](https://zumerlab.github.io/snapdom/) — A rapidly maturing, fast and accurate DOM-to-image capture mechanism to capture any HTML element as a scalable SVG image, preserving styles, fonts, background images, etc. The homepage is packed with examples. 

ZumerLab   [![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1752065446/qfiretfbavzhhtu5bkuq.png)](https://www.vecto3d.xyz/) 

[Vecto3d: A Tools to Convert SVGs to 3D Models](https://www.vecto3d.xyz/) — There are some example SVG logos you can try it out with (_such as the Octocat here_). Includes a number of customization options to play with the look (texture, bevel, etc), and you can export in different formats. [Repo here](https://github.com/lakshaybhushan/vecto3d). 

Lakshay Bhushan   

[CSS to Tailwind Converter: Convert CSS Gradients to Tailwind Classes](https://www.fronti.tech/) — Paste your CSS code and the tool will generate the Tailwind-compatible version. Supports linear, radial, and conic gradients and there’s a [gradient library](https://www.fronti.tech/gradient-lab) of ready-to-use snippets. 

Jack Higar      

📰 Classifieds   

📌 Deploy with [PinMe](https://bit.ly/45Kvoex%20): Host Your Front-End Without Servers. No sign-up. No cost. 

--- 

⚡️ Add lightning-fast barcode & QR scanning to your web app with [STRICH](https://strich.io/?ref=frontend-focus), a sleek JS library. Clear, predictable pricing. [Free trial and demo!](https://strich.io/?ref=frontend-focus)      

[URL to Any: An All-in-One Conversion Tool](https://www.urltoany.com/) — This tool lets you convert or extract the content of a page by entering the URL. Will convert to Markdown, HTML, PDF, image, JSON, XML, or plain text. 

URL to Any   

[Spark: Advanced 3D Gaussian Splatting Renderer for Three.js](https://sparkjs.dev/) — [Visual examples.](https://sparkjs.dev/examples/) 
World Labs Technologies, Inc.    

📬 

**Got a new email address?** You can [change your email here](https://frontendfoc.us/edit_subscription/*|UID|*). 

--- 

**Bored of us?** Click [here to stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll take a look. 

--- 

Published by Cooper Press Ltd.
Curated by [Chris Brandrick](https://bsky.app/profile/brandrick.bsky.social) & [Peter Cooper](https://twitter.com/cooperx86).
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*)  

[Ipx.](https://frontendfoc.us/open/700/*|UID|*?ipx=t)
