Search code examples
cssfirefoxcross-browsermozilla

Are these Mozilla-specific CSS styles doing anything?


I'm working with some CSS (from a Joomla template) like this:

div#logo {
    -moz-background-clip: border;
    -moz-background-inline-policy: continuous;
    -moz-background-origin: padding;
    background: transparent url(../images/head.png) no-repeat scroll 0 0;
    ...
}

I've looked up some of those -moz- properties and they seem to be assigned their default values, and if I turn them off in Firebug nothing happens visibly.

Would there be a reason to add them to a CSS file? Are they for an old version of Firefox perhaps?


Solution

  • I think what's happened is someone's set a background shortcut rule and then looked at the ‘computed style’ resulting from that shortcut rule in the DOM inspector. They've noticed that setting the style also sets Mozilla's background-clip, -origin and -inline-policy properties, and tried to reproduce these rules without understanding what they're for (namely a detail of Mozilla's CSS implementation, and potentially CSS3 in future).

    Certainly changing -moz-background-inline-policy would only have any effect on elements that were display: inline (which div isn't by default), and changing the clip/origin properties around the border would only make any difference if the element actually had a border.

    Get rid of them.