<?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/%E6%8C%87%E4%BB%A4/</link><description>Recent content in 指令 on BenzHub</description><generator>Hugo</generator><language>zh-TW</language><lastBuildDate>Wed, 05 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://benzhub.github.io/tags/%E6%8C%87%E4%BB%A4/index.xml" rel="self" type="application/rss+xml"/><item><title>TailwindCSS 指令與函式全解析：@import、@layer、@apply、@utility 與 theme()/--alpha() 完整教學 | TailwindCSS 完整教學</title><link>https://benzhub.github.io/post/tailwindcss/005-directives-functions/</link><pubDate>Wed, 05 Aug 2026 00:00:00 +0000</pubDate><guid>https://benzhub.github.io/post/tailwindcss/005-directives-functions/</guid><description>&lt;blockquote&gt;
&lt;p&gt;在 &lt;strong&gt;TailwindCSS&lt;/strong&gt; v4 裡，指令（directives）與函式（functions）是你在 CSS 檔案裡「動用」設計系統的工具箱。從一行 &lt;strong&gt;&lt;code&gt;@import &amp;quot;tailwindcss&amp;quot;&lt;/code&gt;&lt;/strong&gt; 載入整套框架，到用 &lt;strong&gt;&lt;code&gt;@layer&lt;/code&gt;&lt;/strong&gt; 控制優先級、&lt;strong&gt;&lt;code&gt;@apply&lt;/code&gt;&lt;/strong&gt; 提取 utility、&lt;strong&gt;&lt;code&gt;@utility&lt;/code&gt;&lt;/strong&gt; 定義自訂 utility、&lt;strong&gt;&lt;code&gt;@custom-variant&lt;/code&gt;&lt;/strong&gt; 造出新變體，再到 &lt;code&gt;theme()&lt;/code&gt;、&lt;code&gt;--alpha()&lt;/code&gt;、&lt;code&gt;--spacing()&lt;/code&gt; 這些函式取用 Token——這篇是 &lt;strong&gt;TailwindCSS 完整教學&lt;/strong&gt; 系列的第五篇，帶你一次看懂 v4 的指令與函式語彙，並標註它與 v3 的關鍵差異。&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>