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

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