Skip to content

Commit cf76306

Browse files
committed
fix
1 parent 6e3369d commit cf76306

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

apps/svelte.dev/src/lib/components/ModalDropdown.svelte

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@
7777
>
7878
<summary class="raised icon" aria-label={label}><Icon name="menu" /></summary>
7979

80-
<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions (handled by <svelte:window>) -->
81-
<div class="modal-background" onclick={() => (open = false)}></div>
82-
8380
<div class="contents" use:trap>
8481
{@render children()}
8582
</div>
@@ -100,13 +97,15 @@
10097
}
10198
10299
summary {
100+
position: absolute;
103101
display: flex;
104102
align-items: center;
105103
justify-content: center;
106104
user-select: none;
107105
}
108106
109-
.modal-background {
107+
details[open] summary::before {
108+
content: '';
110109
position: fixed;
111110
left: 0;
112111
top: 0;
@@ -120,7 +119,7 @@
120119
.contents {
121120
position: absolute;
122121
z-index: 9999;
123-
background: white;
122+
background: var(--sk-bg-2);
124123
padding: 1rem;
125124
border-radius: var(--sk-border-radius);
126125
filter: var(--sk-shadow);
@@ -133,7 +132,7 @@
133132
color: var(--sk-fg-3);
134133
line-height: 1;
135134
background-size: 1.8rem;
136-
z-index: 999;
135+
z-index: 9999;
137136
}
138137
139138
.icon:hover,

0 commit comments

Comments
 (0)