Loading...
@starting-style {
dialog[open] { opacity: 0; }
}
dialog[open] {
opacity: 1;
transition: opacity 0.3s;
}dialog[open] {
opacity: 1;
transition: opacity 0.3s;
}
@starting-style {
dialog[open] { opacity: 0; }
}@starting-style has no extra specificity, so it must come after the normal rule or the normal rule overrides it.
@starting-style before the normal rule, so the normal rule overrides it.display isn't transitioned with 'allow-discrete'.@starting-style holds the before-open values, while the normal rule holds the open state.display: none transition display with transition-behavior: allow-discrete.overlay with 'allow-discrete'.@media (prefers-reduced-motion: reduce).Transitions only run when a value changes. A newly shown element has no previous style, so @starting-style provides one.
It is not needed for them. @keyframes animations already run when an element appears; @starting-style is for transitions.
Yes. Inside a rule, @starting-style { opacity: 0; } applies to the element the rule matches.