doc: add badges. 51c4d2a719

This commit is contained in:
jaywcjlove
2022-12-03 06:55:51 +00:00
parent 5ff8fe0d42
commit f83e18ad98
14 changed files with 111 additions and 40 deletions

View File

@@ -5,7 +5,8 @@
<title>Electron 备忘清单
&#x26; electron cheatsheet &#x26; Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta description="此快速参考备忘单提供了 Electron v21 API 说明和使用示例
<meta description="此快速参考备忘单提供了 Electron v21 API 说明和使用示例
<!--rehype:style=padding-top: 12px;-->
入门,为开发人员分享快速参考备忘单。">
<meta keywords="electron,reference,Quick,Reference,cheatsheet,cheat,sheet">
@@ -32,7 +33,12 @@
<path d="M256.2 96.32a32.23 32.23 0 0 0 26.53-13.81c17.89 11.69 34 35 45.81 66.12 13 34.39 19.84 75.38 19.84 118.54 0 37.18-5.19 72.35-15 103.6a9.72 9.72 0 0 0 .66 7.49 9.82 9.82 0 0 0 5.8 4.84 9.89 9.89 0 0 0 12.34-6.44c10.42-33.14 15.93-70.34 15.93-109.49 0-47.17-7.77-91.77-22.47-129-14.41-36.48-34.13-62.4-57.14-75.16a32.3 32.3 0 1 0-32.3 33.31Zm0-44.66a12.5 12.5 0 1 1-12.59 12.5 12.56 12.56 0 0 1 12.59-12.5Zm-5.2 191.7a24.35 24.35 0 0 0 5.16 48.16 24.68 24.68 0 0 0 5.16-.55A24.36 24.36 0 1 0 251 243.36Z"></path>
</svg>
<a aria-hidden="true" tabindex="-1" href="#electron-备忘清单"><span class="icon icon-link"></span></a>Electron 备忘清单</h1><div class="wrap-body">
<p>此快速参考备忘单提供了 Electron v21 API 说明和使用示例。</p>
<p><a href="https://www.npmjs.com/package/electron"><img src="https://img.shields.io/npm/v/electron.svg?style=flat" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/electron"><img src="https://img.shields.io/npm/dm/electron.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/electron/electron/network/dependents"><img src="https://badgen.net/github/dependents-repo/electron/electron" alt="Repo Dependents"></a>
<a href="https://github.com/electron/electron"><img src="https://badgen.net/badge/icon/Github?icon=github&#x26;label" alt="Github repo"></a></p>
<p style="padding-top: 12px;">此快速参考备忘单提供了 Electron v21 API 说明和使用示例</p>
<!--rehype:style=padding-top: 12px;-->
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#快速开始">快速开始</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#创建你的应用程序">创建你的应用程序</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#关闭所有窗口时退出应用">关闭所有窗口时退出应用</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#创建无边框窗口">创建无边框窗口</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#自定义标题栏样式">自定义标题栏样式</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#控制红绿灯-macos">控制红绿灯 (macOS)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#通过预加载脚本从渲染器访问-nodejs">通过预加载脚本从渲染器访问 Node.js</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#将的-processversions-对象暴露给渲染器">将的 process.versions 对象暴露给渲染器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#启用拼写检查器">启用拼写检查器</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#app">app</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#事件绑定方法使用示例">事件绑定方法使用示例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#方法">方法</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#启动时激活主实例窗口的示例">启动时激活主实例窗口的示例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#事件">事件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#属性">属性</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#browserwindow">BrowserWindow</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#参数">参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#实例事件">实例事件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#实例方法">实例方法</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#静态方法">静态方法</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#实例属性">实例属性</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">

View File

@@ -6,6 +6,7 @@
&#x26; htmx cheatsheet &#x26; Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta description="适合初学者的综合 htmx 备忘清单
<!--rehype:style=padding-top: 12px;-->
入门,为开发人员分享快速参考备忘单。">
<meta keywords="htmx,reference,Quick,Reference,cheatsheet,cheat,sheet">
@@ -29,26 +30,28 @@
</button><script src="../js/dark.js"></script><a href="https://github.com/jaywcjlove/reference" class="" target="__blank"><svg viewBox="0 0 16 16" fill="currentColor" height="1em" width="1em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a></div></div></nav><div class="wrap h1body-exist max-container"><header class="wrap-header h1wrap"><h1 id="-htmx-备忘清单"><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
<path d="M107.946667 838.4l57.173333 23.893333v-385.28l-103.68 250.026667c-17.493333 43.52 3.413333 93.44 46.506667 111.36z m832-157.866667L728.32 169.813333a85.888 85.888 0 0 0-77.226667-52.48c-11.093333 0-22.613333 1.706667-33.706666 6.4L302.933333 253.866667a85.290667 85.290667 0 0 0-46.08 110.933333l211.626667 510.72a85.248 85.248 0 0 0 110.933333 46.08l314.026667-130.133333a85.077333 85.077333 0 0 0 46.506667-110.933334zM336.213333 373.333333c-23.466667 0-42.666667-19.2-42.666666-42.666666s19.2-42.666667 42.666666-42.666667 42.666667 19.2 42.666667 42.666667-19.2 42.666667-42.666667 42.666666z m-85.333333 469.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h61.866667l-147.2-355.84v270.506667z"></path>
</svg><a aria-hidden="true" tabindex="-1" href="#-htmx-备忘清单"><span class="icon icon-link"></span></a>&#x3C;/> htmx 备忘清单</h1><div class="wrap-body">
<p>适合初学者的综合 <a href="https://htmx.org/">htmx</a> 备忘清单</p>
<p><a href="https://npmjs.org/package/htmx.org"><img src="https://img.shields.io/npm/v/htmx.org.svg?style=flat" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/htmx.org"><img src="https://img.shields.io/npm/dm/htmx.org.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/bigskysoftware/htmx/network/dependents"><img src="https://badgen.net/github/dependents-repo/bigskysoftware/htmx" alt="Repo Dependents"></a>
<a href="https://github.com/bigskysoftware/htmx"><img src="https://badgen.net/badge/icon/Github?icon=github&#x26;label" alt="Github repo"></a></p>
<p style="padding-top: 12px;">适合初学者的综合 <a href="https://htmx.org/">htmx</a> 备忘清单</p>
<!--rehype:style=padding-top: 12px;-->
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#快速开始">快速开始</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#点击编辑提交">点击编辑提交</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#删除行">删除行</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#延迟加载">延迟加载</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#api-参考">API 参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#核心属性参考">核心属性参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#附加属性参考">附加属性参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#css-类参考">CSS 类参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#事件参考">事件参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#javascript-api-参考">JavaScript API 参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#请求标头参考">请求标头参考</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#响应标头参考">响应标头参考</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="快速开始"><a aria-hidden="true" tabindex="-1" href="#快速开始"><span class="icon icon-link"></span></a>快速开始</h3><div class="wrap-body">
<p><a href="https://htmx.org/">htmx</a><a href="http://intercoolerjs.org/">intercooler.js</a> 的继承者</p>
<pre class="language-html"><code class="language-html code-highlight"><span class="code-line"><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://unpkg.com/htmx.org@1.8.4<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;/</span>script</span><span class="token punctuation">></span></span>
<pre class="wrap-text"><code class="language-html code-highlight"><span class="code-line"><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://unpkg.com/htmx.org@1.8.4<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;/</span>script</span><span class="token punctuation">></span></span>
</span><span class="code-line"><span class="token comment">&#x3C;!-- 有一个按钮POST通过AJAX点击 --></span>
</span><span class="code-line"><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;</span>button</span> <span class="token attr-name">hx-post</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/clicked<span class="token punctuation">"</span></span> <span class="token attr-name">hx-swap</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>outerHTML<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
</span><span class="code-line"> 点击我
</span><span class="code-line"><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;/</span>button</span><span class="token punctuation">></span></span>
</span></code></pre>
<!--rehype:className=wrap-text-->
<p><code>hx-post</code><code>hx-swap</code> 属性告诉 <code>htmx</code></p>
<blockquote>
<p>当用户单击此按钮时,向 <code>/clicked</code> 发出 <code>AJAX</code> 请求,并用响应替换整个按钮</p>
</blockquote>
<hr>
<p><a href="https://npmjs.org/package/htmx.org"><img src="https://img.shields.io/npm/v/htmx.org.svg?style=flat" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/htmx.org"><img src="https://img.shields.io/npm/dm/htmx.org.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/bigskysoftware/htmx/network/dependents"><img src="https://badgen.net/github/dependents-repo/bigskysoftware/htmx" alt="Repo Dependents"></a></p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line">$ <span class="token function">npm</span> <span class="token function">install</span> htmx.org
</span></code></pre>
<p>安装 <code>htmx</code> 将导入添加到您的 <code>index.js</code></p>

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,8 @@
<title>Less 备忘清单
&#x26; lessjs cheatsheet &#x26; Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta description="本备忘单旨在快速理解 Less 所涉及的主要概念,显示了它的常用方法使用清单
<meta description="本备忘单旨在快速理解 Less 所涉及的主要概念,显示了它的常用方法使用清单
<!--rehype:style=padding-top: 12px;-->
入门,为开发人员分享快速参考备忘单。">
<meta keywords="lessjs,reference,Quick,Reference,cheatsheet,cheat,sheet">
@@ -28,7 +29,11 @@
</svg>
</button><script src="../js/dark.js"></script><a href="https://github.com/jaywcjlove/reference" class="" target="__blank"><svg viewBox="0 0 16 16" fill="currentColor" height="1em" width="1em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a></div></div></nav><div class="wrap h1body-exist max-container"><header class="wrap-header h1wrap"><h1 id="less-备忘清单"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em" viewBox="0 0 210 90">
<path d="M201.009375,32.7796875 C201.009375,26.053125 202.059375,22.0828125 202.059375,14.8640625 C202.059375,3.6421875 197.925,0.0328125 188.770313,0.0328125 L182.04375,0.0328125 L182.04375,7.9734375 L184.110938,7.9734375 C188.770313,7.9734375 189.7875,9.515625 189.7875,15.225 C189.7875,20.5734375 189.2625,25.921875 189.2625,32.1234375 C189.2625,40.0640625 191.854687,43.1484375 197.00625,44.3625 L197.00625,44.8875 C191.821875,46.1015625 189.2625,49.1859375 189.2625,57.1265625 C189.2625,63.328125 189.7875,68.3484375 189.7875,74.025 C189.7875,79.8984375 188.573437,81.440625 184.110938,81.440625 L184.110938,81.6046875 L182.04375,81.6046875 L182.04375,89.8734375 L188.770313,89.8734375 C197.892188,89.8734375 202.059375,86.2640625 202.059375,75.0421875 C202.059375,67.6265625 201.009375,63.8203125 201.009375,57.1265625 C201.009375,53.5171875 203.240625,49.7109375 209.967187,49.3828125 L209.967187,40.425 C203.240625,40.1953125 201.009375,36.3890625 201.009375,32.7796875 Z M166.359375,43.2796875 C161.175,41.2125 156.351562,39.9984375 156.351562,36.553125 C156.351562,33.9609375 158.41875,32.41875 162.225,32.41875 C166.03125,32.41875 169.476562,33.9609375 173.25,36.7171875 L180.140625,27.5953125 C175.842187,24.3140625 169.96875,20.86875 162.028125,20.86875 C150.314063,20.86875 142.373438,27.5953125 142.373438,37.078125 C142.373438,45.5109375 149.789063,49.8421875 155.990625,52.2375 C161.339063,54.3046875 166.523438,56.04375 166.523438,59.4890625 C166.523438,62.08125 164.45625,63.7875 159.796875,63.7875 C155.498438,63.7875 151.167188,62.0484375 146.507813,58.4390625 L139.617188,68.446875 C144.801563,72.7453125 152.709375,75.6984375 159.271875,75.6984375 C173.053125,75.6984375 180.46875,68.446875 180.46875,58.9640625 C180.46875,49.48125 173.085938,45.5109375 166.359375,43.2796875 L166.359375,43.2796875 Z M48.5953125,62.7703125 C47.38125,62.7703125 45.8390625,61.7203125 45.8390625,58.471875 L45.8390625,7.10542736e-15 L21.3609375,7.10542736e-15 C12.0421875,7.10542736e-15 7.9078125,3.609375 7.9078125,14.83125 C7.9078125,22.246875 8.9578125,26.38125 8.9578125,32.746875 C8.9578125,36.35625 6.7265625,40.1625 -6.99440506e-15,40.490625 L-6.99440506e-15,49.4484375 C6.7265625,49.6125 8.9578125,53.41875 8.9578125,57.028125 C8.9578125,63.39375 7.9078125,67.2 7.9078125,74.615625 C7.9078125,85.8375 12.0421875,89.446875 21.196875,89.446875 L27.9234375,89.446875 L27.9234375,81.50625 L25.85625,81.50625 C21.5578125,81.50625 20.1796875,79.7671875 20.1796875,74.090625 C20.1796875,68.4140625 20.7046875,63.5578125 20.7046875,57.1921875 C20.7046875,49.2515625 18.1125,46.1671875 12.9609375,44.953125 L12.9609375,44.428125 C18.1453125,43.2140625 20.7046875,40.1296875 20.7046875,32.1890625 C20.7046875,25.9875 20.1796875,20.9671875 20.1796875,15.290625 C20.1796875,9.6140625 21.39375,8.0390625 25.85625,8.0390625 L30.4828125,8.0390625 L30.4828125,57.5203125 C30.4828125,68.053125 34.0921875,74.94375 44.625,74.94375 C47.90625,74.94375 50.4984375,74.41875 52.36875,73.7296875 L50.6296875,62.5078125 C49.6125,62.7703125 49.1203125,62.7703125 48.5953125,62.7703125 Z M124.621875,43.2796875 C119.273437,41.2125 114.45,39.9984375 114.45,36.553125 C114.45,33.9609375 116.517187,32.41875 120.323437,32.41875 C124.129687,32.41875 127.575,33.9609375 131.348437,36.7171875 L138.239062,27.5953125 C133.940625,24.3140625 128.067187,20.86875 120.126562,20.86875 C108.4125,20.86875 100.471875,27.5953125 100.471875,37.078125 C100.471875,45.5109375 107.8875,49.8421875 114.089062,52.2375 C119.4375,54.3046875 124.621875,56.04375 124.621875,59.4890625 C124.621875,62.08125 122.554687,63.7875 117.895312,63.7875 C113.596875,63.7875 109.265625,62.0484375 104.60625,58.4390625 L97.8796875,68.446875 C103.064062,72.7453125 110.971875,75.6984375 117.534375,75.6984375 C131.315625,75.6984375 138.731358,68.446875 138.731358,58.9640625 C138.764062,49.48125 131.348437,45.5109375 124.621875,43.2796875 Z M73.7625,20.7046875 C61.1625,20.7046875 49.1203125,31.2375 49.4484375,47.775 C49.4484375,64.8375 60.6703125,74.8453125 75.46875,74.8453125 C81.6703125,74.8453125 88.5609375,72.6140625 93.909375,68.971875 L88.725,59.85 C84.91875,62.08125 81.309375,63.13125 77.503125,63.13125 C70.6125,63.13125 65.2640625,59.85 63.8859375,51.909375 L95.1234375,51.909375 C95.2875,50.6953125 95.6484375,48.3 95.6484375,45.54375 C95.8453125,31.565625 88.2328125,20.7046875 73.7625,20.7046875 L73.7625,20.7046875 Z M63.91875,42.4265625 C64.96875,35.5359375 69.103125,32.2546875 73.9265625,32.2546875 C80.128125,32.2546875 82.55625,36.553125 82.55625,42.4265625 L63.91875,42.4265625 L63.91875,42.4265625 Z" transform="translate(.033 .08)"></path></svg><a aria-hidden="true" tabindex="-1" href="#less-备忘清单"><span class="icon icon-link"></span></a>Less 备忘清单</h1><div class="wrap-body">
<p>本备忘单旨在快速理解 <a href="https://github.com/less/less.js">Less</a> 所涉及的主要概念,显示了它的常用方法使用清单。</p>
<p><a href="https://npmjs.org/package/less"><img src="https://img.shields.io/npm/v/less.svg?style=flat" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/less"><img src="https://img.shields.io/npm/dm/less.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/less/less.js"><img src="https://badgen.net/badge/icon/Github?icon=github&#x26;label" alt="Github repo"></a></p>
<p style="padding-top: 12px;">本备忘单旨在快速理解 <a href="https://github.com/less/less.js">Less</a> 所涉及的主要概念,显示了它的常用方法使用清单</p>
<!--rehype:style=padding-top: 12px;-->
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#介绍">介绍</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#变量variables">变量(Variables)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#混合mixins">混合(Mixins)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#嵌套nesting">嵌套(Nesting)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#父选择器-">父选择器 &#x26;</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#规则嵌套和冒泡">@规则嵌套和冒泡</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#运算operations">运算(Operations)</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#calc-特例">calc() 特例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#转义escaping">转义(Escaping)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#函数functions">函数(Functions)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#命名空间和访问符">命名空间和访问符</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#映射maps">映射(Maps)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#作用域scope">作用域Scope</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#注释comments">注释Comments</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#导入importing">导入Importing</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#extend">Extend</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#函数">函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#逻辑函数-if--boolean">逻辑函数 if &#x26; boolean</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#字符串函数">字符串函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#替换字符串-replace">替换字符串 replace</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#length">length</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#extract">extract</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#range">range</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#each">each</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#each-1">each()</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#使用-range-和-each-创建一个-for-循环">使用 range 和 each 创建一个 for 循环</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#数学函数">数学函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#颜色定义函数">颜色定义函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#类型函数">类型函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#杂项函数">杂项函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#颜色通道函数">颜色通道函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#色彩运算函数">色彩运算函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#颜色混合功能">颜色混合功能</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,8 @@
<title>Sass
&#x26; sass cheatsheet &#x26; Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta description="这是一份快速参考备忘单,列出了 SASS 最有用的功能
<meta description="这是一份快速参考备忘单,列出了 SASS 最有用的功能
<!--rehype:style=padding-top: 12px;-->
Sass 基础,为开发人员分享快速参考备忘单。">
<meta keywords="sass,reference,Quick,Reference,cheatsheet,cheat,sheet">
@@ -30,7 +31,12 @@ Sass 基础,为开发人员分享快速参考备忘单。">
<path d="M55.094 35.56a13.19 13.19 0 0 0-5.8 1.35c-.6-1.188-1.2-2.225-1.3-3-.113-.9-.25-1.45-.113-2.525s.763-2.6.763-2.725c-.012-.113-.138-.663-1.425-.675s-2.4.25-2.525.588a14.36 14.36 0 0 0-.538 1.913c-.225 1.175-2.575 5.338-3.913 7.526-.438-.85-.813-1.6-.888-2.2-.113-.9-.25-1.45-.113-2.525s.763-2.6.763-2.725c-.012-.113-.138-.663-1.425-.675s-2.4.25-2.525.588-.263 1.138-.538 1.913c-.263.775-3.388 7.726-4.2 9.538-.413.925-.775 1.663-1.038 2.163s-.012.038-.037.088l-.35.663v.012c-.175.313-.363.613-.45.613-.062 0-.188-.838.025-1.988.463-2.413 1.588-6.176 1.575-6.313 0-.062.213-.725-.725-1.063-.913-.338-1.238.225-1.313.225s-.138.2-.138.2 1.013-4.238-1.938-4.238c-1.85 0-4.4 2.013-5.663 3.85l-6.376 3.488-.138-.15C11.178 35.66 4.565 32.96 4.84 27.835c.1-1.863.75-6.776 12.7-12.726 9.788-4.875 17.627-3.538 18.99-.563 1.938 4.25-4.188 12.15-14.364 13.29-3.875.438-5.913-1.063-6.426-1.625-.538-.588-.613-.613-.813-.5-.325.175-.125.7 0 1.013.3.788 1.55 2.188 3.675 2.888 1.863.613 6.413.95 11.914-1.175 6.163-2.388 10.976-9.013 9.563-14.55-1.438-5.638-10.788-7.488-19.627-4.35C15.19 11.41 9.5 14.334 5.4 18.172.515 22.722-.26 26.698.064 28.348c1.138 5.888 9.25 9.726 12.5 12.564l-.45.25c-1.625.8-7.813 4.038-9.363 7.463-1.75 3.875.275 6.663 1.625 7.038 4.175 1.163 8.45-.925 10.763-4.363 2.3-3.438 2.025-7.9.963-9.938l-.038-.075 1.275-.75a74.573 74.573 0 0 1 2.35-1.325c-.4 1.088-.688 2.375-.838 4.25-.175 2.2.725 5.05 1.913 6.176.525.488 1.15.5 1.538.5 1.375 0 2-1.138 2.688-2.5.85-1.663 1.6-3.588 1.6-3.588s-.938 5.213 1.625 5.213c.938 0 1.875-1.213 2.3-1.838v.012s.025-.038.075-.125c.1-.15.15-.238.15-.238v-.025c.375-.65 1.213-2.138 2.463-4.6 1.613-3.175 3.163-7.15 3.163-7.15s.15.975.613 2.575c.275.95.875 1.988 1.338 3l-.6.825.012.013a35.62 35.62 0 0 1-.988 1.25c-1.275 1.525-2.8 3.263-3 3.763-.238.588-.188 1.025.275 1.375.338.25.938.3 1.575.25 1.15-.075 1.95-.363 2.35-.538a8.14 8.14 0 0 0 2.025-1.063c1.25-.925 2.013-2.238 1.938-3.988-.038-.963-.35-1.913-.738-2.813l.338-.5c1.975-2.888 3.5-6.063 3.5-6.063s.15.975.613 2.575c.238.813.713 1.7 1.138 2.575-1.85 1.513-3.013 3.263-3.413 4.413-.738 2.125-.163 3.088.925 3.313.488.1 1.188-.125 1.713-.35a7.76 7.76 0 0 0 2.163-1.113c1.25-.925 2.45-2.213 2.388-3.95-.038-.8-.25-1.588-.538-2.338 1.575-.65 3.613-1.025 6.2-.713 5.563.65 6.663 4.125 6.45 5.575s-1.375 2.25-1.763 2.5c-.388.238-.513.325-.475.5.05.263.225.25.563.2.463-.075 2.925-1.188 3.025-3.863.15-3.438-3.113-7.188-8.9-7.15zM12.19 50.025c-1.838 2.013-4.425 2.775-5.525 2.125-1.188-.688-.725-3.65 1.538-5.788 1.375-1.3 3.163-2.5 4.338-3.238l1.138-.688c.075-.05.125-.075.125-.075.088-.05.188-.113.288-.175.838 3.05.038 5.725-1.9 7.838zm13.44-9.138c-.638 1.563-1.988 5.575-2.8 5.35-.7-.188-1.125-3.225-.138-6.226.5-1.513 1.563-3.313 2.188-4.013 1.013-1.125 2.113-1.5 2.388-1.038.325.6-1.238 4.95-1.638 5.926zm11.088 5.3c-.275.138-.525.238-.638.163-.088-.05.113-.238.113-.238s1.388-1.488 1.938-2.175l1.088-1.388v.15c0 1.8-1.725 3-2.5 3.488zm8.55-1.95c-.2-.15-.175-.613.5-2.063.263-.575.863-1.538 1.9-2.45.125.375.2.738.188 1.075-.013 2.25-1.613 3.088-2.588 3.438z"></path>
</svg>
<a aria-hidden="true" tabindex="-1" href="#sass"><span class="icon icon-link"></span></a>Sass</h1><div class="wrap-body">
<p>这是一份快速参考备忘单,列出了 <a href="https://sass-lang.com">SASS</a> 最有用的功能。</p>
<p><a href="https://www.npmjs.com/package/sass"><img src="https://img.shields.io/npm/v/sass.svg?style=flat" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/sass"><img src="https://img.shields.io/npm/dm/sass.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/sass/dart-sass/network/dependents"><img src="https://badgen.net/github/dependents-repo/sass/dart-sass" alt="Repo Dependents"></a>
<a href="https://github.com/sass/dart-sass"><img src="https://badgen.net/badge/icon/Github?icon=github&#x26;label" alt="Github repo"></a></p>
<p style="padding-top: 12px;">这是一份快速参考备忘单,列出了 <a href="https://sass-lang.com">SASS</a> 最有用的功能</p>
<!--rehype:style=padding-top: 12px;-->
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-基础">Sass 基础</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#介绍">介绍</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#变量">变量</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#字符串插值">字符串插值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#注释">注释</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#extend">Extend</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#嵌套nesting">嵌套(Nesting)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#模块片段">模块(片段)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#混合mixins">混合(Mixins)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#import">@import</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-混合mixins">Sass 混合(Mixins)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#参数">参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#默认值">默认值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#默认变量">默认变量</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-颜色函数">Sass 颜色函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#rgba">rgba</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#mixing">Mixing</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#修改-hsla">修改 HSLA</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#获取值">获取值</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#hsla">HSLA</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#rgb">RGB</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#sass-内置了对颜色值的支持">Sass 内置了对颜色值的支持</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#调整">调整</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-其他函数">Sass 其他函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#字符串">字符串</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#numbers">Numbers</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#units">Units</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#units-1">Units</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#misc">Misc</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-功能检查">Sass 功能检查</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#功能检查">功能检查</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#功能">功能</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-循环">Sass 循环</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#for-循环">For 循环</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#each-循环简单">Each 循环(简单)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#each-循环嵌套">Each 循环(嵌套)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#while-循环">While 循环</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#sass-其它功能">Sass 其它功能</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#条件句">条件句</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#插值">插值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#列表">列表</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#maps">Maps</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="sass-基础"><a aria-hidden="true" tabindex="-1" href="#sass-基础"><span class="icon icon-link"></span></a>Sass 基础</h2><div class="wrap-body">

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,8 @@
<title>Stylus 备忘清单
&#x26; stylus cheatsheet &#x26; Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta description="本备忘单旨在快速理解 stylus 所涉及的主要概念,显示了它的常用方法使用清单
<meta description="本备忘单旨在快速理解 stylus 所涉及的主要概念,显示了它的常用方法使用清单
<!--rehype:style=padding-top: 12px;-->
入门,为开发人员分享快速参考备忘单。">
<meta keywords="stylus,reference,Quick,Reference,cheatsheet,cheat,sheet">
@@ -30,7 +31,12 @@
<path d="M9.864 42.916c1.66-1.986 1.855-4.036.57-7.844-.814-2.4-2.165-4.264-1.172-5.76 1.058-1.595 3.304-.05 1.432 2.083l.374.26c2.246.26 3.353-2.816 1.676-3.694-4.427-2.3-8.3 2.132-6.6 7.275.732 2.18 1.758 4.492.928 6.33-.716 1.58-2.1 2.506-3.027 2.54-1.937.098-.65-4.345 1.58-5.452.195-.098.472-.228.212-.553-2.75-.3-4.362.96-5.3 2.734-2.702 5.16 5.126 7.063 9.3 2.083zM58.2 27.748c.635 1.562 1.595 3.108 1.025 4.476-.472 1.172-1.1 1.66-1.774 1.774-.96.163-.7-2.848.944-3.743.146-.08.358-.472.163-.7-2.083-.114-3.255.88-3.9 2.197-1.84 3.857 4.166 4.915 7.112 1.123 1.172-1.514 1.22-3 .098-5.73-.716-1.725-1.806-3-1.123-4.15.732-1.204 2.5-.163 1.172 1.448l.293.163c1.7.098 2.4-2.18 1.107-2.75-3.434-1.465-6.64 2.23-5.126 5.9zM36.456 23.63c-1.188-.944-4.524.635-5.468 2.978-1.188 2.978-2.946 7.324-4.67 9.228-1.823 2.002-2.002.456-1.823-.7.423-2.718 3.076-9.016 4.524-10.8-.537-.797-4.052-.684-6.494 3.108-.9 1.432-2.995 6.2-5.306 9.96-.505.814-1.14.244-.65-1.66.553-2.197 2.18-8.235 4.28-12.987 5.5-1.1 11.343-1.855 15.82-1.872.602-.163 1-.7 0-.732-3.857-.13-9.65.325-15.07 1 1.04-2.063 2.163-3.733 3.3-4.433-1.237-.78-3.743-.472-5.175 1.644-.635.944-1.27 2.083-1.872 3.32-3.97.618-7.372 1.318-9.098 1.97-1.8.684-1.595 2.848-.505 2.44 2.262-.846 5.322-1.725 8.723-2.506-2.165 4.882-3.857 10.644-4.264 12.987-1 5.696 2.523 5.664 4.248 3.418 1.872-2.457 5.777-11.1 6.38-12 .18-.3.423-.146.293.13-4.362 8.707-3.987 12.076-.456 11.327 1.595-.342 4.345-3.076 5.06-4.492.146-.342.456-.3.4-.163-2.767 7.177-6.282 12.987-8.642 14.8-2.148 1.644-3.743-1.92 3.857-7.03 1.123-.765.602-1.806-.667-1.448-3.922.618-15.152 4.183-20.083 7.6-.374.26-.716.472-.7 1 .016.3.553.195.814.033 6.38-3.825 11.604-5.322 17.593-6.575.08.033.18.05.26.016.277-.065.26.08.08.195-.407.228-.814.44-.9.472-4.036 1.58-6.477 5.06-5.615 6.835.732 1.53 4.687.976 6.56-.033 4.6-2.5 7.926-7.372 10.204-14.1 1.986-5.973 4.492-12.743 5.078-12.938zM63.13 37.415c-7.47-.976-23.582.325-30.694 2.213-2.116.553-1.53 1.676-.456 1.465.016 0 .472-.114.488-.114 5.843-1.14 20.018-2.132 28.285-.553.993.18 3.97-2.8 2.376-3zm-24.6-.88c2.083-1.042 5.175-7.486 7.2-11.018.146-.26.407-.05.26.13-5.143 8.853-2.962 9.88-.928 9.748 2.718-.163 5.224-4.07 5.777-4.947.228-.342.358-.065.228.18-.13.407-.602 1.123-1.042 2.1-.618 1.383.033 1.92.57 2.165.846.407 3.157.146 3.515-1.27-2.3-.05 3.222-10.953 3.792-11.62-1.546-.895-3.938.08-5.03 2.23-2.327 4.606-4.28 8.316-5.5 8.38-2.376.13 2.734-10.27 3.564-10.595-.505-.732-3.743-.423-5.55 2.376-.65 1-4.622 8.04-5.598 9.195-1.725 2.05-1.855.293-1.367-1.758.163-.7.44-1.595.797-2.588 1.14-2.57 2.36-3.385 3.108-4.215 5.03-5.582 7.9-10.107 6.77-11.88-1-1.58-4.378-.88-6.542 2.376-3.987 5.973-7.665 14.16-8.137 17.902-.456 3.743 2.262 4.02 4.1 3.108zm2.116-10.953c.18-.407.293-.52.602-1.204 1.8-3.938 4.036-8.088 5.582-10.025.96-1 2.3.358-.13 4.1a37.625 37.625 0 0 1-4.834 6.038c-.456.52-.863.944-1.042 1.188-.13.163-.277.13-.18-.098z"></path>
</svg>
<a aria-hidden="true" tabindex="-1" href="#stylus-备忘清单"><span class="icon icon-link"></span></a>Stylus 备忘清单</h1><div class="wrap-body">
<p>本备忘单旨在快速理解 <a href="https://github.com/stylus/stylus">stylus</a> 所涉及的主要概念,显示了它的常用方法使用清单。</p>
<p><a href="https://npmjs.org/package/stylus"><img src="https://img.shields.io/npm/v/stylus.svg?style=flat" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/stylus"><img src="https://img.shields.io/npm/dm/stylus.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/stylus/stylus/network/dependents"><img src="https://badgen.net/github/dependents-repo/stylus/stylus" alt="Repo Dependents"></a>
<a href="https://github.com/stylus/stylus"><img src="https://badgen.net/badge/icon/Github?icon=github&#x26;label" alt="Github repo"></a></p>
<p style="padding-top: 12px;">本备忘单旨在快速理解 <a href="https://github.com/stylus/stylus">stylus</a> 所涉及的主要概念,显示了它的常用方法使用清单</p>
<!--rehype:style=padding-top: 12px;-->
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#介绍">介绍</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#支持-css-嵌套语法">支持 CSS 嵌套语法</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#支持类-python-缩进语法">支持类 python 缩进语法</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#混合-mixins">混合 Mixins</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#变量-variables">变量 Variables</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#混合-mixins-1">混合 Mixins</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#没有参数">没有参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#有参数">有参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#参数默认值">参数默认值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#块混合">块混合</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#rest-参数">Rest 参数</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#函数-functions">函数 Functions</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#函数-functions-1">函数 Functions</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#参数默认值-1">参数默认值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#命名参数">命名参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#多个返回值">多个返回值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#arguments">arguments</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#hash-示例">hash 示例</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#值-values">值 Values</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#条件赋值">条件赋值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#属性查找">属性查找</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#插值">插值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#color-operators">Color operators</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#casting">Casting</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#lookup">Lookup</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#高级功能">高级功能</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#有条件的">有条件的</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#对于循环">对于循环</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#定义检查">定义检查</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#false-值">False 值</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#类型检查">类型检查</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#内置函数">内置函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#颜色函数">颜色函数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#图片尺寸">图片尺寸</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#缓存-caching">缓存 Caching</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#embed-url">Embed URL</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#添加属性">添加属性</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#sprintf">sprintf</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">