typography-helpers.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. ---
  2. layout: documentation
  3. doc-tab: modifiers
  4. doc-subtab: typography-helpers
  5. ---
  6. {% capture thead %}
  7. <thead>
  8. <tr>
  9. <th>
  10. Class
  11. </th>
  12. <th>
  13. Mobile<br>
  14. Up to <code>768px</code>
  15. </th>
  16. <th>
  17. Tablet<br>
  18. Between <code>769px</code> and <code>1007px</code>
  19. </th>
  20. <th>
  21. Desktop<br>
  22. Between <code>1008px</code> and <code>1199px</code>
  23. </th>
  24. <th>
  25. Widescreen<br>
  26. Between <code>1200px</code> and <code>1391px</code>
  27. </th>
  28. <th>
  29. FullHD<br>
  30. Above <code>1392px</code>
  31. </th>
  32. </tr>
  33. </thead>
  34. {% endcapture %}
  35. {% capture size1 %}
  36. <td class="is-narrow">
  37. <p class="notification is-success"><code>3rem</code></p>
  38. </td>
  39. {% endcapture %}
  40. {% capture unchanged %}
  41. <td class="is-narrow">
  42. <p class="notification">unchanged</p>
  43. </td>
  44. {% endcapture %}
  45. {% include subnav-modifiers.html %}
  46. <section class="section">
  47. <div class="container">
  48. <h1 class="title">Typography helpers</h1>
  49. <h2 class="subtitle">
  50. Change the <strong>size</strong> and <strong>color</strong> of the text for one or multiple viewport width
  51. </h2>
  52. <hr>
  53. <h3 class="title">Size</h3>
  54. <div class="content">
  55. <p>
  56. There are <strong>7 sizes</strong> to choose from:
  57. </p>
  58. </div>
  59. <table class="table is-bordered">
  60. <thead>
  61. <tr>
  62. <th>
  63. Class
  64. </th>
  65. <th>
  66. Font-size
  67. </th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. <tr>
  72. <td><code>is-size-1</code></td>
  73. <td><code>3rem</code></td>
  74. </tr>
  75. <tr>
  76. <td><code>is-size-2</code></td>
  77. <td><code>2.5rem</code></td>
  78. </tr>
  79. <tr>
  80. <td><code>is-size-3</code></td>
  81. <td><code>2rem</code></td>
  82. </tr>
  83. <tr>
  84. <td><code>is-size-4</code></td>
  85. <td><code>1.5rem</code></td>
  86. </tr>
  87. <tr>
  88. <td><code>is-size-5</code></td>
  89. <td><code>1.25rem</code></td>
  90. </tr>
  91. <tr>
  92. <td><code>is-size-6</code></td>
  93. <td><code>1rem</code></td>
  94. </tr>
  95. <tr>
  96. <td><code>is-size-7</code></td>
  97. <td><code>0.75rem</code></td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <hr>
  102. <h3 class="title">
  103. Responsive size
  104. </h3>
  105. <div class="content">
  106. <p>
  107. You can choose a <strong>specific</strong> size for <em>each</em> viewport width. You simply needed to append the <strong>viewport width</strong> to the size modifier.
  108. </p>
  109. <p>
  110. For example, here are the modifiers for <code>$size-1</code>:
  111. </p>
  112. </div>
  113. <table class="table is-bordered">
  114. {{ thead }}
  115. <tbody>
  116. <tr>
  117. <td><code>is-size-1-mobile</code></td>
  118. {{ size1 }}
  119. {{ unchanged }}
  120. {{ unchanged }}
  121. {{ unchanged }}
  122. {{ unchanged }}
  123. </tr>
  124. <tr>
  125. <td><code>is-size-1-tablet</code></td>
  126. {{ unchanged }}
  127. {{ size1 }}
  128. {{ unchanged }}
  129. {{ unchanged }}
  130. {{ unchanged }}
  131. </tr>
  132. <tr>
  133. <td><code>is-size-1-touch</code></td>
  134. {{ size1 }}
  135. {{ size1 }}
  136. {{ unchanged }}
  137. {{ unchanged }}
  138. {{ unchanged }}
  139. </tr>
  140. <tr>
  141. <td><code>is-size-1-desktop</code></td>
  142. {{ unchanged }}
  143. {{ unchanged }}
  144. {{ size1 }}
  145. {{ size1 }}
  146. {{ size1 }}
  147. </tr>
  148. <tr>
  149. <td><code>is-size-1-widescreen</code></td>
  150. {{ unchanged }}
  151. {{ unchanged }}
  152. {{ unchanged }}
  153. {{ size1 }}
  154. {{ size1 }}
  155. </tr>
  156. <tr>
  157. <td><code>is-size-1-fullhd</code></td>
  158. {{ unchanged }}
  159. {{ unchanged }}
  160. {{ unchanged }}
  161. {{ unchanged }}
  162. {{ size1 }}
  163. </tr>
  164. </tbody>
  165. </table>
  166. <div class="content">
  167. <p>
  168. You can use the same logic for each of the <strong>7 sizes</strong>.
  169. </p>
  170. </div>
  171. <hr>
  172. <h3 class="title">
  173. Colors
  174. </h3>
  175. <div class="content">
  176. <p>
  177. You can set any element to one of the <strong>9 colors</strong> or <strong>9 shades of grey</strong>:
  178. </p>
  179. </div>
  180. <table class="table is-bordered">
  181. <thead>
  182. <tr>
  183. <th>
  184. Class
  185. </th>
  186. <th>
  187. Color
  188. </th>
  189. </tr>
  190. </thead>
  191. <tbody>
  192. <tr><td><code>.has-text-white</code></td><td>{% include color/white.html %}</td></tr>
  193. <tr><td><code>.has-text-black</code></td><td>{% include color/black.html %}</td></tr>
  194. <tr><td><code>.has-text-light</code></td><td>{% include color/white-ter.html %}</td></tr>
  195. <tr><td><code>.has-text-dark</code></td><td>{% include color/grey-darker.html %}</td></tr>
  196. <tr><td><code>.has-text-primary</code></td><td>{% include color/turquoise.html %}</td></tr>
  197. <tr><td><code>.has-text-info</code></td><td>{% include color/blue.html %}</td></tr>
  198. <tr><td><code>.has-text-success</code></td><td>{% include color/green.html %}</td></tr>
  199. <tr><td><code>.has-text-warning</code></td><td>{% include color/yellow.html %}</td></tr>
  200. <tr><td><code>.has-text-danger</code></td><td>{% include color/red.html %}</td></tr>
  201. <tr><td><code>.has-text-black-bis</code></td><td>{% include color/black-bis.html %}</td></tr>
  202. <tr><td><code>.has-text-black-ter</code></td><td>{% include color/black-ter.html %}</td></tr>
  203. <tr><td><code>.has-text-grey-darker</code></td><td>{% include color/grey-darker.html %}</td></tr>
  204. <tr><td><code>.has-text-grey-dark</code></td><td>{% include color/grey-dark.html %}</td></tr>
  205. <tr><td><code>.has-text-grey</code></td><td>{% include color/grey.html %}</td></tr>
  206. <tr><td><code>.has-text-grey-light</code></td><td>{% include color/grey-light.html %}</td></tr>
  207. <tr><td><code>.has-text-grey-lighter</code></td><td>{% include color/grey-lighter.html %}</td></tr>
  208. <tr><td><code>.has-text-white-ter</code></td><td>{% include color/white-ter.html %}</td></tr>
  209. <tr><td><code>.has-text-white-bis</code></td><td>{% include color/white-bis.html %}</td></tr>
  210. </tbody>
  211. </table>
  212. <hr>
  213. <h3 class="title">Alignment</h3>
  214. <div class="content">
  215. <p>
  216. You can align the text with the use of one of <strong>3 alignment helpers</strong>:
  217. </p>
  218. </div>
  219. <table class="table is-bordered">
  220. <thead>
  221. <tr>
  222. <th>
  223. Class
  224. </th>
  225. <th>
  226. Alignment
  227. </th>
  228. </tr>
  229. </thead>
  230. <tbody>
  231. <tr>
  232. <td><code>.has-text-centered</code></td>
  233. <td>Makes the text <strong>centered</strong></td>
  234. </tr>
  235. <tr>
  236. <td><code>.has-text-left</code></td>
  237. <td>Makes the text aligned to the <strong>left</strong></td>
  238. </tr>
  239. <tr>
  240. <td><code>.has-text-right</code></td>
  241. <td>Makes the text aligned to the <strong>right</strong></td>
  242. </tr>
  243. </tbody>
  244. </table>
  245. </div>
  246. </section>