Skip to content

Formalize definition of "widget" (superseded by #4857) - #4725

Closed
jugglinmike wants to merge 1 commit into
whatwg:masterfrom
bocoup:define-widget
Closed

jugglinmike wants to merge 1 commit into
whatwg:masterfrom
bocoup:define-widget

Conversation

@jugglinmike

@jugglinmike jugglinmike commented Jun 20, 2019 •

Copy link
Copy Markdown
Contributor

This term is currently used informally to describe "the elements defined
in [section 14.5]." Formalize this definition so that it may be
referenced by the CSS-UI specification to describe the referenced
appearance property.

For additional context, see issue 3990 of the CSS-UI specification.


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

@domenic

domenic commented Jun 21, 2019

Copy link
Copy Markdown
Member

I don't know if the usage of widget here aligns at all with how the appearance property works in CSS, or whether creating a cross-spec dependency in this way makes sense (instead of having CSS define a specific list of elements). I'll defer to @zcorpan.

@domenic domenic added the topic: rendering How elements are expected to render: the user agent style sheet label Jul 2, 2019
@zcorpan

zcorpan commented Aug 13, 2019

Copy link
Copy Markdown
Member

I think having this list in HTML makes sense since CSS usually tries to be host-language agnostic, and leave the details to the host language. In practical terms, having this list maintained in HTML makes it more likely that it is kept up-to-date.

We could add a note saying that this term is used by the CSS UI spec for the 'appearance' property, so that readers (and our future selves) know why it's there.

@zcorpan

zcorpan commented Aug 13, 2019

Copy link
Copy Markdown
Member

However, for the purpose of the 'appearance' property, these elements aren't "widgets"

  • details
  • summary
  • marquee (this one is obsolete anyway)

I'll give this some more thought. Maybe a different term that more clearly is about the 'appearance' property is needed.

@zcorpan

zcorpan commented Aug 13, 2019

Copy link
Copy Markdown
Member

How about:

The following elements can have special appearance for the purpose of the CSS 'appearance' property. [CSSUI]

  • button
  • input
  • meter
  • progress
  • select
  • textarea

@domenic

domenic commented Aug 13, 2019

Copy link
Copy Markdown
Member

+1 to special appearance, and to the general idea of a specific term for this purpose.

@jugglinmike

Copy link
Copy Markdown
Contributor Author

The term "special appearance" is vague in a way that supports the usages that we're removing, e.g.

<button style="-webkit-appearance: checkbox">Hello</button>

A more specific term might help discourage expectations about the legacy behavior. What about

The following elements can have disabled appearance for the purpose of the CSS 'appearance' property. [CSSUI]

@jugglinmike

Copy link
Copy Markdown
Contributor Author

What about extending the set of supported elements to match the "widget" definition? On one hand, that seems like overloading. On the other, there are already many element classifications. If a little scope creep reduces the number of distinct concepts (so that no one ever has to figure out which elements are widgets without "special appearance"), then it might be justified.

<details> and <marquee> do have some appearance that one may want to disable after all, so this wouldn't abuse the semantics.

I don't mean to derail, though. If you folks think this is worth discussing, then I'd be happy to open a separate issue.

@zcorpan

zcorpan commented Aug 14, 2019

Copy link
Copy Markdown
Member

From the CSS point of view, these elements are pretty special. The specialness can be disabled with 'appearance: none', but I think it's weird to call the concept "disabled appearance". That sounds like the element is hidden or something. :-)

I also don't want to change how details or marquee are defined/implemented. They don't use 'appearance' at all. Please open a separate issue if you think they should, but consistency with spec definitions isn't good enough reason on its own imo.

@jugglinmike

Copy link
Copy Markdown
Contributor Author

I think it's weird to call the concept "disabled appearance". That sounds like the element is hidden or something. :-)

Incidentally, that's how I read "appearance: none" but even I'm not brash enough to suggest revising the property name itself.

I originally interpreted "special" to mean the non-default rendering (i.e. "appearance: none"), but now I understand it's intended to describe the default rendering. Does "native appearance" sound any better to you?

@zcorpan

zcorpan commented Aug 15, 2019

Copy link
Copy Markdown
Member

"native appearance" works for me.

Comment thread source

<p>The elements defined in this section can be rendered in a variety of manners, within the
<p>The elements in this section can be rendered in a variety of manners, within the
guidelines provided below. User agents are encouraged to set the <span>'appearance'</span> CSS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How can user agents set this property if its new values are not adequate to describe the elements mentioned below?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a reason we're separating these changes? Logically they seem to belong together?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can fold this into that PR. I think that makes sense.

@zcorpan

zcorpan commented Aug 15, 2019

Copy link
Copy Markdown
Member

I've changed w3c/csswg-drafts#3991 and this PR as per the above discussion. Please review.

This term is currently used informally to describe "the elements defined
in [section 14.5]." Formalize this definition so that it may be
referenced by the CSS-UI specification to describe the referenced
`appearance` property.

Add a note

Rename the term to 'native appearance' and remove details, summary, marquee

Hook into CSS UI's 'native appearance' term
@zcorpan

zcorpan commented Aug 22, 2019

Copy link
Copy Markdown
Member

This is now part of #4857

@zcorpan zcorpan closed this Aug 22, 2019
@zcorpan zcorpan changed the title Formalize definition of "widget" Formalize definition of "widget" (superseded by #4857) Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: rendering How elements are expected to render: the user agent style sheet

Development

Successfully merging this pull request may close these issues.

4 participants