-moz-appearance
By glazou on Friday 5 December 2008, 09:30 - Mozilla - Permalink
In BlueGriffon, I now have a wizard showing a panel when I click on a given button. That panel is by default semi-transparent because of its -moz-appearance
. But semi-transparence is a real problem here because the panel contains a colour picker ! Of course -moz-appearance
can be set to none
but in that case, all other platform-specific settings of my panel are lost... Border, box-shadow, etc.
Seeing that Myk had the same problem and came to the same conclusion, I think that the power of -moz-appearance
is unfortunately also a too strong constraint and the styles it applies should be overridable by !important
declarations.
Comments
Would it be acceptable to just override the opacity of the color picker? That might work out.
Daniel, -moz-appearance doesn't "apply styles". I just uses the OS theme engine to paint. The only way to get a different rendering is to NOT use the OS theme engine to paint, which is exactly what -moz-appearance:none does.
I've always hated this too. It would be nice to be able to specify each individual property natively too, like you can with colors and "fieldtext" or "-moz-dialog". Instead specifying borders or border radius as "-moz-dialog-border" etc. Even then you still run into the problem of not being able to write "rgba(fieldtext, 0.5)" if you want.
Can't you just put a box behind the colorpicker though, and give it some solid color? It won't be 100% native, but you're not asking for that anymore.
> That panel is by default semi-transparent because of its -moz-appearance.
That's not true. It's not the -moz-appearance that causes the transparency, it's the window type (eWindowType_popup). This window type has, or rather had, a default transparency on Mac OS X. I removed that default transparency yesterday in bug 469683 because it's no longer necessary for context menus.
> Of course -moz-appearance can be set to none but in that case, all other platform-specific settings of my panel are lost... Border, box-shadow, etc.
-moz-appearance doesn't have control over window shadow.