modular.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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> the utilities dependencies, and then the files you need directly:
  22. </p>
  23. {% highlight sass %}
  24. @import "bulma/sass/utilities/_all
  25. @import "bulma/sass/grid/columns"
  26. {% endhighlight %}
  27. <p>
  28. Now you can use the classes <code>.columns</code> (for the container) and <code>.column</code> directly:
  29. </p>
  30. {% highlight html %}
  31. <div class="columns">
  32. <div class="column">1</div>
  33. <div class="column">2</div>
  34. <div class="column">3</div>
  35. <div class="column">4</div>
  36. <div class="column">5</div>
  37. </div>
  38. {% endhighlight %}
  39. <hr>
  40. <p>
  41. What if you only want the <strong>button</strong> styles instead?
  42. </p>
  43. {% highlight sass %}
  44. @import "bulma/sass/elements/button.sass"
  45. {% endhighlight %}
  46. <p>
  47. You can now use the <code>.button</code> class, and all its modifiers:
  48. </p>
  49. <ul>
  50. <li>
  51. <code>.is-active</code>
  52. </li>
  53. <li>
  54. <code>.is-primary</code>,
  55. <code>.is-info</code>,
  56. <code>.is-success</code>...
  57. </li>
  58. <li>
  59. <code>.is-small</code>,
  60. <code>.is-medium</code>,
  61. <code>.is-large</code>
  62. </li>
  63. <li>
  64. <code>.is-outlined</code>,
  65. <code>.is-inverted</code>,
  66. <code>.is-link</code>
  67. </li>
  68. <li>
  69. <code>.is-disabled</code>,
  70. <code>.is-loading</code>
  71. </li>
  72. </ul>
  73. {% highlight html %}
  74. <a class="button">
  75. Button
  76. </a>
  77. <a class="button is-primary">
  78. Primary button
  79. </a>
  80. <a class="button is-large">
  81. Large button
  82. </a>
  83. <a class="button is-loading">
  84. Loading button
  85. </a>
  86. {% endhighlight %}
  87. </div>
  88. </div>
  89. </section>