Skip to content

Commit cbdd0b1

Browse files
author
Jonathan Neal
committed
Correct wrapping not present in IE8/9/10/11 and Edge 12/13
1 parent 7b962cc commit cbdd0b1

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

normalize.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,18 @@ fieldset {
388388
}
389389

390390
/**
391-
* 1. Correct `color` not being inherited from fieldset in IE 8/9/10/11.
392-
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
391+
* 1. Correct wrapping not present in IE8/9/10/11 and Edge 12/13.
392+
* 2. Correct `color` not being inherited from fieldset in IE 8/9/10/11.
393+
* 3. Remove padding so people aren't caught out if they zero out fieldsets.
393394
*/
394395

395396
legend {
396-
color: inherit; /* 1 */
397-
padding: 0; /* 2 */
397+
box-sizing: border-box; /* 1 */
398+
color: inherit; /* 2 */
399+
display: table; /* 1 */
400+
max-width: 100%; /* 1 */
401+
padding: 0; /* 3 */
402+
white-space: normal; /* 1 */
398403
}
399404

400405
/**

test.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ <h3 class="Test-it">should not have padding</h3>
437437
<legend>legend</legend>
438438
</fieldset>
439439
</div>
440+
<h3 class="Test-it">should wrap text</h3>
441+
<div class="Test-run">
442+
<fieldset>
443+
<legend>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.</legend>
444+
</fieldset>
445+
</div>
440446

441447
<h2 class="Test-describe"><code>textarea</code></h2>
442448
<h3 class="Test-it">should not have a scrollbar unless overflowing</h3>

0 commit comments

Comments
 (0)