<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Selectors on Nalar</title>
    <link>https://nalar.dev/tags/selectors/</link>
    <description>Recent content in Selectors on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 02 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/selectors/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Practical Conditional Styling with the CSS :has() Selector</title>
      <link>https://nalar.dev/practical-conditional-styling-with-css-has-selector/</link>
      <pubDate>Wed, 02 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/practical-conditional-styling-with-css-has-selector/</guid>
      <description>&lt;p&gt;CSS traditionally selects an element from information about that element or its ancestors. The &lt;code&gt;:has()&lt;/code&gt; relational pseudo-class adds a different capability: an element can match according to relative selectors evaluated from that element.&lt;/p&gt;&#xA;&lt;p&gt;This makes many parent-aware and sibling-aware styles possible without adding state classes solely for presentation. The useful mental model is not &amp;ldquo;select the parent,&amp;rdquo; but &amp;ldquo;select this element if a related element matches a condition.&amp;rdquo;&lt;/p&gt;&#xA;&lt;h2 id=&#34;read-has-from-the-outside-in&#34;&gt;Read :has() from the outside in&lt;/h2&gt;&#xA;&lt;p&gt;Consider a card that should use a different layout when it contains a direct image child:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
