experiment: Upload base styles #9691
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Upload base style
Drag enabled (above), drag disabled (below).

"Dragover valid"

Supported custom properties
--vaadin-upload-background
--vaadin-upload-border
--vaadin-upload-border-color
--vaadin-upload-border-radius
--vaadin-upload-border-width
--vaadin-upload-gap
--vaadin-upload-padding
Drop label
--vaadin-upload-drop-label-color
--vaadin-upload-drop-label-font-size
--vaadin-upload-drop-label-font-weight
--vaadin-upload-drop-label-gap
--vaadin-upload-drop-label-line-height
Drop/upload icon
--vaadin-upload-icon-color
File
--vaadin-upload-file-gap
--vaadin-upload-file-padding
File Icons
--vaadin-upload-file-done-color
--vaadin-upload-file-warning-color
File Name
--vaadin-upload-file-name-color
--vaadin-upload-file-name-font-size
--vaadin-upload-file-name-font-weight
--vaadin-upload-file-name-line-height
File Status
--vaadin-upload-file-status-color
--vaadin-upload-file-status-font-size
--vaadin-upload-file-status-font-weight
--vaadin-upload-file-status-line-height
File Error Message
--vaadin-upload-file-error-color
--vaadin-upload-file-error-font-size
--vaadin-upload-file-error-font-weight
--vaadin-upload-file-error-line-height
File Buttons
--vaadin-upload-file-button-background
--vaadin-upload-file-button-border
--vaadin-upload-file-button-border-color
--vaadin-upload-file-button-border-radius
--vaadin-upload-file-button-border-width
--vaadin-upload-file-button-font-family
--vaadin-upload-file-button-font-size
--vaadin-upload-file-button-font-weight
--vaadin-upload-file-button-height
--vaadin-upload-file-button-line-height
--vaadin-upload-file-button-padding
--vaadin-upload-file-button-text-color
File List
--vaadin-upload-file-list-border
--vaadin-upload-file-list-border-color
--vaadin-upload-file-list-border-width
Concerns
gap: var(--vaadin-gap-container-inline);
directly instead of defining a dedicated custom property — for example, in theprimary-buttons
andinfo
parts.gap
property for themeta
part, although I could see it being useful. It’s a bit tricky to determine what’s necessary versus what’s superfluous.meta
part using[part='done-icon'][hidden] + [part='warning-icon'][hidden] ~ [part='meta']
. I’m not a fan of forcing visibility on one of the hidden icons (as is done in Lumo), but I’m also not entirely happy with thecalc
used here. Switching togrid
might be a cleaner solution.vaadin-upload
creates some extra space at the bottom. The solution is to hide the list when it's empty, but as far as I know, there's no equivalent ofvaadin-upload-file-list:not(:has(vaadin-upload-file))
that works in Shadow DOM.