Skip to content

Commit

Permalink
Merge pull request #801 from googlefonts/context-menu
Browse files Browse the repository at this point in the history
[context-menu] Fix wrong items vertical margins and left padding.
  • Loading branch information
justvanrossum authored Sep 14, 2023
2 parents 8d27483 + 231c235 commit ab69c76
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/fontra/client/web-components/menu-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ class MenuPanel extends SimpleElement {
cursor: default;
}
.menu-container {
margin: 0.2em 0em 0.3em 0em; /* top, right, bottom, left */
}
.menu-item-divider {
border: none;
border-top: 1px solid #80808080;
height: 1px;
margin: 0.3em 0 0.2em 0;
}
.context-menu-item {
Expand Down Expand Up @@ -88,7 +93,7 @@ class MenuPanel extends SimpleElement {
this.style = "display: none;";
this.position = position;
this.positionContainer = positionContainer;
this.menuElement = html.div({ tabindex: 0 });
this.menuElement = html.div({ class: "menu-container", tabindex: 0 });

// No context menu on our context menu please:
this.menuElement.oncontextmenu = (event) => event.preventDefault();
Expand Down

0 comments on commit ab69c76

Please sign in to comment.