Explorar el Código

Feature/typo weight modifier (#1171)

* Update new steps extension image size

* Add text weight modifiers + update doc
Wikiki hace 7 años
padre
commit
ac533a21c1
Se han modificado 2 ficheros con 48 adiciones y 0 borrados
  1. 39 0
      docs/documentation/modifiers/typography-helpers.html
  2. 9 0
      sass/base/helpers.sass

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

@@ -385,5 +385,44 @@ doc-subtab: typography-helpers
       </tbody>
       </tbody>
     </table>
     </table>
 
 
+    {% include anchor.html name="Text weight" %}
+
+    <div class="content">
+      <p>
+        You can transform the text weight with the use of one of <strong>4 text weight helpers</strong>:
+      </p>
+    </div>
+
+    <table class="table is-bordered">
+      <thead>
+      <tr>
+        <th>
+          Class
+        </th>
+        <th>
+          Weight
+        </th>
+      </tr>
+      </thead>
+      <tbody>
+      <tr>
+        <td><code>.has-text-weight-light</code></td>
+        <td>Transforms  text weight to <strong>light</strong></td>
+      </tr>
+      <tr>
+        <td><code>.has-text-weight-normal</code></td>
+        <td>Transforms text weight to <strong>normal</strong></td>
+      </tr>
+      <tr>
+        <td><code>.has-text-weight-semibold</code></td>
+        <td>Transforms text weight to <strong>semi-bold</strong></td>
+      </tr>
+      <tr>
+        <td><code>.has-text-weight-bold</code></td>
+        <td>Transforms text weight to <strong>bold</strong></td>
+      </tr>
+      </tbody>
+    </table>
+
   </div>
   </div>
 </section>
 </section>

+ 9 - 0
sass/base/helpers.sass

@@ -102,6 +102,15 @@ $alignments: ('centered': 'center', 'left': 'left', 'right': 'right')
   .has-text-#{$name}
   .has-text-#{$name}
     color: $shade !important
     color: $shade !important
 
 
+.has-text-weight-light
+  font-weight: $weight-light !important
+.has-text-weight-normal
+  font-weight: $weight-normal !important
+.has-text-weight-semibold
+  font-weight: $weight-semibold !important
+.has-text-weight-bold
+  font-weight: $weight-bold !important
+
 // Visibility
 // Visibility
 
 
 $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'
 $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'