<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Selector on Commentary of Takao</title><link>https://takao.blog/en/tags/selector/</link><description>Recent content in Selector on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sat, 13 Jun 2026 23:11:50 +0900</lastBuildDate><atom:link href="https://takao.blog/en/tags/selector/index.xml" rel="self" type="application/rss+xml"/><item><title>Creative CSS Recipes with Parent Selector :has()</title><link>https://takao.blog/en/web/css-has-pseudo-selector-recipes/</link><pubDate>Tue, 10 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/css-has-pseudo-selector-recipes/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Creative CSS Recipes with Parent Selector :has()" /&gt;&lt;h2 id="creative-css-recipes-with-parent-selector-has"&gt;Creative CSS Recipes with Parent Selector &lt;code&gt;:has()&lt;/code&gt;
&lt;/h2&gt;&lt;p&gt;For years, CSS developers dreamed of a &lt;strong&gt;parent selector&lt;/strong&gt; — a way to style an element based on its children. JavaScript and extra class names were the only workarounds. Then came &lt;code&gt;:has()&lt;/code&gt;, the CSS pseudo-class that finally makes &amp;ldquo;if this element contains X, style it accordingly&amp;rdquo; a native reality.&lt;/p&gt;
&lt;p&gt;As of 2026, &lt;code&gt;:has()&lt;/code&gt; is supported in all major browsers, opening a world of markup simplification and creative styling without touching JavaScript.&lt;/p&gt;</description></item></channel></rss>