{"route":"/en-US-v0.13.1/reference/text/strike/","title":"Strikethrough","description":"Documentation for the `strike` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-stroke","name":"stroke","children":[]},{"id":"parameters-offset","name":"offset","children":[]},{"id":"parameters-extent","name":"extent","children":[]},{"id":"parameters-background","name":"background","children":[]},{"id":"parameters-body","name":"body","children":[]}]}],"body":{"kind":"func","content":{"path":[],"name":"strike","title":"Strikethrough","keywords":[],"oneliner":"Strikes through text.","element":true,"contextual":false,"deprecation":null,"details":"<p>Strikes through text.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code>This is <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">[</span>not<span class=\"typ-punct\">]</span> relevant.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/8189864734cb2541923731f3119141de.png\" alt=\"Preview\"></div></div>","example":null,"self":false,"params":[{"name":"stroke","details":"<p>How to <a href=\"/en-US-v0.13.1/reference/visualize/stroke/\" title=\"stroke\">stroke</a> the line.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, takes on the text's color and a thickness defined in\nthe current font.</p>\n<p><em>Note:</em> Please don't use this for real redaction as you can still copy\npaste the text.</p>","example":"<div class=\"previewed-code\"><pre><code>This is <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>stroke<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.5pt</span> <span class=\"typ-op\">+</span> red<span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>very stricken through<span class=\"typ-punct\">]</span>. <span class=\"typ-escape\">\\</span>\nThis is <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>stroke<span class=\"typ-punct\">:</span> <span class=\"typ-num\">10pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>redacted<span class=\"typ-punct\">]</span>.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/cf96e26cbdace6727d460e5d550728e5.png\" alt=\"Preview\"></div></div>","types":["auto","length","color","gradient","stroke","tiling","dictionary"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"offset","details":"<p>The position of the line relative to the baseline. Read from the font\ntables if <code><span class=\"typ-key\">auto</span></code>.</p>\n<p>This is useful if you are unhappy with the offset your font provides.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>font<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Inria Serif&quot;</span><span class=\"typ-punct\">)</span>\nThis is <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>offset<span class=\"typ-punct\">:</span> <span class=\"typ-key\">auto</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>low-ish<span class=\"typ-punct\">]</span>. <span class=\"typ-escape\">\\</span>\nThis is <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>offset<span class=\"typ-punct\">:</span> <span class=\"typ-op\">-</span><span class=\"typ-num\">3.5pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>on-top<span class=\"typ-punct\">]</span>.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/d4e11d77bfdfd0e135abff2328454799.png\" alt=\"Preview\"></div></div>","types":["auto","length"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"extent","details":"<p>The amount by which to extend the line beyond (or within if negative)\nthe content.</p>","example":"<div class=\"previewed-code\"><pre><code>This <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>extent<span class=\"typ-punct\">:</span> <span class=\"typ-op\">-</span><span class=\"typ-num\">2pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>skips<span class=\"typ-punct\">]</span> parts of the word.\nThis <span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>extent<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>extends<span class=\"typ-punct\">]</span> beyond the word.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/12a783f0ebc265e7a2f246c8f13e53d0.png\" alt=\"Preview\"></div></div>","types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">0pt</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"background","details":"<p>Whether the line is placed behind the content.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>stroke<span class=\"typ-punct\">:</span> red<span class=\"typ-punct\">)</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>background<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>This is behind.<span class=\"typ-punct\">]</span> <span class=\"typ-escape\">\\</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">strike</span><span class=\"typ-punct\">(</span>background<span class=\"typ-punct\">:</span> <span class=\"typ-key\">false</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>This is in front.<span class=\"typ-punct\">]</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/e41cc1fba2e5beb8482cdf79d7ed8ab9.png\" alt=\"Preview\"></div></div>","types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">false</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"body","details":"<p>The content to strike through.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}}}