mixins.html 2.1 KB

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