Closed Bug 1501483 Opened 6 years ago Closed 6 years ago

Add -webkit-appearance:meter and make that the default for <meter> for compatibility with other UAs


(Core :: CSS Parsing and Computation, enhancement, P3)




Tracking Status
firefox65 --- fixed


(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)



(Keywords: dev-doc-complete, testcase)


(2 files)

Attached file Testcase
We should add a new 'meter' value to '-webkit-appearance' in
the style system, and make the existing 'meterbar' value an
alias for 'meter'.

We should also replace any existing 'meterbar' values in our
UA sheets with 'meter'.  In particular, the default value
for <meter>.

Chrome uses '-webkit-appearance:meter' on the <meter> element.
Setting '-webkit-appearance:none' removes the theme and it
renders its contents instead.  Setting display:inline appears
to work but it appears they use an inner anonymous block
to render the contents, so it ends up as a block-in-inline.
display:contents works as display:none.

Edge, on the other hand, uses '-webkit-appearance:none'
by default on <meter> and it never renders its contents.
display:contents appears to have no effect.
Setting the 'background' doesn't seem to work at all.
"Content model:
    Phrasing content, but there must be no meter element descendants."
"Authors are encouraged to include a textual representation of the gauge's state in the element's contents, for users of user agents that do not support the meter element."
> Edge, ... display:contents appears to have no effect.

Oh right, I forgot - they don't support it, LOL.
Safari also has '-webkit-appearance:meter' on <meter>.
It renders the test somewhat like Firefox - not rendering
its contents in particular.  We should probably try to
avoid emulating that part Chrome's behavior if we can
(and file a bug on Chrome instead).
Note that chrome has something similar for <progress> and it's not fun:

I don't know if they have the same bug with <meter>, but it wouldn't surprise me.
Yeah, technically it's a violation of the HTML spec since they do
support <meter>.   I read the spec text as only applying to UAs
that don't support the <meter> element at all, in which case
the contents will render naturally.
Keep our old value 'meterbar' as an alias for now, but unship 'meterchunk'
by restricting it to UA/chrome sheets only.
Attachment #9023257 - Flags: review?(jwatt)
Attachment #9023257 - Flags: review?(jwatt) → review+
Pushed by
Add -webkit-appearance:meter and make that the default for <meter> for compatibility with other UAs.  r=jwatt
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Keywords: dev-doc-needed
Note to MDN writers:

I've added a note to the Fx65 rel notes to cover this:

As for the docs, this should be a simple matter of adding the value to the appearance reference page and the compat data.

Updated the table to add meter support for FF, made it standard, and added comment on meterbar to use meter instead.

You need to log in before you can comment on or make changes to this bug.