Skip to content

Commit 7794173

Browse files
authored
fix: add missing upload file overflow and focus outline styles (#10016)
1 parent 938ebc9 commit 7794173

File tree

9 files changed

+22
-0
lines changed

9 files changed

+22
-0
lines changed

packages/upload/src/styles/vaadin-upload-file-base-styles.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export const uploadFileStyles = css`
1515
padding: var(--vaadin-upload-file-padding, var(--vaadin-padding-s));
1616
}
1717
18+
:host(:focus-visible) {
19+
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
20+
outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
21+
}
22+
1823
[hidden] {
1924
display: none;
2025
}
@@ -97,6 +102,10 @@ export const uploadFileStyles = css`
97102
padding: var(--vaadin-upload-file-button-padding, var(--vaadin-padding-container));
98103
}
99104
105+
button:focus-visible {
106+
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
107+
}
108+
100109
[part='start-button']::before,
101110
[part='retry-button']::before,
102111
[part='remove-button']::before {

packages/upload/src/styles/vaadin-upload-file-list-base-styles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { css } from 'lit';
99
export const uploadFileListStyles = css`
1010
:host {
1111
display: block;
12+
overflow: auto;
1213
}
1314
1415
:host([hidden]) {
98 Bytes
Loading
-227 Bytes
Loading
89 Bytes
Loading
91 Bytes
Loading
7.88 KB
Loading
7.82 KB
Loading

packages/upload/test/visual/base/upload.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ describe('upload', () => {
4141
];
4242
await visualDiff(div, `${dir}-files`);
4343
});
44+
45+
it('max-height', async () => {
46+
element.style.maxHeight = '200px';
47+
element.files = [
48+
{ name: 'File 1.pdf', progress: 100, complete: true },
49+
{ name: 'File 2.pdf', progress: 100, complete: true },
50+
{ name: 'File 3.pdf', progress: 100, complete: true },
51+
{ name: 'File 4.pdf', progress: 100, complete: true },
52+
{ name: 'File 5.pdf', progress: 100, complete: true },
53+
];
54+
await visualDiff(div, `${dir}-max-height`);
55+
});
4456
});
4557
});
4658

0 commit comments

Comments
 (0)