Skip to content

Commit 30f3c0c

Browse files
committed
Fix menu z-index
1 parent af377d6 commit 30f3c0c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

apps/components_guide_web/assets/css/app.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
--link--color: var(--theme-primary, currentColor);
1616
--link--decoration: none;
1717
--link--decoration--hover: initial;
18+
19+
--z-menu: 50;
1820
}
1921

2022
a:not([class]) {
@@ -276,7 +278,7 @@ details[open] summary[aria-haspopup="menu"]:before {
276278
right: 0;
277279
bottom: 0;
278280
left: 0;
279-
z-index: 80;
281+
z-index: calc(var(--z-menu) - 1);
280282
display: block;
281283
cursor: default;
282284
content: " ";

apps/components_guide_web/assets/tailwind.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ module.exports = {
1313
orange: colors.orange,
1414
current: 'currentColor',
1515
},
16+
zIndex: {
17+
'menu': 'var(--z-menu)'
18+
}
1619
},
1720
},
1821
};

apps/components_guide_web/lib/components_guide_web/templates/layout/_banner.html.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<hr class="mx-auto">
1111
<details class="relative" data-links="block p-3 underline-on-hover">
1212
<summary>Quick links</summary>
13-
<details-menu role="menu" class="absolute top-full right-0 flex flex-col text-sm whitespace-nowrap bg-gray-900 rounded shadow-lg">
13+
<details-menu role="menu" class="absolute z-menu top-full right-0 flex flex-col text-sm whitespace-nowrap bg-gray-900 rounded shadow-lg">
1414
<%= link("Accessibility First", to: '/accessibility-first') %>
1515
<%= link("React + TypeScript", to: '/react+typescript') %>
1616
<%= link("Web Standards", to: '/web-standards') %>

0 commit comments

Comments
 (0)