fix dropdown fade by moving transition to higher-specificity selector
The .fade transition (one class) was being overridden by a later .dropdown-menu rule (also one class) that set transition to only background-color. Moving the opacity transition into .dropdown-menu.fade (two classes) ensures it wins regardless of cascade order. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b066d5cd12
commit
149004f267
@@ -90,16 +90,14 @@
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
margin-top: 0;
|
||||
transition: opacity 0.5s ease, background-color 0.2s ease;
|
||||
-webkit-transition: opacity 0.5s ease, background-color 0.2s ease;
|
||||
}
|
||||
.show > .dropdown-menu.fade,
|
||||
.dropdown-menu.fade.show {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
.fade {
|
||||
transition: opacity 0.5s ease;
|
||||
-webkit-transition: opacity 0.5s ease; /* Safari */
|
||||
}
|
||||
/* Show dropdown on hover AND keyboard focus (WCAG 2.1.1) */
|
||||
.dropdown:hover .dropdown-menu,
|
||||
.dropdown:focus-within .dropdown-menu {
|
||||
|
||||
Reference in New Issue
Block a user