On Thu, Aug 15, 2024 at 6:07 PM Traian Captan <tcap...@chromium.org> wrote:

>
>
> On Mon, Aug 12, 2024 at 10:51 PM Domenic Denicola <dome...@chromium.org>
> wrote:
>
>> SpecificationNone
>>>
>>
>> My understanding is that appearance: none has a specification, probably
>> around https://drafts.csswg.org/css-ui/#appearance-switching . Can you
>> ensure this field is filled out, and more importantly, that the
>> implementation you propose is in accordance with the specification?
>>
> Sure, I can add it. I'm thinking that "
> https://drafts.csswg.org/css-ui/#appearance-decorative"; seems most
> appropriate, which states: "UAs should include in their user agent
> stylesheet style rules to give widgets a recognizable shape when appearance
> is none. <https://drafts.csswg.org/css-ui/#appearance-decorative>".
> I didn't find anything else in the spec defining how the fall back styles
> should look like. Please let me know if I missed something.
>

Yes, I guess this is under-defined. It seems to bottom out in
https://html.spec.whatwg.org/#the-meter-element-2 which has nothing
interesting in the UA stylesheet, and states "Need to detail the expected
primitive appearance."

This relates to the interoperability issues discussed below. You say "This
change increases interop with Safari and Firefox which already provide a
reasonable fallback style for <meter> elements with `appearance: none`,"
but don't give detail on whether our "reasonable fallback style" is the
same as or different from theirs.

>From what I can tell with some brief testing with Firefox Linux and Safari
Tech Preview MacOS, they both produce a 80x16 box with 0 margin and padding
in this "primitive appearance" mode. Firefox's inspector does not show any
UA styles, but Safari shows UA styles of: { box-sizing: border-box;
display: inline-block; block-size: 1em; inline-size: 5em; vertical-align:
-0.2em; }. These actually match the spec's expected "native appearance",
but I guess the "native appearance" has slightly different visuals, e.g.
rounded corners and a shinier progress color.

What UA styles will we follow? Is there a chance we could agree on the same
styles as Safari, and thus update the part of the HTML spec I pointed out
above?

I don't think we should block this intent on getting this all specified
perfectly, since the change you're making is bringing us closer to interop
in a historically under-specified area. But I do want to understand to what
extent we'll match Firefox and Safari, and it would be an excellent bonus
if we took this opportunity to improve the spec for everyone while we were
here.


>
> Risks
>>>
>>>
>>> Interoperability and Compatibility
>>>
>>> The Interoperability Risk is Low. This change increases interop with
>>> Safari and Firefox which already provide a reasonable fallback style for
>>> <meter> elements with `appearance: none`. The Compatibility Risk is Low.
>>>
>>
>> Can you say more about the compatibility risk? How often are authors
>> using appearance: none on meter elements today, and how will their pages'
>> appearances and layout change?
>>
> The usage of 'appearance: none '
> <https://chromestatus.com/metrics/feature/timeline/popularity/994>  for
> the meter element seems to be around 0.006 () VS around 0.01 for 'appearance:
> auto' usage
> <https://chromestatus.com/metrics/feature/timeline/popularity/993>.
> Regarding the rendering of appearance none, we will display a fall back
> style instead of being invisible.
> Regarding layout change, there is no change since the size is defined on
> the meter element itself, and we are not changing that.
>

Thanks. This seems relatively safe, as long as we have a Finch kill switch.
Since the layout doesn't change it shouldn't affect the rest of the page,
it might just cause some meters to appear that were previously invisible in
Chrome and visible in Firefox/Safari.


>
>
> Is this feature fully tested by web-platform-tests
>>> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
>>> ?No
>>>
>>
>> Why not?
>>
> Since I did not find fall back style rendering being specified I thought
> that we shouldn't add them to wpt-external, however I added a set of
> wpt-internal tests in:
>
> https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/wpt_internal/html/semantics/forms/the-meter-element/
>
> Based on the definition of "UAs should include in their user agent
> stylesheet style rules to give widgets a recognizable shape when appearance
> is none. <https://drafts.csswg.org/css-ui/#appearance-decorative>" in "
> https://drafts.csswg.org/css-ui/#appearance-decorative"; I created a CL
> adding WPT external tests asserting that <meter> with 'appearance: none'
> should not render the same as <meter> with 'appearance: auto':
> https://chromium-review.googlesource.com/c/chromium/src/+/5790065
>

Those tests are a great start. If we can agree on the UA styles per the
above, we could expand them using tests similar to these
<https://github.com/search?q=repo%3Aweb-platform-tests%2Fwpt%20%22%40namespace%20url(urn%3Anot-html)%22&type=code>
.


>
>
>
>> Flag name on chrome://flagsMeterAppearanceNoneFallbackStyle
>>>
>>> Finch feature nameNone
>>>
>>> Non-finch justificationNone
>>>
>>
>> Please include the justification for why this does not have a Finch
>> killswitch, or add one.
>>
> My mistake. The flag I added is a "Finch feature name". I moved it to the
> correct field. Sorry for the confusion.
>
>
> Regards,
> Traian
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM0wra-P1YB5G7U2YgYC1RkFj9cdG6nCrji%2BvkFH-XCcckoR2A%40mail.gmail.com.

Reply via email to