SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2014
    Surrey, British Columbia Canada
    0 Post(s)
    0 Thread(s)

    CSS Browser extensions

    When you use a browser extension such as -moz-property:value; -webkit-property:value..... I have read that the browser manufacturers will drop the extension version of a style once they adopt the official version. Does this mean that when they drop the extension you have to go in and edit all the websites you included them in to avoid the style sheets to stop working?
    Also, have Microsoft, Firefox and Opera started to support the -webkit extension? In other words do you have to include the -moz, -o, -ms - or can you just use -webkit to cover all of them?

  2. #2
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Middle England
    3 Post(s)
    0 Thread(s)
    "Vendor" prefixes as they are known are there so you can use some newer CSS rules in that browser until the browser version actually implements the real thing.

    So for newer CSS rules it's always a good idea to use the default CSS rule and apply vendor prefixes as required. If the users browser version is old it may use the vendor prefixed style, or if it's more up to date it will use the normal rule.

    Here's an example:

    .myclass {
    -moz-border-radius: 12px; // for older firefox browser versions
    -webkit-border-radius: 12px; // for older webkit browser versions
    border-radius: 12px; // normal/default used by new browsers
    So if, say, Firefox drops -moz-border-radius at some point it will simply ignore that rule and use the default border-radius instead.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts