icon.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ---
  2. layout: documentation
  3. doc-tab: elements
  4. doc-subtab: icon
  5. ---
  6. {% include subnav-elements.html %}
  7. <section class="section">
  8. <div class="container">
  9. <h1 class="title">Icons</h1>
  10. <h2 class="subtitle">
  11. Bulma is compatible with <strong><a href="http://fortawesome.github.io/Font-Awesome/">Font Awesome</a></strong> icons.
  12. </h2>
  13. <hr>
  14. <div class="content">
  15. <p>Because the icons can take a few seconds to load, and because you want control over the <strong>space</strong> the icons will take, you can use the <code>icon</code> class:</p>
  16. </div>
  17. <div class="example">
  18. <span class="icon">
  19. <i class="fa fa-home"></i>
  20. </span>
  21. </div>
  22. {% highlight html %}
  23. <span class="icon">
  24. <i class="fa fa-home"></i>
  25. </span>
  26. {% endhighlight %}
  27. <div class="content">
  28. <p>The <code>icon</code> container will take up <em>exactly</em> <strong>24 x 24 pixels</strong>. The icon itself is sized at <strong>21px</strong>.</p>
  29. </div>
  30. <hr>
  31. <h3 class="title">Sizes</h3>
  32. <div class="content">
  33. <p>Font Awesome icons use a font-size of <strong>28px</strong> by default, and are best rendered when using <strong>multiples of 7</strong>.</p>
  34. <p>The Bulma <code>icon</code> container is always slightly bigger than the font-size used:</p>
  35. </div>
  36. <table class="table">
  37. <thead>
  38. <tr>
  39. <th colspan="2">Class</th>
  40. <th>Font-size</th>
  41. <th>Container size</th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <tr>
  46. <td><code>icon is-small</code></td>
  47. <td><span class="icon is-small"><i class="fa fa-home"></i></span></td>
  48. <td>14px</td>
  49. <td>16x16px</td>
  50. </tr>
  51. <tr>
  52. <td><code>icon</code></td>
  53. <td><span class="icon"><i class="fa fa-home"></i></span></td>
  54. <td>21px</td>
  55. <td>24x24px</td>
  56. </tr>
  57. <tr>
  58. <td><code>icon is-medium</code></td>
  59. <td><span class="icon is-medium"><i class="fa fa-home"></i></span></td>
  60. <td>28px</td>
  61. <td>32x32px</td>
  62. </tr>
  63. <tr>
  64. <td><code>icon is-large</code></td>
  65. <td><span class="icon is-large"><i class="fa fa-home"></i></span></td>
  66. <td>42px</td>
  67. <td>48x48px</td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. </div>
  72. </section>