Skip to content

Commit d08304e

Browse files
authored
Add floating menu to example
1 parent 8245b85 commit d08304e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

examples/index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
<meta charset="utf-8" />
55
<title>text-expander demo</title>
66
<style>
7-
[aria-selected='true'] {
8-
background: #eee;
7+
.menu {
8+
position: absolute;
9+
list-style-type: none;
10+
padding: 0;
11+
background: lightgray;
12+
13+
[aria-selected='true'] {
14+
background: #eee;
15+
}
916
}
1017
</style>
1118
</head>
@@ -30,6 +37,7 @@ <h2>Multiword text-expander element</h2>
3037
const {key, provide, text} = event.detail
3138
if (key === '#') {
3239
const menu = document.createElement('ul')
40+
menu.classList.add('menu')
3341
menu.role = 'listbox'
3442
for (const issue of [
3543
'#1 Implement a text-expander element',

0 commit comments

Comments
 (0)