1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Styling and Customization Questions' started by RobinHood, Aug 10, 2012.

  1. RobinHood

    RobinHood Well-Known Member

    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?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What is a vendor?
     
  3. RobinHood

    RobinHood Well-Known Member

    Sorry, I mean these for each browser vendor:

    -webkit-
    -moz-
    -o-
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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;
    
     
  5. RobinHood

    RobinHood Well-Known Member

    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.
     
  6. MagnusB

    MagnusB Well-Known Member

    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..
     
  7. RobinHood

    RobinHood Well-Known Member

    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 :)
     
  8. MagnusB

    MagnusB Well-Known Member

    CSS3 is not finished yet, everything from that are "experimental". Same with html5 as well, it is not yet finished standard.
     

Share This Page