<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Stacking Context on Nalar</title>
    <link>https://nalar.dev/tags/stacking-context/</link>
    <description>Recent content in Stacking Context on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 04 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/stacking-context/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Debug CSS z-index with Stacking Contexts</title>
      <link>https://nalar.dev/debug-css-z-index-with-stacking-contexts/</link>
      <pubDate>Fri, 04 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/debug-css-z-index-with-stacking-contexts/</guid>
      <description>&lt;p&gt;A &lt;code&gt;z-index&lt;/code&gt; bug often looks irrational. You give a menu &lt;code&gt;z-index: 9999&lt;/code&gt;, yet a header still covers it. Increasing the number to &lt;code&gt;999999&lt;/code&gt; changes nothing. The natural conclusion is that &lt;code&gt;z-index&lt;/code&gt; is unreliable.&lt;/p&gt;&#xA;&lt;p&gt;It is not. The mistake is usually comparing numbers that belong to different &lt;strong&gt;stacking contexts&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A stacking context is a local coordinate system for painting overlapping elements. Descendants are ordered inside that context, and then the entire context participates as one unit in its parent&amp;rsquo;s stacking order. A child with a huge &lt;code&gt;z-index&lt;/code&gt; cannot escape a parent that is painted below a sibling context.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
