Difference between inset and outset?

I’m trying to understand the difference between “inset” and “outset” in a box or a block ?

  • Exemple 1 : inset
#box(fill: red, inset: (x: 10pt, y: 10pt), outset: (x: 0pt, y:0pt), stroke: 2pt)[My red box.]

RedBox

  • Exemple 2 : outset
#box(fill: blue, inset: (x: 0pt, y: 0pt), outset: (x: 10pt, y:10pt), stroke: 2pt)[My blue box.]

BlueBox

What is the difference ?

Could you provide examples and explanations ?

Thanks a lot.

Outset does not affect layout, inset does.
see here: Typst
grafik

2 Likes