<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>類別偵測 on BenzHub</title><link>https://benzhub.github.io/tags/%E9%A1%9E%E5%88%A5%E5%81%B5%E6%B8%AC/</link><description>Recent content in 類別偵測 on BenzHub</description><generator>Hugo</generator><language>zh-TW</language><lastBuildDate>Mon, 03 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://benzhub.github.io/tags/%E9%A1%9E%E5%88%A5%E5%81%B5%E6%B8%AC/index.xml" rel="self" type="application/rss+xml"/><item><title>TailwindCSS 類別偵測機制：內容掃描、safelist 與動態 class 陷阱完整解析 | TailwindCSS 完整教學</title><link>https://benzhub.github.io/post/tailwindcss/003-class-detection/</link><pubDate>Mon, 03 Aug 2026 00:00:00 +0000</pubDate><guid>https://benzhub.github.io/post/tailwindcss/003-class-detection/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TailwindCSS&lt;/strong&gt; 最讓新手困惑的一件事，往往是「我明明寫了 class，樣式卻憑空消失」。答案藏在它的&lt;strong&gt;類別偵測（class detection）&lt;strong&gt;機制裡——Tailwind 靠的是&lt;/strong&gt;內容掃描（content scanning）&lt;/strong&gt;，一種字串層級的搜尋，而不是執行你的程式碼。這是 &lt;strong&gt;TailwindCSS 完整教學&lt;/strong&gt; 系列的第三篇，帶你看懂掃描器怎麼「讀」你的原始碼，並徹底避開 &lt;code&gt;text-${color}&lt;/code&gt; 這類動態拼接的陷阱。&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>