Skip to content

Commit

Permalink
feat: contextual menu css position
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Nov 22, 2023
1 parent f879bb8 commit b4378c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion scss/_patterns_contextual-menu.scss
Expand Up @@ -16,7 +16,7 @@
@extend %vf-has-box-shadow;

display: none;
margin: 0;
margin: 0 0 $input-margin-bottom 0;
max-width: 21rem;
min-width: 10rem;
padding: 0;
Expand Down Expand Up @@ -83,6 +83,8 @@
}

.p-contextual-menu__toggle {
// Remove margin bottom for the dropdown menu to be aligned with the toggle
margin-bottom: 0;
// All buttons have a margin right, unless they are a last child.
// In cases where contextual menu toggle is a button, we do not want it to
// have a margin, but since it is never the last child in this pattern,
Expand Down
4 changes: 0 additions & 4 deletions templates/docs/examples/patterns/contextual-menu/_script.js
Expand Up @@ -12,10 +12,6 @@ function toggleMenu(element, show, top) {
element.setAttribute('aria-expanded', show);
target.setAttribute('aria-hidden', !show);

if (typeof top !== 'undefined') {
target.style.top = top + 'px';
}

if (show) {
target.focus();
}
Expand Down

0 comments on commit b4378c9

Please sign in to comment.