@@ -802,17 +802,20 @@ Intrinsic Sizes</h3>
802
802
The content in this case is defined to be the input control's values
803
803
(the <l spec=html> [=raw value=] </l> in the case of <{textarea}> ,
804
804
or the <a href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-value">value</a> in the case of <{input}> ),
805
- possibly transformed to a localized display format,
805
+ possibly transformed to a more human-readable and/or localized display format,
806
806
which is then treated as child <a>text runs</a> of the input control.
807
- If the input control has <a>placeholder text</a> overlaid,
807
+ If the input control has designated placeholder text
808
+ to be overlaid in its value display area,
808
809
then that text is also measured for the purpose of calculating the content-based size--
809
810
whether or not the placeholder text is visible at the moment.
810
811
(Thus the content-based intrinsic size of the input control
811
812
is the larger of the size to fit the placeholder text and the size to fit the value.)
812
-
813
- Issue: So that this gives sensible results,
814
- ensure minimum height via UA style sheet
815
- <code> textarea { min-height: 1lh; }</code> .
813
+ The UA may enforce a minimum
814
+ (such as the size required to contain a single zero-width character)
815
+ on the form control’s
816
+ <a lt="min-content size">min-content</a> and <a>max-content sizes</a>
817
+ to ensure sufficient space for the caret
818
+ and otherwise maintain usability of the form control.
816
819
817
820
Issue: <code> <input type=text></code> only ever displays its value on a single line.
818
821
This appears to be accomplished by "magic":
@@ -821,10 +824,12 @@ Intrinsic Sizes</h3>
821
824
rather than the 'white-space' property in the UA stylesheet.
822
825
Thus, the ''width/min-content'' size should probably automatically treat it as if it had ''white-space: pre'' .
823
826
824
- Note: See <a href="https://github.com/w3c/csswg-drafts/issues/1771">discussion about this functionality</a> .
825
- This might be extended to <{iframe}> or other content-containing replaced elements,
826
- but text inputs are the major use-case
827
- and have the least additional complications.
827
+ Note:
828
+ This might be extended to <{iframe}> or other content-containing replaced elements
829
+ (see <a href="https://github.com/w3c/csswg-drafts/issues/1771">discussion</a> ),
830
+ but text inputs are a major use-case,
831
+ and being document-internal,
832
+ have the least additional complications.
828
833
829
834
<h3 id="intrinsic-contribution">
830
835
Intrinsic Contributions</h3>
0 commit comments