aboutsummaryrefslogtreecommitdiff
path: root/docs/css.html
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-01-12 14:16:49 -0800
committerMark Otto <[email protected]>2013-01-12 14:16:49 -0800
commita33d45f3082ac6db154aa6796eeb47a0f69f2249 (patch)
tree0c09fb9e1247e838bcaf65fa121b15a611340c8f /docs/css.html
parentc11f41ba04791a0c408071527994dfb22c91a436 (diff)
parent24f7df15e6a5b4b08201b3a6650340998f3ed381 (diff)
downloadbootstrap-a33d45f3082ac6db154aa6796eeb47a0f69f2249.tar.xz
bootstrap-a33d45f3082ac6db154aa6796eeb47a0f69f2249.zip
Merge branch '3.0.0-wip' into bs3-flatten
Diffstat (limited to 'docs/css.html')
-rw-r--r--docs/css.html130
1 files changed, 58 insertions, 72 deletions
diff --git a/docs/css.html b/docs/css.html
index a3133026d..65c876b2b 100644
--- a/docs/css.html
+++ b/docs/css.html
@@ -305,20 +305,31 @@
<p>Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p>
+ <h3>Alignment classes</h3>
+ <p>Easily realign text to components with text alignment classes.</p>
+ <div class="bs-docs-example">
+ <p class="text-left">Left aligned text.</p>
+ <p class="text-center">Center aligned text.</p>
+ <p class="text-right">Right aligned text.</p>
+ </div>
+<pre class="prettyprint linenums">
+&lt;p class="text-left"&gt;Left aligned text.&lt;/p&gt;
+&lt;p class="text-center"&gt;Center aligned text.&lt;/p&gt;
+&lt;p class="text-right"&gt;Right aligned text.&lt;/p&gt;
+</pre>
+
<h3>Emphasis classes</h3>
<p>Convey meaning through color with a handful of emphasis utility classes.</p>
<div class="bs-docs-example">
<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>
- <p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p>
<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
</div>
<pre class="prettyprint linenums">
&lt;p class="muted"&gt;Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.&lt;/p&gt;
&lt;p class="text-warning"&gt;Etiam porta sem malesuada magna mollis euismod.&lt;/p&gt;
&lt;p class="text-error"&gt;Donec ullamcorper nulla non metus auctor fringilla.&lt;/p&gt;
-&lt;p class="text-info"&gt;Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.&lt;/p&gt;
&lt;p class="text-success"&gt;Duis mollis, est non commodo luctus, nisi erat porttitor ligula.&lt;/p&gt;
</pre>
@@ -1468,17 +1479,6 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
<h3 id="forms-extending-sizes">Control sizing</h3>
<p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.</p>
- <h4>Block level inputs</h4>
- <p>Make any <code>&lt;input&gt;</code> or <code>&lt;textarea&gt;</code> element behave like a block level element.</p>
- <form class="bs-docs-example" style="padding-bottom: 15px;">
- <div class="controls">
- <input class="input-block-level" type="text" placeholder=".input-block-level">
- </div>
- </form>
-<pre class="prettyprint linenums">
-&lt;input class="input-block-level" type="text" placeholder=".input-block-level"&gt;
-</pre>
-
<h4>Relative sizing</h4>
<p>Create larger or smaller form controls that match button sizes.</p>
<form class="bs-docs-example" style="padding-bottom: 15px;">
@@ -1538,38 +1538,32 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
...
&lt;/select&gt;
</pre>
-
- <p>For multiple grid inputs per line, <strong>use the <code>.controls-row</code> modifier class for proper spacing</strong>. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.</p>
+ <p>If you need multiple inputs on the same line, wrap them in the standard grid markup (with <code>.row</code> and <code>.span*</code> classes). Each input should have it's own column and will expand to fill the available width automatically.</p>
<form class="bs-docs-example" style="padding-bottom: 15px;">
- <div class="controls controls-row">
- <input class="span5" type="text" placeholder=".span5">
- </div>
- <div class="controls controls-row">
- <input class="span4" type="text" placeholder=".span4">
- <input class="span1" type="text" placeholder=".span1">
- </div>
- <div class="controls controls-row">
- <input class="span3" type="text" placeholder=".span3">
- <input class="span2" type="text" placeholder=".span2">
- </div>
- <div class="controls controls-row">
- <input class="span2" type="text" placeholder=".span2">
- <input class="span3" type="text" placeholder=".span3">
- </div>
- <div class="controls controls-row">
- <input class="span1" type="text" placeholder=".span1">
- <input class="span4" type="text" placeholder=".span4">
+ <div class="row">
+ <div class="span4">
+ <input type="text" placeholder=".span4">
+ </div>
+ <div class="span4">
+ <input type="text" placeholder=".span4">
+ </div>
+ <div class="span4">
+ <input type="text" placeholder=".span4">
+ </div>
</div>
</form>
<pre class="prettyprint linenums">
-&lt;div class="controls"&gt;
- &lt;input class="span5" type="text" placeholder=".span5"&gt;
-&lt;/div&gt;
-&lt;div class="controls controls-row"&gt;
- &lt;input class="span4" type="text" placeholder=".span4"&gt;
- &lt;input class="span1" type="text" placeholder=".span1"&gt;
+&lt;div class="row"&gt;
+ &lt;div class="span4"&gt;
+ &lt;input type="text" placeholder=".span4"&gt;
+ &lt;/div&gt;
+ &lt;div class="span4"&gt;
+ &lt;input type="text" placeholder=".span4"&gt;
+ &lt;/div&gt;
+ &lt;div class="span4"&gt;
+ &lt;input type="text" placeholder=".span4"&gt;
+ &lt;/div&gt;
&lt;/div&gt;
-...
</pre>
<h3>Uneditable inputs</h3>
@@ -1622,7 +1616,7 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
<h2>Form control states</h2>
<p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
- <h3>Input focus</h3>
+ <h3 id="forms-input-focus">Input focus</h3>
<p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p>
<form class="bs-docs-example form-inline">
<input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused...">
@@ -1631,8 +1625,8 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
&lt;input class="input-xlarge" id="focusedInput" type="text" value="This is focused..."&gt;
</pre>
- <h3>Invalid inputs</h3>
- <p>Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code> and add the <code>required</code> attribute.</p>
+ <h3 id="forms-invalid-inputs">Invalid inputs</h3>
+ <p>Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code>, add the <code>required</code> attribute if the field is not optional, and (if applicable) specify a <code>pattern</code>.</p>
<form class="bs-docs-example form-inline">
<input class="span3" type="email" placeholder="[email protected]" required>
</form>
@@ -1640,7 +1634,7 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
&lt;input class="span3" type="email" required&gt;
</pre>
- <h3>Disabled inputs</h3>
+ <h3 id="forms-disabled-inputs">Disabled inputs</h3>
<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
<form class="bs-docs-example form-inline">
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
@@ -1649,7 +1643,7 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
&lt;input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled&gt;
</pre>
- <h3>Disabled fieldsets</h3>
+ <h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
<p>Add the <code>disabled</code> attribute to a <code>&lt;fieldset&gt;</code> to disable all the controls within the <code>&lt;fieldset&gt;</code> at once. Link buttons (with the <code>&lt;a&gt;</code> element) will be aesthetically disabled, but you will need custom JavaScript to disable their behavior.</p>
<form class="bs-docs-example form-inline">
<fieldset disabled>
@@ -1686,59 +1680,51 @@ For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped
&lt;/form&gt;
</pre>
- <h3>Validation states</h3>
- <p>Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding <code>.control-group</code>.</p>
+ <h3 id="forms-validation">Validation states</h3>
+ <p>Bootstrap includes validation styles for error, warning, info, and success messages. To use:</p>
+ <ul>
+ <li>Add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element</li>
+ <li>Add .input-with-feedback to the field(s) in question</li>
+ </ul>
+ <p>Validation styles are applied on a per-input basis. With horizontal forms, the <code>&lt;label class="control-label"&gt;</code> will always be styled.</p>
<form class="bs-docs-example form-horizontal">
- <div class="control-group warning">
+ <div class="control-group has-warning">
<label class="control-label" for="inputWarning">Input with warning</label>
<div class="controls">
- <input type="text" id="inputWarning">
- <span class="help-inline">Something may have gone wrong</span>
+ <input type="text" class="input-with-feedback" id="inputWarning">
</div>
</div>
- <div class="control-group error">
+ <div class="control-group has-error">
<label class="control-label" for="inputError">Input with error</label>
<div class="controls">
- <input type="text" id="inputError">
- <span class="help-inline">Please correct the error</span>
- </div>
- </div>
- <div class="control-group info">
- <label class="control-label" for="inputInfo">Input with info</label>
- <div class="controls">
- <input type="text" id="inputInfo">
- <span class="help-inline">Username is taken</span>
+ <input type="text" class="input-with-feedback" id="inputError">
</div>
</div>
- <div class="control-group success">
+ <div class="control-group has-success">
<label class="control-label" for="inputSuccess">Input with success</label>
<div class="controls">
- <input type="text" id="inputSuccess">
- <span class="help-inline">Woohoo!</span>
+ <input type="text" class="input-with-feedback" id="inputSuccess">
</div>
</div>
</form>
<pre class="prettyprint linenums">
-&lt;div class="control-group warning"&gt;
+&lt;div class="control-group has-warning"&gt;
&lt;label class="control-label" for="inputWarning"&gt;Input with warning&lt;/label&gt;
&lt;div class="controls"&gt;
- &lt;input type="text" id="inputWarning"&gt;
- &lt;span class="help-inline"&gt;Something may have gone wrong&lt;/span&gt;
+ &lt;input type="text" class="input-with-feedback" id="inputWarning"&gt;
&lt;/div&gt;
&lt;/div&gt;
-&lt;div class="control-group error"&gt;
+&lt;div class="control-group has-error"&gt;
&lt;label class="control-label" for="inputError"&gt;Input with error&lt;/label&gt;
&lt;div class="controls"&gt;
- &lt;input type="text" id="inputError"&gt;
- &lt;span class="help-inline"&gt;Please correct the error&lt;/span&gt;
+ &lt;input type="text" class="input-with-feedback" id="inputError"&gt;
&lt;/div&gt;
&lt;/div&gt;
-&lt;div class="control-group success"&gt;
+&lt;div class="control-group has-success"&gt;
&lt;label class="control-label" for="inputSuccess"&gt;Input with success&lt;/label&gt;
&lt;div class="controls"&gt;
- &lt;input type="text" id="inputSuccess"&gt;
- &lt;span class="help-inline"&gt;Woohoo!&lt;/span&gt;
+ &lt;input type="text" class="input-with-feedback id="inputSuccess""&gt;
&lt;/div&gt;
&lt;/div&gt;
</pre>