Browse Source

Fixes #1001 (#1005)

* Fix #1001

* Order modifiers alphabetically.
Daniele Lenares 8 years ago
parent
commit
5cee4c8974
2 changed files with 46 additions and 0 deletions
  1. 37 0
      docs/documentation/modifiers/typography-helpers.html
  2. 9 0
      sass/base/helpers.sass

+ 37 - 0
docs/documentation/modifiers/typography-helpers.html

@@ -266,5 +266,42 @@ doc-subtab: typography-helpers
       </tbody>
     </table>
 
+    <hr>
+
+    <h3 class="title">Text transformation</h3>
+
+    <div class="content">
+      <p>
+        You can transform the text with the use of one of <strong>3 text transformation helpers</strong>:
+      </p>
+    </div>
+
+    <table class="table is-bordered">
+      <thead>
+      <tr>
+        <th>
+          Class
+        </th>
+        <th>
+          Transformation
+        </th>
+      </tr>
+      </thead>
+      <tbody>
+      <tr>
+        <td><code>.is-capitalized</code></td>
+        Transforms <strong>the first character</strong> of each word to <strong>uppercase</strong>
+      </tr>
+      <tr>
+        <td><code>.is-lowercase</code></td>
+        <td>Transforms all characters to <strong>lowercase</strong></td>
+      </tr>
+      <tr>
+        <td><code>.is-uppercase</code></td>
+        <td>Transforms all characters to <strong>uppercase</strong></td>
+      </tr>
+      </tbody>
+    </table>
+
   </div>
 </section>

+ 9 - 0
sass/base/helpers.sass

@@ -53,6 +53,15 @@
 .has-text-right
   text-align: right !important
 
+.is-capitalized
+  text-transform: capitalize !important
+
+.is-lowercase
+  text-transform: lowercase !important
+
+.is-uppercase
+  text-transform: uppercase !important
+
 @each $name, $pair in $colors
   $color: nth($pair, 1)
   .has-text-#{$name}