How to avoid empty color box?

I found an empty color box would appear at the end of a page if the space is not enough for a whole box. Here is an example:

#set quote(block: true)
// show quote: set pad(left: 2em)
#show quote: set block(
  fill: luma(230),
  width: 100%,
  inset: 5pt,
  radius: 5pt,
)

#lorem(630)

#quote[
  This is a quote.
]

It looks like:


How can I avoid the empty box in the first page?

Set sticky parameter:

#set quote(block: true)
// show quote: set pad(left: 2em)
#show quote: set block(
  fill: luma(230),
  width: 100%,
  inset: 5pt,
  radius: 5pt,
  sticky: true,
)

#lorem(630)

#quote[
  This is a quote.
]
1 Like

The sticky parameter worked but it also prevented the box from being split across pages. Sometimes a flexible box will be better. I just want to avoid the weird blank line in the box.