Skip to content
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

Define which elements can be which kinds of widgets for CSS 'appearance' #7839

Merged

Conversation

frivoal
Copy link
Contributor

@frivoal frivoal commented Apr 20, 2022

This is an editorial rewrite (by @fantasai and myself) of the prior work by @zcorpan and @howard-e:

Goal: avoid having to talk about specific HTML elements in the CSS spec, and in particular, avoid having to have long lists of types of widgets there.

Doing that was undesirable because:

  • CSS, at least in theory, is not limited to HTML.
  • The descriptions in CSS of each types of widgets were stubs “a button is a widget which must have the native appearance of a button”, while the HTML spec held the actual descriptions of the rendering of various elements in its Rendering chapter.
  • This created a bunch of unnecessary indirections between the two specs, making both of them longer and harder to read than necessary.

The resulting spec is much more straightforward and much shorter, so we think this is a better approach, and this was accepted by the CSSWG (including @zcorpan). The CSS part has been landed.

This HTML part is complete in the sense that it works with the CSS part, but like the original PR from @zcorpan, lacks details about the rendering of each type of widgets. I'd expect the HTML folks to keep iterating from there, as with the previous incarnation of this PR.


(See WHATWG Working Mode: Changes for more details.)


/index.html ( diff )
/infrastructure.html ( diff )
/rendering.html ( diff )

This is an editorial rewrite of the prior work by Bocoup (@zcorpan and
@howard-e):
* whatwg#7004
* w3c/csswg-drafts#6537

Co-authored-by: fantasai <fantasai.bugs@inkedblade.net>
Co-authored-by: Simon Pieters <zcorpan@gmail.com>
Co-authored-by: Howard Edwards <howarde.edwards@gmail.com>
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good on an editorial level. @zcorpan, would you be able to confirm this preserves the desired semantics?

<span>native appearance</span> <span data-x="widget">widgets</span>, and defines whether to use that <span>native
appearance</span> depending on the <span>'appearance'</span> property. That logic, in
turns, depends on whether on whether each the element is classified as a <span>devolvable
widget</span>, or <span>non-devolvable widget</span>. This section defines which elements match
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra comma

meter { appearance: auto; }</code></pre>

<p>The <code>meter</code> element whose <span>native appearance</span> is a <span>devolvable
widget</span>. Its expected <span>native appearance</span> is to render as an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the sentence "The meter element whose native appearance is a devolvable widget" makes sense? Is there a missing/extra word? Same for progress?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be

  <p>The <code>meter</code> element is a <span>devolvable widget</span>.

source Show resolved Hide resolved
@domenic domenic merged commit 19159ab into whatwg:main Apr 25, 2022
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request May 5, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 16, 2022
…ins for 'appearance', a=testonly

Automatic update from web-platform-tests
HTML: Test transition and animation origins for 'appearance'

Follows whatwg/html#7839 and w3c/csswg-drafts#7230
--

wpt-commits: 541e49a74546de0128524f7e97906d24b3cfdefa
wpt-pr: 25439
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 25, 2022
…ins for 'appearance', a=testonly

Automatic update from web-platform-tests
HTML: Test transition and animation origins for 'appearance'

Follows whatwg/html#7839 and w3c/csswg-drafts#7230
--

wpt-commits: 541e49a74546de0128524f7e97906d24b3cfdefa
wpt-pr: 25439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants