Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[context-menu] Fix wrong items vertical margins and left padding. #801

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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