Interesting -moz CSS Properties

By  on  

I'm always on the lookout for interesting vendor-specific features and prefixes. The beauty in them is that they allow developers to enhance where possible; they aren't taken into account as core design, but provide nice little touches. I was poking around Mozilla's MDN and found a great list of proprietary -moz properties. Here are a few of that I found interesting and useful.

::-moz-list-bullet

::-moz-list-bullet allows developers to style the bullet bullet text in lists; not the content, but the bullet text itself:

ul.customList li::-moz-list-bullet {
	color: #999;
	font-size: 24px;
	text-decoration: underline;
}

-moz-force-broken-image-icon

Firefox presently displays alt text for every broken image on the page. This may not be helpful for the purposes of debugging because the text may blend into the page. By using -moz-force-broken-image-icon, you can fore the broken image icon instead of the alt text:

img {
	-moz-force-broken-image-icon: 1;
}

-moz-margin-start and -moz-margin-end

Both work very much like margin-left and margin-right, but reverse position when in RTL mode. Very useful if you're trying to create a flexible website built for LTR or RTL reading.

.myBlock {
	-moz-margin-start: 10px;
	-moz-margin-end: 5px;
}

-moz-orient

The -moz-orient property currently only applies to progressbar elements, allowing them to be vertical or horizontal:

progress.up {
	-moz-orient: vertical;
}

-moz-window-shadow

-moz-window-shadow specifies whether a window in OS X will have a shadow.

.panel {
	-moz-window-shadow: none;
}

There are a few hundred proprietary properties available so take a few moments and let me know if you find any of them interesting, and if you've used any of them for your projects!

Recent Features

  • By
    Write Simple, Elegant and Maintainable Media Queries with Sass

    I spent a few months experimenting with different approaches for writing simple, elegant and maintainable media queries with Sass. Each solution had something that I really liked, but I couldn't find one that covered everything I needed to do, so I ventured into creating my...

  • By
    Create a CSS Cube

    CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals.  Add animation and you've got something really neat.  Unfortunately each CSS cube tutorial I've read is a bit...

Incredible Demos

  • By
    MooTools HTML Police: dwMarkupMarine

    We've all inherited rubbish websites from webmasters that couldn't master valid HTML. You know the horrid markup: paragraph tags with align attributes and body tags with background attributes. It's almost a sin what they do. That's where dwMarkupMarine comes in.

  • By
    Background Animations Using MooTools

    One of the sweet effects made easy by JavaScript frameworks like MooTools and jQuery is animation. I ran across this great jQuery tutorial that walks you through animating a background image of a page. Here's a quick MooTools code snippet that...

Discussion

  1. Fabian

    You should change the ol to ul in ol.customList li::-moz-list-bullet, as it’s just working on bullets (imho).

    • Updated. Thanks for having a humble opinion. ;)

  2. Would be nice if you provided some demos, e.g. links to quick jsFiddle tests :)

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!