Skip to content

Commit 407a35e

Browse files
authored
fix: set correct margin on the overlay content toolbar part (#9365)
1 parent d8fb7a0 commit 407a35e

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

packages/date-picker/test/visual/lumo/date-picker.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ describe('date-picker', () => {
124124
await openOverlay();
125125
await visualDiff(div, `${dir}-week-numbers`);
126126
});
127+
128+
it('fullscreen', async () => {
129+
element.value = '2000-01-01';
130+
element._fullscreen = true;
131+
await openOverlay();
132+
await visualDiff(element._overlayContent, `${dir}-fullscreen`);
133+
});
127134
});
128135
});
129136
});
24.5 KB
Loading
23.2 KB
Loading

packages/date-picker/theme/lumo/vaadin-date-picker-overlay-content-styles.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ registerStyles(
9595
9696
:host([fullscreen]) [part='toolbar'] {
9797
background-color: var(--lumo-base-color);
98+
margin-inline-end: 57px;
9899
}
99100
100101
:host([fullscreen]) [part='overlay-header'] {
@@ -129,9 +130,8 @@ registerStyles(
129130
background-image: none;
130131
}
131132
132-
[part='toolbar'],
133-
::slotted([slot='months']) {
134-
margin-right: 0;
133+
:host([fullscreen]) [part='toolbar'] {
134+
margin-inline-end: 0;
135135
}
136136
137137
/* TODO make date-picker adapt to the width of the years part */

packages/vaadin-lumo-styles/src/components/date-picker-overlay-content.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119

120120
:host([fullscreen]) [part='toolbar'] {
121121
grid-area: header;
122+
margin-inline-end: 57px;
122123
}
123124

124125
[part='toolbar'] ::slotted(vaadin-button) {
@@ -181,9 +182,8 @@
181182
background-image: none;
182183
}
183184

184-
[part='toolbar'],
185-
::slotted([slot='months']) {
186-
margin-right: 0;
185+
:host([fullscreen]) [part='toolbar'] {
186+
margin-inline-end: 0;
187187
}
188188

189189
/* TODO make date-picker adapt to the width of the years part */

0 commit comments

Comments
 (0)