1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4739],{68982:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>l});var s=n(85893),i=n(11151);const r={sidebar_position:10,description:"Determine if a content is styled (i.e.",toc_max_heading_level:2},o="is-styled",c={id:"reference/utils/is-styled",title:"is-styled",description:"Determine if a content is styled (i.e.",source:"@site/docs/reference/utils/is-styled.mdx",sourceDirName:"reference/utils",slug:"/reference/utils/is-styled",permalink:"/docs/reference/utils/is-styled",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10,description:"Determine if a content is styled (i.e.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"is-sequence",permalink:"/docs/reference/utils/is-sequence"},next:{title:"is-space",permalink:"/docs/reference/utils/is-space"}},d={},l=[{value:"it : <TypeLink></TypeLink>",id:"it",level:3}];function a(e){const t={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",strong:"strong",...(0,i.a)(),...e.components},{Param:n,Parameters:r,Signature:o,SignatureName:c,SignatureParam:d,SourceLink:l,TypeLink:a}=t;return n||p("Param",!0),r||p("Parameters",!0),o||p("Signature",!0),c||p("SignatureName",!0),d||p("SignatureParam",!0),l||p("SourceLink",!0),a||p("TypeLink",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"is-styled",children:"is-styled"}),"\n",(0,s.jsx)(o,{children:(0,s.jsxs)("code",{children:[(0,s.jsx)(c,{children:"is-styled"}),"(",(0,s.jsx)(d,{children:(0,s.jsx)(t.a,{href:"#it",children:"it"})}),")",(0,s.jsx)(l,{href:"https://github.com/touying-typ/touying/blob/main/src/utils.typ#L261"})]})}),"\n",(0,s.jsxs)(t.p,{children:["Determine if a content is styled (i.e. wrapped by Typst's internal styled element when ",(0,s.jsx)(t.code,{children:"set"})," or ",(0,s.jsx)(t.code,{children:"show"})," rules are applied)."]}),"\n",(0,s.jsxs)(t.p,{children:["Example: ",(0,s.jsx)(t.code,{children:"is-styled(text(fill: red)[Red])"})," returns ",(0,s.jsx)(t.code,{children:"true"})]}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsxs)(t.h3,{id:"it",children:["it : ",(0,s.jsx)(a,{type:"content"})]}),(0,s.jsx)(n,{children:(0,s.jsx)(t.p,{children:"The content to check."})})]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Returns:"})," ",(0,s.jsx)(a,{type:"bool"})]})]})}function u(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}function p(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>o});var s=n(67294);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.