Are form controls replaced elements?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
From https://github.com/web-platform-tests/interop/issues/1124 (cc @Loirooriol)
See previously: https://github.com/w3c/csswg-drafts/issues/1024.
CSS 2 says:
CSS 2 does not define which properties apply to form controls and frames, or how CSS can be used to style them. User agents may apply CSS properties to these elements. Authors are recommended to treat such support as experimental. A future level of CSS may specify this further.
CSS 2, defining "replaced element", says:
An element whose content is outside the scope of the CSS formatting model, such as an image, embedded document, or applet.
CSS Display says:
An element whose content is outside the scope of the CSS formatting model, such as an image or embedded document.
CSS Display, defining display: contents, says:
This value computes to display: none on replaced elements and other elements whose rendering is not entirely controlled by CSS; see Appendix B: Effects of display: contents on Unusual Elements for details.
CSS Sizing says:
In addition to the replaced elements listed in HTML§14.4 [HTML], the following HTML elements are also considered to be replaced elements for the purpose of the percentage-sized replaced element rule above, and can have their min-content contribution compressed when their width/height or max-width/max-height is expressed with a cyclic percentage size: [
<input>,<select>,<textarea>,<progress>,<meter>,<marquee>]
CSS UI says:
The term widget in this specification denotes replaced elements that can have native appearance, meaning that they are rendered like analogous native widgets or controls of the host operating system or platform, or with a look and feel not otherwise expressible in CSS.
HTML says:
The following elements can have a native appearance for the purpose of the CSS 'appearance' property.
So:
- CSS 2 explicitly leaves form controls undefined, and "replaced element" definition would presumably include them (because they're not defined by the CSS model),
- CSS Display has a similar definition of "replaced element", but also talks about form controls distinct to replaced elements,
- CSS Sizing implies that a number of HTML elements are to be considered replaced elements (implying they're not in general),
- CSS UI makes it clear that widgets are replaced elements,
- HTML defines them as widgets (per the CSS UI definition).
So on the whole to me it seems like the intention is that they are replaced elements, but we don't make this super obvious?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the cited definitions and usage in CSS Display, CSS Sizing, CSS UI, and HTML, especially the sections on replaced elements, widgets, and native appearance. Done means resolving whether form controls are generally replaced elements and clarifying the relevant specification wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100