mixins.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. title: Mixins
  3. layout: documentation
  4. doc-tab: overview
  5. doc-subtab: mixins
  6. ---
  7. {% include subnav-overview.html %}
  8. <section class="section">
  9. <div class="container">
  10. <h1 class="title">Mixins</h1>
  11. <h2 class="subtitle">Utility mixins for custom elements and responsive helpers</h2>
  12. <hr>
  13. <table class="table is-bordered">
  14. <tr>
  15. <td><code>=arrow($color)</code></td>
  16. <td>Creates a CSS-only down arrow. Used for the dropdown select.</td>
  17. </tr>
  18. <tr>
  19. <td><code>=block</code></td>
  20. <td>Defines a margin-bottom of 1.5rem, except when the element is the last child. Used for almost all block elements.</td>
  21. </tr>
  22. <tr>
  23. <td><code>=clearfix</code></td>
  24. <td>Adds a clearfix at the end of the element. Used for the "is-clearfix" helper.</td>
  25. </tr>
  26. <tr>
  27. <td><code>=center($size)</code></td>
  28. <td>Positions an element in the exact center of its parent. Used for the spinner in a loading button.</td>
  29. </tr>
  30. <tr>
  31. <td><code>=delete</code></td>
  32. <td>Creates a CSS-only cross. Used for the delete element in modals, messages, tags...</td>
  33. </tr>
  34. <tr>
  35. <td><code>=fa($size, $dimensions)</code></td>
  36. <td>Sets the style of a Font Awesome icon container.</td>
  37. </tr>
  38. <tr>
  39. <td><code>=hamburger($dimensions)</code></td>
  40. <td>Creates a CSS-only hamburger menu with 3 bars. Used for the "nav-toggle".</td>
  41. </tr>
  42. <tr>
  43. <td><code>=loader</code></td>
  44. <td>Creates a CSS-only loading spinner. Used for the ".loader" element, and for input and button spinners.</td>
  45. </tr>
  46. <tr>
  47. <td><code>=overflow-touch</code></td>
  48. <td>Sets the style of a container so that it keeps momentum when scrolling on iOS devices.</td>
  49. </tr>
  50. <tr>
  51. <td><code>=overlay($offset: 0)</code></td>
  52. <td>Makes the element overlay its parent container, like the transparent modal background.</td>
  53. </tr>
  54. <tr>
  55. <td><code>=placeholder</code></td>
  56. <td>Sets the styles of an input placeholder.</td>
  57. </tr>
  58. <tr>
  59. <td><code>=unselectable</code></td>
  60. <td>Turns the element unselectable. Used for buttons to prevent selection when clicking.</td>
  61. </tr>
  62. </table>
  63. <div class="content">
  64. <p>These mixins are already used throughout Bulma, but you can use them as well to extend your own styles.</p>
  65. </div>
  66. </div>
  67. </section>