From 085d6d185d7695d0816315aeee5e3a8ed3c60585 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 10:42:45 -0700 Subject: [PATCH] fixes #5055: wrap legend and form elements in fieldset so IE8 styles the legend properly --- docs/base-css.html | 37 ++++++++++++++------------ docs/templates/pages/base-css.mustache | 37 ++++++++++++++------------ 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/docs/base-css.html b/docs/base-css.html index 1f0a039f07..46ce606cbb 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -875,25 +875,29 @@ For example, <code><section></code> should be wrapped as inlin

Default styles

Individual form controls receive styling, but without any required base class on the <form> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.

- Legend - - - Example block-level help text here. - - +
+ Legend + + + Example block-level help text here. + + +
 <form>
-  <legend>Legend</legend>
-  <label>Label name</label>
-  <input type="text" placeholder="Type something…">
-  <span class="help-block">Example block-level help text here.</span>
-  <label class="checkbox">
-    <input type="checkbox"> Check me out
-  </label>
-  <button type="submit" class="btn">Submit</button>
+  <fieldset>
+    <legend>Legend</legend>
+    <label>Label name</label>
+    <input type="text" placeholder="Type something…">
+    <span class="help-block">Example block-level help text here.</span>
+    <label class="checkbox">
+      <input type="checkbox"> Check me out
+    </label>
+    <button type="submit" class="btn">Submit</button>
+  </fieldset>
 </form>
 
@@ -947,7 +951,6 @@ For example, <code><section></code> should be wrapped as inlin
  • Wrap any associated controls in .controls for proper alignment
  • - Legend
    diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 13192d90e1..9e0a899525 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -812,25 +812,29 @@

    {{_i}}Default styles{{/i}}

    {{_i}}Individual form controls receive styling, but without any required base class on the <form> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.{{/i}}

    - Legend - - - {{_i}}Example block-level help text here.{{/i}} - - +
    + Legend + + + {{_i}}Example block-level help text here.{{/i}} + + +
    {{! /example }}
     <form>
    -  <legend>{{_i}}Legend{{/i}}</legend>
    -  <label>{{_i}}Label name{{/i}}</label>
    -  <input type="text" placeholder="{{_i}}Type something…{{/i}}">
    -  <span class="help-block">Example block-level help text here.</span>
    -  <label class="checkbox">
    -    <input type="checkbox"> {{_i}}Check me out{{/i}}
    -  </label>
    -  <button type="submit" class="btn">{{_i}}Submit{{/i}}</button>
    +  <fieldset>
    +    <legend>{{_i}}Legend{{/i}}</legend>
    +    <label>{{_i}}Label name{{/i}}</label>
    +    <input type="text" placeholder="{{_i}}Type something…{{/i}}">
    +    <span class="help-block">Example block-level help text here.</span>
    +    <label class="checkbox">
    +      <input type="checkbox"> {{_i}}Check me out{{/i}}
    +    </label>
    +    <button type="submit" class="btn">{{_i}}Submit{{/i}}</button>
    +  </fieldset>
     </form>
     
    @@ -884,7 +888,6 @@
  • {{_i}}Wrap any associated controls in .controls for proper alignment{{/i}}
  • - Legend