square元素元素元素函数可用set和show规则自定义样式。
元素
元素函数可用
set和show规则自定义样式。A square with optional content.
Example
// Without content.
#square(size: 40pt)
// With content.
#square[
Automatically \
sized to fit.
]

参数参数参数是传给函数的输入,写在函数名后的括号中。
参数
参数是传给函数的输入,写在函数名后的括号中。
square(size:,,,fill:,,,,,)->The square's side length. This is mutually exclusive with width and
height.
默认值:auto
The square's width. This is mutually exclusive with size and height.
In contrast to size, this can be relative to the parent container's
width.
默认值:auto
The square's height. This is mutually exclusive with size and width.
In contrast to size, this can be relative to the parent container's
height.
默认值:auto
radius可用set规则可用set规则可用set规则设置参数,更改后续调用时的默认值。
radius可用set规则
可用set规则
可用
set规则设置参数,更改后续调用时的默认值。How much to round the square's corners. See the rectangle's documentation for more details.
默认值:0pt
inset可用set规则可用set规则可用set规则设置参数,更改后续调用时的默认值。
inset可用set规则
可用set规则
可用
set规则设置参数,更改后续调用时的默认值。How much to pad the square's content. See the box's documentation for more details.
默认值:5pt
outset可用set规则可用set规则可用set规则设置参数,更改后续调用时的默认值。
outset可用set规则
可用set规则
可用
set规则设置参数,更改后续调用时的默认值。How much to expand the square's size without affecting the layout. See the box's documentation for more details.
默认值:0pt