Skip to main content
4-Participant
Nov 26, 2024 11:36 AM UTC
Solved

Fileupload widget Uploaded file style

I have the following file upload widget and i want to edit the background of the uploaded file part.

immagine.png

 

I have tried using the custom css  and setting list-item in the customClass property

 

.list-item::part(file-item) {
 background:#383838;
}

 

 following the ptc documentation I tried also this

 

@supports (ptcs-style-unit: "PTCS-FILEUPLOAD") {
 [part=file-item] {
	background-color: #383838; 
 }
}

 

but all my test failed to edit the style of that part

wcuiAnswer
16-Pearl
Nov 29, 2024 1:57 AM UTC

@RC_9962782 

can you try below code?

 

@supports(ptcs-style-unit:"PTCS-FILE-UPLOAD-LIST-ITEM"){
   [part~=file-item] {
       background: red;
   }
}
 

4 replies

16-Pearl
Nov 28, 2024 1:30 AM UTC

@RC_9962782 what is the version of your ThingWorx instance? 

We would like to know which area you would like to change the BK color, a demo mashup might be helpful.

Translate
4-Participant
Nov 28, 2024 9:15 AM UTC

The thingworx version is 9.6.0

The area that I want to change the background is the one that opens after I selected a file. The area that has the white background in the screen in the original question.

I linked a demo mashup

Translate
wcui16-PearlAnswer
16-Pearl
Nov 29, 2024 1:57 AM UTC

@RC_9962782 

can you try below code?

 

@supports(ptcs-style-unit:"PTCS-FILE-UPLOAD-LIST-ITEM"){
   [part~=file-item] {
       background: red;
   }
}
 

Translate