Add an option for letting confetti fall through the bottom of the viewport.
Review Request #15094 — Created June 5, 2026 and submitted
This adds an option to remove the bottom of the viewport as a mandatory platform. When this is set, pieces will fall through the bottom of the viewport instead of landing on it. This is useful when adding confetti to pages that have a vertical scroll, when you scroll the confetti ends up looking like its floating on the page. This change also switches the position of the canvas that holds the confetti from fixed to absolute, so that confetti sticks onto the platform it landed on when the page scrolls, instead of being sticky to the viewport when scrolling.
Saw that behavior was normal with the option disabled, and that
confetti falls through the the bottom of the viewport when the option
is set.
| Summary | ID |
|---|---|
| 0451acc5a4463427526f1a9307f20206b5ffc6c0 |
| Description | From | Last Updated |
|---|---|---|
|
Can you check what happens if confetti is triggered when the scroll position is not at the top? |
|
|
|
It's generally nice to keep flags in a positive state, like floorEnabled, so that it's consistent what a true or … |
|
|
|
Would it make sense to conditionally create or not create #floor based on the flag, and then check that instead? |
|
|
|
Can you alphabetize here? |
|
|
|
This could just become } else if (...) { and save a level of nesting. |
|
|
|
At this point, floor is null. This ends up being a no-op, and we'll continue processing it, accelerating forever off-canvas. … |
|
-
-
It's generally nice to keep flags in a positive state, like
floorEnabled, so that it's consistent what atrueor afalsemeans. Can we invert this one?This should also sort alphabetically below the
ms. -
Would it make sense to conditionally create or not create
#floorbased on the flag, and then check that instead?
- Commits:
-
Summary ID 531a04c9b941e660c7014ca2a1ff7f2bbca7689e 67b9f80e14ace73e400dcae2a89dae8527bd4e3e - Diff:
-
Revision 2 (+114 -46)
Checks run (2 succeeded)
- Commits:
-
Summary ID 67b9f80e14ace73e400dcae2a89dae8527bd4e3e 0451acc5a4463427526f1a9307f20206b5ffc6c0 - Diff:
-
Revision 3 (+122 -50)