]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add text alignment utility classes 6546/head
authorMark Otto <otto@github.com>
Thu, 10 Jan 2013 02:56:08 +0000 (18:56 -0800)
committerMark Otto <otto@github.com>
Thu, 10 Jan 2013 02:56:08 +0000 (18:56 -0800)
docs/assets/css/bootstrap.css
docs/css.html
docs/templates/pages/css.mustache
less/type.less

index fcc8a8c10760de52b26f4171910225608172ab9d..3f7434cbdd768eb9ef0a432fd230859a693fc62b 100644 (file)
@@ -510,6 +510,18 @@ a.text-success:hover {
   color: #356635;
 }
 
+.text-left {
+  text-align: left;
+}
+
+.text-right {
+  text-align: right;
+}
+
+.text-center {
+  text-align: center;
+}
+
 h1,
 h2,
 h3,
index 53cd678d03e80d47730106b90d10bc6b3a3d7a20..64527c34feb234e0f5dbea7bd0e1e04db53f9230 100644 (file)
 
           <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">
index 47abef021d6d0eda183807e40d33c2a63960c71f..800dd2ff354652b053b1e43b04d9c9aa4125914f 100644 (file)
 
           <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">
index 3aac597bd21f1475690224dc709f1d22c4a93cd9..a1789fd79f3c56d9fb24b7ce60968081e89cbd73 100644 (file)
@@ -40,6 +40,10 @@ a.text-error:hover   { color: darken(@state-error-text, 10%); }
 .text-success        { color: @state-success-text; }
 a.text-success:hover { color: darken(@state-success-text, 10%); }
 
+.text-left           { text-align: left; }
+.text-right          { text-align: right; }
+.text-center         { text-align: center; }
+
 
 // Headings
 // -------------------------