Do we need to use vendor prefixes when using CSS in Extra.css?

RobinHood

Well-known member
#1
For some reason I thought that Xenforo automatically converted css to all vendor versions, but I've just been working with some css and it only works if I use the vendor prefix, do we need to use them all the time?
 

Jake Bunce

XenForo moderator
Staff member
#4
Yes, XenForo automatically generates browser-specific CSS from some attributes. For example, this CSS:

Code:
border-radius: 5px;
Comes out as this in the rendered CSS on the page:

Code:
border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -khtml-border-radius: 5px;
 

RobinHood

Well-known member
#5
Ahh yes, I guess it's only certain properties then as as that's worked for me for things like border-radius in the past, but it doesn't seem to work when I use transition property, I think it's the first time I've had to use the prefixes.
 

MagnusB

Well-known member
#6
I can't see the sense why they feel the need to use vendor prefixes for experimental features, but what can you do.... I know some CSS3 stuff are fully supported through the W3C standard by most browsers now, but there are still stuff that requires vendor prefixes. Border radius, box-shadow and text shadow I don't think requires vendor prefixes anymore, but until CSS3 is officially supported the recommended way is to use vendor prefixes..
 

RobinHood

Well-known member
#7
Gotchya, I didn't realise it was an experimental feature - that must be why it doesn't work without the prefixes. It's just so I know when I should or shouldn't use them :)
 
Top