-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec -webkit-appearance #6
Comments
ok found something about differences of implementations in See the codepen at http://codepen.io/anon/pen/QyJMGx |
WebKit and Blink drops the |
Thank you @karlcow -- I think there's a lot to learn about what people expect from |
(just stating the obvious for people passing by) It's kind of nasty because the -vendor- were specifically designed to allow experimentation so that each rendering engine could have difference of implementations. Which is exactly this in this case. The possibility is to have a real
|
Just to be sure I looked at Blink in devtools on We can see the but then if we check in the computed value tab, we can see that the value was set to 😖 |
My CSS 4 draft only has two values because that is what browser vendors have stated they wanted it to have. I am ready to include a handful more options (button and the like) if there's demand for it, but so far there were explicit requests against it. This is a case where various browsers behavior are different enough that the spec cannot merely pave the cow paths, but has to find some sensible core behavior into this mess. I'm sure that the behavior I have for now is underspecified, but I do think I got the basics right. @miketaylr and @karlcow , if you're having a meeting to dig into this, I'd be happy to join you remotely. |
Yes, agreed.
Great, thanks! It might be further down the road a bit (and it might be entirely remote), but I'll ping you before hand. |
Here's a related issue https://bugzilla.mozilla.org/show_bug.cgi?id=605985#c41:
|
OK so not so sure about the behavior of Blink/WebKit which is in fact normal. Play with this <style>select {}</style>
<select>
<option value="0">First option</option>
</select> Then <style>select {-moz-appearance: button;}</style>
<select>
<option value="0">First option</option>
</select> Then <style>select {-moz-appearance: button;
background-color: #e8a907;
}</style>
<select>
<option value="0">First option</option>
</select> 👀 |
Gecko's behavior is because we use OS theme drawing to implement appearance in general, and OS themes don't generally (across platforms) allow saying things like "draw me an OS-default button, but with the background set to this custom color". And even if they do for buttons they might not for other controls... |
@bzbarsky ah! Thanks. |
@bzbarsky I'd appreciate if you had time to go through https://drafts.csswg.org/css-ui-4/#appearance-switching and give some feedback (though I'd understand if you had better things to do...) |
note to myself when I do the research about the appearance behaviors: to check on different browsers AND OSes |
@frivoal The "All decorative visual aspects of a form control which are not caused by a CSS style rule" wording leaves lots of room for non-interop, because UAs may be implementing all sorts of stuff in terms of UA style rules. Apart from that, I believe that for some form controls some UAs treat them as non-replaced elements (e.g. rendering ::before content), and pages try to use that with
And note that for the range thing, the fact that the slider appears but other things disappear is totally arbitrary: in practice the look of all that stuff would be defined as UA CSS rules, at least in Gecko... |
Isn't that something that can be dealt with using
Are there things which need to stay replaced elements, or can appearance:none make everything non-replaced? I suspect that the answer is that some things need to stay replaced elements (such as
I have a hard time seeing how you make the slider knob exclusively with UA CSS rules. The slider knob isn't merely decorative. The way manipulating it affects the state of the control cannot be replicated in CSS, which is why I don't think its existence should be impacted by CSS, even if its look may be (through a The same goes for the drop down in As I understand, Gecko does it by styling non-standard pseudos like ::-moz-range-track and ::-moz-range-thumb. I don't count this as " I am not saying that this is clear cut for every control, and we'll probably need to dive in and make some judgement calls in a few cases, but as a high level guideline, it makes sense to me. |
I don't know what you mean by "dealt with". Let me put it more simply: the border around an
Text inputs certainly need to stay replaced, as you said. Probably
The behavior wouldn't be. But the way it looks would be. Put another way, a slider knob is just a thing with some border and border-radius and maybe a background gradient (probably on a pseudo-element). Should those things still be applied when As you note, it's exactly like the dropdown arrow in In practice what I think you will need to do is for every control define separately what |
As a followup to the CSSWG Telcon mention of this thread, I just wanted to mention that for instance input[type=file] works very differently than others even with appearance:none, too: |
@frivoal are there tests in the CSS test suite for appearance? I don't see any test suite link into CSS4-ui draft. |
note to self |
@karlcow I don't believe there's any yet (haven't written or reviewed any). I do plan on writing some, but haven't found the time yet. I do expect to find some time for this not too far from now, so don't despair just yet. If you want to write some and send a pull request on https://github.com/w3c/csswg-test/, I am more than happy to review and merge them. |
@frivoal I guess it should be a new folder with Looking at https://github.com/w3c/csswg-test/tree/master/css-ui-3 I have started today to collect some naïve tests for appearance. This is very early (in progress) stuff. http://codepen.io/webcompat/pen/yJKbgp |
The csswg is currently looking into updating the way we manage test contributions, but regardless, this should be an unsurprising affair if you're used to other testing on the web plaform: This applies as usual: http://testthewebforward.org/docs/test-style-guidelines.html As for metadata, the historic documentation is this: http://testthewebforward.org/docs/css-metadata.html. Note that we've relaxed these requirements these days and have not yet updated documentation:
|
Some screenshot http://codepen.io/webcompat/full/yJKbgp/ (still work in progress) |
Yeah found another funky one: from left to right: Gecko, WebKit, Blink on Why is it important? |
for this case, |
In case codepen blows up, it looks like -moz-appearance: none w/ width:100% on a radio input causes the input to turn into a sideways egg. 🍳 |
And yet another one
|
fyi.
|
Either this was true at the time, or it was never true. Quick testing in latest shows that they support the |
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1333482 for implementing |
I do not recall whether I had tested this. Maybe I did, maybe I just trusted the MSDN article. |
Scratching my eyes with |
I think we can ignore this for this issue -- it seems to just be about making the buttons in MacOS use native themes. |
We are working on this with @miketaylr and @MDTsai checking the different values/behaviors in different browsers to know what we should do in Firefox. |
@karlcow Please let us know if you find anything that is not already mentioned on the w3c issue: |
Hi all; I landed web-platform-tests/wpt@1419513 recently to add a tentative test for -webkit-appearance standardization efforts. The test just sets each known value (based on the Chromium implementation) to an element, and then asserts that getComputedStyle(elem).webkitAppearance matches. As it turns out, currently the test fails on Chromium on OSX due to some platform-specific behavior in the implementation (menulist turns into menulist-button for getComputedStyle). I'm seeing some pushback against the test there as some see this test as too early and for a non-spec feature. Would appreciate input from those looking at implementing -webkit-appearance: is the landed WPT test helpful in working towards a spec, or is still too early for this test to be defined? |
Now getComputedStyle() for -webkit-appearance returns adjusted values. See [1]. We'd like to know whether we can remove this behavior or not. [1] whatwg/compat#6 (comment) Bug: 810162 Change-Id: Icc17d681d7105d8a77ff07e18b7f270bd6918f01 Reviewed-on: https://chromium-review.googlesource.com/936523 Reviewed-by: Takayoshi Kochi <kochi@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#539142}
Ping; if there is no support for web-platform-tests/wpt@1419513 as a useful test, then I will revert it in two weeks time. Further discussion with @miketaylr has implied it isn't that useful, as -webkit-appearance acts differently on different elements, whilst the test as written just tests the computed style of divs. |
This test is not a good indicator of -webkit-appearance support; it only checks whether computed-value == applied-value for -webkit-appearance values specified on a vanilla <div>. In reality most values of -webkit-appearance are not of interest to other UAs (see whatwg/compat#6), and the behavior is different on different elements (e.g. <input>). Since this has caused issues across different platforms on Chrome (see bug), remove it. Bug: 810162 Change-Id: I9d469cb624569f453978f3c56cc180eb07435b5b
This test is not a good indicator of -webkit-appearance support; it only checks whether computed-value == applied-value for -webkit-appearance values specified on a vanilla <div>. In reality most values of -webkit-appearance are not of interest to other UAs (see whatwg/compat#6), and the behavior is different on different elements (e.g. <input>). Since this has caused issues across different platforms on Chrome (see bug), remove it. Bug: 810162 Change-Id: I9d469cb624569f453978f3c56cc180eb07435b5b Reviewed-on: https://chromium-review.googlesource.com/1134387 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#574546}
This test is not a good indicator of -webkit-appearance support; it only checks whether computed-value == applied-value for -webkit-appearance values specified on a vanilla <div>. In reality most values of -webkit-appearance are not of interest to other UAs (see whatwg/compat#6), and the behavior is different on different elements (e.g. <input>). Since this has caused issues across different platforms on Chrome (see bug), remove it. Bug: 810162 Change-Id: I9d469cb624569f453978f3c56cc180eb07435b5b Reviewed-on: https://chromium-review.googlesource.com/1134387 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#574546}
This test is not a good indicator of -webkit-appearance support; it only checks whether computed-value == applied-value for -webkit-appearance values specified on a vanilla <div>. In reality most values of -webkit-appearance are not of interest to other UAs (see whatwg/compat#6), and the behavior is different on different elements (e.g. <input>). Since this has caused issues across different platforms on Chrome (see bug), remove it. Bug: 810162 Change-Id: I9d469cb624569f453978f3c56cc180eb07435b5b Reviewed-on: https://chromium-review.googlesource.com/1134387 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#574546}
…WPT test, a=testonly Automatic update from web-platform-testsRemove webkit-appearance.tentative.html WPT test This test is not a good indicator of -webkit-appearance support; it only checks whether computed-value == applied-value for -webkit-appearance values specified on a vanilla <div>. In reality most values of -webkit-appearance are not of interest to other UAs (see whatwg/compat#6), and the behavior is different on different elements (e.g. <input>). Since this has caused issues across different platforms on Chrome (see bug), remove it. Bug: 810162 Change-Id: I9d469cb624569f453978f3c56cc180eb07435b5b Reviewed-on: https://chromium-review.googlesource.com/1134387 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#574546} -- wpt-commits: 4981a13ac22db892707dcaac3a6678e623224268 wpt-pr: 11933
…WPT test, a=testonly Automatic update from web-platform-testsRemove webkit-appearance.tentative.html WPT test This test is not a good indicator of -webkit-appearance support; it only checks whether computed-value == applied-value for -webkit-appearance values specified on a vanilla <div>. In reality most values of -webkit-appearance are not of interest to other UAs (see whatwg/compat#6), and the behavior is different on different elements (e.g. <input>). Since this has caused issues across different platforms on Chrome (see bug), remove it. Bug: 810162 Change-Id: I9d469cb624569f453978f3c56cc180eb07435b5b Reviewed-on: https://chromium-review.googlesource.com/1134387 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#574546} -- wpt-commits: 4981a13ac22db892707dcaac3a6678e623224268 wpt-pr: 11933
Now getComputedStyle() for -webkit-appearance returns adjusted values. See [1]. We'd like to know whether we can remove this behavior or not. [1] whatwg/compat#6 (comment) Bug: 810162 Change-Id: Icc17d681d7105d8a77ff07e18b7f270bd6918f01 Reviewed-on: https://chromium-review.googlesource.com/936523 Reviewed-by: Takayoshi Kochi <kochi@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#539142} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 73c0ec5abceb2d983cbdbf5f3e95e3d1371822df
Given https://drafts.csswg.org/css-ui-4/#propdef--webkit-appearance, I think we can just close this. |
See https://bugzilla.mozilla.org/show_bug.cgi?id=605985#c28 for some good notes.
Edge supports
none
,button
andtextfield
values: https://msdn.microsoft.com/en-us/library/dn793580%28v=vs.85%29.aspxThe text was updated successfully, but these errors were encountered: