modular.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ---
  2. layout: documentation
  3. doc-tab: overview
  4. doc-subtab: modular
  5. ---
  6. {% include subnav-overview.html %}
  7. <section class="section">
  8. <div class="container">
  9. <h1 class="title">Modular</h1>
  10. <h2 class="subtitle">Just import what you <strong>need</strong></h2>
  11. <hr>
  12. <div class="content">
  13. <p>
  14. Bulma consists of <strong>29</strong> <code>.sass</code> files that you can import <strong>individually.</strong>
  15. </p>
  16. <p>
  17. For example, let's say you only want the Bulma <strong>columns.</strong>
  18. <br>
  19. The file is located in the <code>bulma/sass/grid</code> folder.
  20. <br>
  21. Simply <strong>import</strong> it directly:
  22. </p>
  23. {% highlight sass %}
  24. @import "bulma/sass/grid/columns.sass"
  25. {% endhighlight %}
  26. <p>
  27. Now you can use the classes <code>.columns</code> (for the container) and <code>.column</code> directly:
  28. </p>
  29. {% highlight html %}
  30. <div class="columns">
  31. <div class="column">1</div>
  32. <div class="column">2</div>
  33. <div class="column">3</div>
  34. <div class="column">4</div>
  35. <div class="column">5</div>
  36. </div>
  37. {% endhighlight %}
  38. <hr>
  39. <p>
  40. What if you only want the <strong>button</strong> styles instead?
  41. </p>
  42. {% highlight sass %}
  43. @import "bulma/sass/elements/button.sass"
  44. {% endhighlight %}
  45. <p>
  46. You can now use the <code>.button</code> class, and all its modifiers:
  47. </p>
  48. <ul>
  49. <li>
  50. <code>.is-active</code>
  51. </li>
  52. <li>
  53. <code>.is-primary</code>,
  54. <code>.is-info</code>,
  55. <code>.is-success</code>...
  56. </li>
  57. <li>
  58. <code>.is-small</code>,
  59. <code>.is-medium</code>,
  60. <code>.is-large</code>
  61. </li>
  62. <li>
  63. <code>.is-outlined</code>,
  64. <code>.is-inverted</code>,
  65. <code>.is-link</code>
  66. </li>
  67. <li>
  68. <code>.is-disabled</code>,
  69. <code>.is-loading</code>
  70. </li>
  71. </ul>
  72. {% highlight html %}
  73. <a class="button">
  74. Button
  75. </a>
  76. <a class="button is-primary">
  77. Primary button
  78. </a>
  79. <a class="button is-large">
  80. Large button
  81. </a>
  82. <a class="button is-loading">
  83. Loading button
  84. </a>
  85. {% endhighlight %}
  86. </div>
  87. </div>
  88. </section>