@@ -102,6 +102,24 @@ urlPrefix: https://html.spec.whatwg.org/multipage/; spec:HTML
102
102
.awesome-table td {padding:5px}
103
103
.awesome-table {color:#000;background:#fff;margin: auto;}
104
104
105
+ .fake-textarea {
106
+ background: white;
107
+ border: inset;
108
+ color: black;
109
+ display: inline-block;
110
+ font-family: monospace;
111
+ padding: 0 2px;
112
+ }
113
+ .fake-textarea.auto {
114
+ height: 2lh;
115
+ overflow: auto;
116
+ resize: both;
117
+ width: 10em;
118
+ }
119
+ .fake-textarea.normal {
120
+ width: 10em;
121
+ }
122
+
105
123
.fake-input-type-password {
106
124
display: inline-block;
107
125
border: 1px solid black;
@@ -2452,6 +2470,59 @@ Effects of 'appearance' on Semantic Aspects of Elements</h4>
2452
2470
</div>
2453
2471
2454
2472
2473
+ <h3 id="form-sizing">
2474
+ Switching form control sizing: the 'form-sizing' property</h3>
2475
+
2476
+ <pre class=propdef>
2477
+ Name : form-sizing
2478
+ Value : auto | normal
2479
+ Initial : ''form-sizing/auto''
2480
+ Applies to : [=elements with default preferred size=]
2481
+ Inherited : no
2482
+ Percentages : N/A
2483
+ Computed Value : as specified
2484
+ Canonical order : per grammar
2485
+ Animation type : discrete
2486
+ </pre>
2487
+
2488
+ For the purpose of this specification,
2489
+ an <dfn export>element with default preferred size</dfn> is an element
2490
+ of which size is fixed regardless of its content size though its
2491
+ [=preferred size property=] is 'auto' .
2492
+ The host language defines which elements are applicable to it.
2493
+ For example, in HTML <{textarea}> is an [=element with default preferred size=] .
2494
+
2495
+ <dl dfn-type=value dfn-for=form-sizing>
2496
+ <dt> <dfn>auto</dfn>
2497
+ <dd>
2498
+ The UA must apply the default preferred size to
2499
+ an element if it is an
2500
+ [=element with default preferred size=] and its
2501
+ [=preferred size property=] value is 'auto' .
2502
+ Otherwise UA must behave the same as ''form-sizing/normal'' .
2503
+ <dt> <dfn>normal</dfn>
2504
+ <dd>
2505
+ The UA must not apply the default preferred size to an element.
2506
+ If the element is an [=element with default preferred size=] and
2507
+ is listed in [[CSS-SIZING-3#min-content-zero|compressible replaced elements]] ,
2508
+ the UA must stop treating the element as a replaced element for [=min-content contribution=] .
2509
+ </dl>
2510
+
2511
+ <div class="example">
2512
+ For instance, <{textara}> has fixed size regardless of its content by default:
2513
+
2514
+ <span class="fake-textarea auto"> ⎸</span>
2515
+ <span class="fake-textarea auto"> The quick brown fox jumps over the lazy dog.</span>
2516
+
2517
+ If ''form-sizing: normal'' is applied, the former should be:
2518
+ <span class="fake-textarea"> ⎸</span>
2519
+
2520
+ If ''form-sizing: normal'' is applied and its width property has a fixed value like ''width: 10em'' ,
2521
+ the element height depends on the number of the content lines:
2522
+ <span class="fake-textarea normal"> The quick brown fox jumps over the lazy dog.⎸</span>
2523
+ </div>
2524
+
2525
+
2455
2526
<h3 id="input-security">
2456
2527
Obscuring sensitive input: the 'input-security' property</h3>
2457
2528
@@ -2649,6 +2720,9 @@ Changes from the <a href="https://www.w3.org/TR/2021/WD-css-ui-4-20210316/">16 M
2649
2720
2650
2721
<li>
2651
2722
Added the ''outline-color/auto'' value of 'outline-color' .
2723
+
2724
+ <li>
2725
+ Added 'form-sizing' property.
2652
2726
</ul>
2653
2727
2654
2728
0 commit comments