-
Notifications
You must be signed in to change notification settings - Fork 86
feat: port upload Lumo styles to CSS files #9483
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
base: port-lumo-styles-to-css-files_progress-bar
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2000 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
@import './button.css'; | ||
@import './progress-bar.css'; | ||
|
||
@import '../src/mixins/base-layer-reset.css' vaadin-upload; | ||
@import '../src/components/upload.css' vaadin-upload; | ||
|
||
@import '../src/mixins/base-layer-reset.css' vaadin-upload-icon; | ||
@import '../src/components/upload-icon.css' vaadin-upload-icon; | ||
|
||
@import '../src/mixins/base-layer-reset.css' vaadin-upload-file; | ||
@import '../src/mixins/field-button.css' vaadin-upload-file; | ||
@import '../src/components/upload-file.css' vaadin-upload-file; | ||
|
||
@import '../src/mixins/base-layer-reset.css' vaadin-upload-file-list; | ||
@import '../src/components/upload-file-list.css' vaadin-upload-file-list; | ||
|
||
html { | ||
--vaadin-upload-css-inject: 1; | ||
--vaadin-upload-icon-css-inject: 1; | ||
--vaadin-upload-file-css-inject: 1; | ||
--vaadin-upload-file-list-css-inject: 1; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2000 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
:host { | ||
display: block; | ||
} | ||
|
||
:host([hidden]) { | ||
display: none !important; | ||
} | ||
|
||
[part='list'] { | ||
padding: 0; | ||
margin: 0; | ||
list-style-type: none; | ||
} | ||
|
||
::slotted(li:not(:first-of-type)) { | ||
border-top: 1px solid var(--lumo-contrast-10pct); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2000 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
:host { | ||
display: block; | ||
padding: var(--lumo-space-s) 0; | ||
outline: none; | ||
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct)); | ||
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px); | ||
} | ||
|
||
[hidden] { | ||
display: none; | ||
} | ||
|
||
[part='row'] { | ||
list-style-type: none; | ||
display: flex; | ||
align-items: baseline; | ||
justify-content: space-between; | ||
} | ||
|
||
button { | ||
background: transparent; | ||
padding: 0; | ||
border: none; | ||
box-shadow: none; | ||
} | ||
|
||
:host([complete]) ::slotted([slot='progress']), | ||
:host([error]) ::slotted([slot='progress']) { | ||
display: none !important; | ||
} | ||
|
||
:host([focus-ring]) [part='row'] { | ||
border-radius: var(--lumo-border-radius-s); | ||
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color); | ||
} | ||
|
||
[part='status'], | ||
[part='error'] { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are two separate Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
color: var(--lumo-secondary-text-color); | ||
font-size: var(--lumo-font-size-s); | ||
} | ||
|
||
[part='info'] { | ||
display: flex; | ||
align-items: baseline; | ||
flex: auto; | ||
} | ||
|
||
[part='meta'] { | ||
width: 0.001px; | ||
flex: 1 1 auto; | ||
} | ||
|
||
[part='name'] { | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
[part='commands'] { | ||
display: flex; | ||
align-items: baseline; | ||
flex: none; | ||
} | ||
|
||
[part$='icon'] { | ||
margin-right: var(--lumo-space-xs); | ||
font-size: var(--lumo-icon-size-m); | ||
font-family: 'lumo-icons'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
line-height: 1; | ||
} | ||
|
||
/* When both icons are hidden, let us keep space for one */ | ||
[part='done-icon'][hidden] + [part='warning-icon'][hidden] { | ||
display: block !important; | ||
visibility: hidden; | ||
} | ||
|
||
[part$='button'] { | ||
flex: none; | ||
margin-left: var(--lumo-space-xs); | ||
cursor: var(--lumo-clickable-cursor); | ||
} | ||
|
||
[part$='button']:focus { | ||
outline: none; | ||
border-radius: var(--lumo-border-radius-s); | ||
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color); | ||
} | ||
|
||
[part$='icon']::before, | ||
[part$='button']::before { | ||
vertical-align: -0.25em; | ||
} | ||
|
||
[part='done-icon']::before { | ||
content: var(--lumo-icons-checkmark); | ||
color: var(--lumo-primary-text-color); | ||
} | ||
|
||
[part='warning-icon']::before { | ||
content: var(--lumo-icons-error); | ||
color: var(--lumo-error-text-color); | ||
} | ||
|
||
[part='start-button']::before { | ||
content: var(--lumo-icons-play); | ||
} | ||
|
||
[part='retry-button']::before { | ||
content: var(--lumo-icons-reload); | ||
} | ||
|
||
[part='remove-button']::before { | ||
content: var(--lumo-icons-cross); | ||
} | ||
|
||
[part='error'] { | ||
color: var(--lumo-error-text-color); | ||
} | ||
|
||
::slotted([slot='progress']) { | ||
width: auto; | ||
margin-left: calc(var(--lumo-icon-size-m) + var(--lumo-space-xs)); | ||
margin-right: calc(var(--lumo-icon-size-m) + var(--lumo-space-xs)); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2000 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
:host::before { | ||
content: var(--lumo-icons-upload); | ||
font-family: lumo-icons; | ||
font-size: var(--lumo-icon-size-m); | ||
line-height: 1; | ||
vertical-align: -0.25em; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2000 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
:host { | ||
display: block; | ||
position: relative; | ||
box-sizing: border-box; | ||
line-height: var(--lumo-line-height-m); | ||
} | ||
|
||
:host([hidden]) { | ||
display: none !important; | ||
} | ||
|
||
[hidden] { | ||
display: none !important; | ||
} | ||
|
||
:host(:not([nodrop])) { | ||
overflow: hidden; | ||
border: 1px dashed var(--lumo-contrast-20pct); | ||
border-radius: var(--lumo-border-radius-l); | ||
padding: var(--lumo-space-m); | ||
transition: | ||
background-color 0.6s, | ||
border-color 0.6s; | ||
} | ||
|
||
[part='drop-label'] { | ||
display: inline-block; | ||
white-space: normal; | ||
padding: 0 var(--lumo-space-s); | ||
color: var(--lumo-secondary-text-color); | ||
font-family: var(--lumo-font-family); | ||
} | ||
|
||
:host([dragover-valid]) { | ||
border-color: var(--lumo-primary-color-50pct); | ||
background: var(--lumo-primary-color-10pct); | ||
transition: | ||
background-color 0.1s, | ||
border-color 0.1s; | ||
} | ||
|
||
:host([dragover-valid]) [part='drop-label'] { | ||
color: var(--lumo-primary-text-color); | ||
} | ||
|
||
:host([disabled]) [part='drop-label'], | ||
:host([max-files-reached]) [part='drop-label'] { | ||
color: var(--lumo-disabled-text-color); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding
!important
to the[hidden]
rule (e.g.display: none !important;
) to match the pattern used in other components and ensure it always overrides.Copilot uses AI. Check for mistakes.