Animate address bar dropdown with motion design tokens
Categories
(Firefox :: Address Bar, enhancement, P2)
Tracking
()
People
(Reporter: nsharpley, Assigned: nsharpley)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-post-nova])
Attachments
(1 external file)
Using the new design tokens in the Nova motion prototype, update the animations for the address bar dropdown upon opening and closing.
Prototype: https://nova-motion-spec.netlify.app/
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
The view unrolls out of the input over --address-bar-transition-enter and
collapses back over --address-bar-transition-exit, with the rows fading on
--address-bar-content-delay; box-shadow is in neither transition list, so
the joint background's shadow snaps rather than being interpolated.
The exit cannot be expressed in CSS. Transitioning a popover out needs it
to stay rendered and in the top layer while it animates, which is what
overlay with allow-discrete is for, and Gecko implements neither half of
that: overlay is not a property, and Document::HidePopover drops the
element with an unconditional RemovePopoverFromTopLayer rather than the
spec's deferred request. So by the time a CSS exit could run, the view is
out of the top layer and has stopped matching :popover-open, which takes
position: fixed, the anchor positioning and the open max-height with it;
holding display with allow-discrete only keeps an unpainted box inside
open, under popover-closing, and calls hidePopover() only once the run
has finished. That also keeps popover-open on the input for the length
of the collapse, so the input's chrome and the view close as one surface.
max-height needs JS for a second reason: its open value is the room the
view may take rather than the room it takes, and with no interpolate-size
or calc-size() there is no way to animate to a content-determined size.
A run left to that value spends itself above the view's own height, where
it changes nothing, and then crosses it in a single frame, so
run to a measured height.
padding-block-start runs alongside max-height because the view's block
padding sits inside its border box, and padding is never reduced to fit a
max-height. max-height: 0 therefore floors the used border box at the
padding rather than closing it, which left the collapse stalled at the
padding's height for the tail of the run and then snapping the remainder
away as the popover hid. The two are not separate animations so much as
what collapsing this box amounts to.
Updated•21 days ago
|
Updated•19 days ago
|
Updated•15 days ago
|
Updated•15 days ago
|
Description
•