A newly inserted notice can appear abruptly even when its CSS includes a transition. A transition needs a previous value to move from, and a newly rendered element may not have the before-change style you expected. The @starting-style rule supplies a starting point for that situation.
MDN’s reference explains how the rule participates in transitions when an element first receives rendered styles. It is different from an animation with a sequence of keyframes: the ordinary style still defines the destination.
A notice whose default state is visible
.notice {
opacity: 1;
transition: opacity 180ms ease-out;
}
@starting-style {
.notice { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.notice { transition: none; }
}
Here the notice finishes at full opacity. When it is newly rendered in a supporting browser, the starting rule can provide zero opacity as the beginning of the transition. The starting rule follows the ordinary rule because normal cascade considerations, including source order at equal specificity, still matter.
The example assumes the notice is inserted as rendered content. It deliberately avoids the additional requirements involved in transitioning display states. Keep those mechanisms separate when learning the feature so a failure has fewer possible causes.
Check the content before judging the motion
Test that the notice remains readable when transitions are disabled and when the browser does not support the starting rule. Then test the preferred reduced-motion setting. The message should not depend on an animation completing before it becomes understandable.
Also inspect repeated insertion. Replacing a whole notice element can produce a different experience from updating the text of an existing element. Choose the behaviour that fits the interaction rather than adding motion simply because a rule is available.
A useful final review is to trigger the notice while concentrating on the task it supports. If the fade makes you wait to read a result, shorten it or remove it. Entry styling should make a state change legible while leaving the message itself in control.

