responsiveness.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ---
  2. layout: documentation
  3. doc-tab: overview
  4. doc-subtab: responsiveness
  5. ---
  6. {% include subnav-overview.html %}
  7. <section class="section">
  8. <div class="container">
  9. <h1 class="title">Responsiveness</h1>
  10. <h2 class="subtitle">Bulma is a <strong>mobile-first</strong> framework</h2>
  11. <hr>
  12. <h3 class="title">Breakpoints</h3>
  13. <div class="content">
  14. <p>Bulma has 4 breakpoints:</p>
  15. <ul>
  16. <li><code>mobile</code>: up to <code>768px</code></li>
  17. <li><code>tablet</code>: from <code>769px</code></li>
  18. <li><code>desktop</code>: from <code>980px</code></li>
  19. <li><code>widescreen</code>: from <code>1180px</code></li>
  20. </ul>
  21. <p>Bulma uses 7 responsive mixins:</p>
  22. <ul>
  23. <li>
  24. <code>=mobile</code><br>
  25. until <code>768px</code>
  26. </li>
  27. <li>
  28. <code>=tablet</code><br>
  29. from <code>769px</code>
  30. </li>
  31. <li>
  32. <code>=tablet-only</code><br>
  33. from <code>769px</code> and until <code>979px</code>
  34. </li>
  35. <li>
  36. <code>=touch</code><br>
  37. until <code>979px</code>
  38. </li>
  39. <li>
  40. <code>=desktop</code><br>
  41. from <code>980px</code>
  42. </li>
  43. <li>
  44. <code>=desktop-only</code><br>
  45. from <code>980px</code> and until <code>1179px</code>
  46. </li>
  47. <li>
  48. <code>=widescreen</code><br>
  49. from <code>1180px</code>
  50. </li>
  51. </ul>
  52. <p>How Bulma works is that <strong>everything is mobile-first</strong> by default, and responsive mixins act as <em>minimum viewport widths</em> where some alternative styles are applied.</p>
  53. </div>
  54. <table class="table">
  55. <thead>
  56. <tr>
  57. <th>
  58. Mobile<br>
  59. Up to <code>768px</code>
  60. </th>
  61. <th>
  62. Tablet<br>
  63. Between <code>769px</code> and <code>979px</code>
  64. </th>
  65. <th>
  66. Desktop<br>
  67. Between <code>980px</code> and <code>1179px</code>
  68. </th>
  69. <th>
  70. Widescreen<br>
  71. <code>1180px</code> and above
  72. </th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. <tr>
  77. <td class="is-narrow">
  78. <p class="notification is-success">mobile</p>
  79. </td>
  80. <td class="is-narrow" colspan="3">
  81. <p class="notification">-</p>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td class="is-narrow">
  86. <p class="notification">-</p>
  87. </td>
  88. <td class="is-narrow" colspan="3">
  89. <p class="notification is-success">tablet</p>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td class="is-narrow" colspan="2">
  94. <p class="notification">-</p>
  95. </td>
  96. <td class="is-narrow" colspan="3">
  97. <p class="notification is-success">desktop</p>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td class="is-narrow" colspan="3">
  102. <p class="notification">-</p>
  103. </td>
  104. <td class="is-narrow">
  105. <p class="notification is-success">widescreen</p>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td class="is-narrow">
  110. <p class="notification">-</p>
  111. </td>
  112. <td class="is-narrow">
  113. <p class="notification is-success">tablet-only</p>
  114. </td>
  115. <td class="is-narrow" colspan="2">
  116. <p class="notification">-</p>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td class="is-narrow" colspan="2">
  121. <p class="notification">-</p>
  122. </td>
  123. <td class="is-narrow">
  124. <p class="notification is-success">desktop-only</p>
  125. </td>
  126. <td class="is-narrow">
  127. <p class="notification">-</p>
  128. </td>
  129. </tr>
  130. <tr>
  131. <td class="is-narrow" colspan="2">
  132. <p class="notification is-success">touch</p>
  133. </td>
  134. <td class="is-narrow" colspan="2">
  135. <p class="notification">-</p>
  136. </td>
  137. </tr>
  138. </tbody>
  139. </table>
  140. <h4>
  141. <h3 class="title">Vertical by default</h3>
  142. <div class="content">
  143. <p>
  144. Every element in Bulma is <strong>mobile-first</strong> and optmizes for <strong>vertical reading</strong>, so by default on mobile:
  145. </p>
  146. <ul>
  147. <li><code>columns</code> are stacked vertically</li>
  148. <li>the <code>level</code> component will show its children stacked vertically</li>
  149. <li>the <code>nav</code> menu will be hidden</li>
  150. </ul>
  151. <p>For example, you can enforce the <strong>horizontal</strong> layout for both <code>columns</code> or <code>nav</code> by appending the <code>is-mobile</code> modifer.</p>
  152. </div>
  153. </div>
  154. </section>