Skip to content

Commit d03c276

Browse files
authored
fix: ensure width set to MenuBar in popover does not persist
2 parents 1602203 + f3baa56 commit d03c276

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

src/component/vcf-toolbar-layout.ts

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@ export class VcfToolbarLayout extends ResizeMixin(
5656
gap: var(--vcf-toolbar-layout-gap););
5757
}
5858
59-
/* <hr> elements are vertical in the normal menu */
60-
::slotted(hr) {
61-
display: inline-block;
62-
flex-shrink: 0;
63-
align-self: stretch;
64-
width: 1px;
65-
border: none; /* remove default border */
66-
background: var(--lumo-contrast-10pct);
67-
margin: var(--lumo-space-xs);
68-
}
69-
7059
/* Overflow button is hidden unless needed */
7160
[slot='overflow-button'] {
7261
display: none;
@@ -104,19 +93,21 @@ export class VcfToolbarLayout extends ResizeMixin(
10493
padding: var(--overflow-container-padding);
10594
}
10695
107-
.overflow-container > *:first-child {
108-
padding-top: 0;
109-
}
110-
111-
.overflow-container > *:last-child {
112-
padding-bottom: 0;
113-
}
114-
11596
vaadin-popover-overlay[theme~="fixed-width-prefix"] .overflow-container {
11697
--overflow-container-prefix-width: var(--lumo-space-l);
11798
}
11899
119100
/* native element styles */
101+
vcf-toolbar-layout hr {
102+
display: inline-block;
103+
flex-shrink: 0;
104+
align-self: stretch;
105+
width: 1px;
106+
height: auto;
107+
border: none;
108+
background-color: var(--lumo-contrast-10pct);
109+
margin: var(--lumo-space-xs);
110+
}
120111
121112
vcf-toolbar-layout hr:last-child {
122113
visibility: hidden;
@@ -156,6 +147,10 @@ export class VcfToolbarLayout extends ResizeMixin(
156147
.overflow-container > [has-label] {
157148
padding-top: var(--lumo-space-s);
158149
}
150+
151+
vcf-toolbar-layout > vaadin-menu-bar > vaadin-menu-bar-button {
152+
width: unset !important;
153+
}
159154
160155
.overflow-container > vaadin-menu-bar > vaadin-menu-bar-button > vaadin-menu-bar-item {
161156
justify-content: left;
@@ -166,8 +161,12 @@ export class VcfToolbarLayout extends ResizeMixin(
166161
--vaadin-button-padding: var(--lumo-space-s);
167162
--vaadin-button-margin: 0px;
168163
}
169-
170-
.overflow-container > vaadin-menu-bar > vaadin-menu-bar-button,
164+
165+
.overflow-container > vaadin-menu-bar > vaadin-menu-bar-button {
166+
width: unset !important;
167+
flex: 1;
168+
}
169+
171170
.overflow-container > vaadin-menu-bar > vaadin-menu-bar-button > vaadin-menu-bar-item {
172171
width: 100%;
173172
}

0 commit comments

Comments
 (0)