XF 2.0 How to remove attachment icons?

Fastline

Active member
By default, XF 2 uses a icon for the attachments, in black color. How can i remove that icon for the attachment of .zip files?
And is there any way to use custom icons there?
 

Fastline

Active member
Oh dear, where were you? I also created a separate thread but no one replied. Thank you! ;)
What if i've to use my icons?
 

S Thomas

Well-known member
What are "your" icons? Images?
CSS:
.attachment-icon[data-extension="zip"] i::before {
    content: '';
    width: 100px;
    height: 100px;
    background: url('path_to_image') no-repeat;
}

You might need to adjust width & height.
 

Fastline

Active member
What are "your" icons? Images?
CSS:
.attachment-icon[data-extension="zip"] i::before {
    content: '';
    width: 100px;
    height: 100px;
    background: url('path_to_image') no-repeat;
}

You might need to adjust width & height.
You're damn good man :p
I like it!(y)
 

Fastline

Active member
Just a question what if i need to replace the entire icons for all the extensions? Or simply want it to be the file names instead of those icons?
 

S Thomas

Well-known member
Remove the [data-extension="zip"] part.
File name makes no sense since it's shown in the line below. You could simply hide the icon with only adding content: ''; and nothing else.
 

Fastline

Active member
This is also good for me. But i do really like the previous attachment styles. The reason is it was clean, took less space and looked organised.
 

ozzy47

Well-known member
Try this in your Extra.less, not sure about the XF1 way.

CSS:
.attachment-icon[data-extension="zip"] i::before {
    content: '';
    background: none;
}
 

Fastline

Active member
Thanks. S Thomas mentioned it but i couldn't get it. Now it works. Will try to get the first style. Any way to show Attached Files: instead of Attachments?
 
Top