You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#18 added a schema for the Typst builtin type "stroke". But most of the time stroke arguments accept either one of stroke, length, color or dict. Similarly fill usually accepts color, gradient or pattern.
There should be types to support this, since those are very common use-cases in Typst.
A lot of these will be getting coercions in a future update. Most likely it will be in the form of additionally accepted types followed by a default post-transform.
#18 added a schema for the Typst builtin type "stroke". But most of the time
stroke
arguments accept either one ofstroke
,length
,color
ordict
. Similarlyfill
usually acceptscolor
,gradient
orpattern
.There should be types to support this, since those are very common use-cases in Typst.
I suggest these compound types:
strokes
:z.either(z.stroke(), z.length(), z.color(), z.dictionary( (thickness: z.length(optional:true), ...) ))
fill
:z.either(z.color(), z.gradient(), z.pattern())
(pattern
is still missing as a base-type, I think)inset
:z.either(z.length(), z.dictionary( (x: z.length(optional:true), ...) ))
I probably missed some.
The text was updated successfully, but these errors were encountered: