You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This covers:
- input element as a text entry widget
size attribute is ignored if field-sizing:content
- input element as domain-specific widgets (optional)
- input element as a file upload control (optional)
- select element
size attribute is used only for dropdown/listbox switching if
field-sizing:content
- textarea element
cols/rows are ignored if field-sizing:content
Issue: whatwg#6807
Issue: w3c/csswg-drafts#7542
at the element, with the <code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to
131908
131911
true.</p>
131909
131912
131910
-
<p>If an <code>input</code> element whose <code data-x="attr-input-type">type</code> attribute is
131911
-
in one of the above states has a <code data-x="attr-input-size">size</code> attribute, and parsing
131912
-
that attribute's value using the <span>rules for parsing non-negative integers</span> doesn't
131913
-
generate an error, then the user agent is expected to use the attribute as a <span
131914
-
data-x="presentational hints">presentational hint</span> for the <span>'width'</span> property on
131915
-
the element, with the value obtained from applying the <span>converting a character width to
131916
-
pixels</span> algorithm to the value of the attribute.</p>
131913
+
<p>The <code>input</code> element whose <code data-x="attr-input-type">type</code> attribute is
131914
+
in one of the above states is an <span>element with default preferred size</span>, and
131915
+
user agents are expected to apply the <span>'field-sizing'</span> CSS property to
131916
+
the elements.</p>
131917
131917
131918
-
<p>If an <code>input</code> element whose <code data-x="attr-input-type">type</code> attribute is
131919
-
in one of the above states does <em>not</em> have a <code data-x="attr-input-size">size</code>
131920
-
attribute, then the user agent is expected to act as if it had a user-agent-level style sheet rule
131921
-
setting the <span>'width'</span> property on the element to the value obtained from applying the
131922
-
<span>converting a character width to pixels</span> algorithm to the number 20.</p>
131918
+
<p>The <span>inline size</span> of the default preferred size is determined by the following
131919
+
steps:<p>
131920
+
131921
+
<ol>
131922
+
<li>
131923
+
<p>If the <span>'field-sizing'</span> property on the element has a <span>computed value</span>
131924
+
of <span data-x="field-sizing-content">'content'</span>,
131925
+
The <span>inline size</span> of the default preferred size is determined by the text which the
131926
+
element shows. The text is either a <span data-x="concept-fe-value">value</span> or a short hint
131927
+
specified by the <code data-x="attr-input-placeholder">placeholder</code> attribute. If the text
131928
+
is editable by the user, user agents may secure space for the text caret.</p>
131929
+
</li>
131930
+
131931
+
<li>
131932
+
<p>If the element has a <code data-x="attr-input-size">size</code> attribute, and parsing that
131933
+
attribute's value using the <span>rules for parsing non-negative integers</span> doesn't
131934
+
generate an error, the <span>inline size</span> of the default preferred size is the value
131935
+
obtained from applying the <span>converting a character width to pixels</span> algorithm to the
131936
+
value of the attribute.</p>
131937
+
</li>
131938
+
131939
+
<li>
131940
+
<p>Otherwise, the <span>inline size</span> of the default preferred size is the value obtained
131941
+
from applying the <span>converting a character width to pixels</span> algorithm to the number
131942
+
20.</p>
131943
+
</li>
131944
+
</ol>
131923
131945
131924
131946
<p>The <dfn>converting a character width to pixels</dfn> algorithm returns <span data-x="">(<var>size</var>-1)×<var>avg</var> + <var>max</var></span>,
131925
131947
where <var>size</var> is the character width to convert, <var>avg</var> is the
0 commit comments