123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- ---
- title: Responsive helpers
- layout: documentation
- doc-tab: modifiers
- doc-subtab: responsive-helpers
- ---
- {% capture thead %}
- <thead>
- <tr>
- <th>
- Class
- </th>
- <th>
- Mobile<br>
- Up to <code>768px</code>
- </th>
- <th>
- Tablet<br>
- Between <code>769px</code> and <code>1007px</code>
- </th>
- <th>
- Desktop<br>
- Between <code>1008px</code> and <code>1199px</code>
- </th>
- <th>
- Widescreen<br>
- Between <code>1200px</code> and <code>1391px</code>
- </th>
- <th>
- FullHD<br>
- Above <code>1392px</code>
- </th>
- </tr>
- </thead>
- {% endcapture %}
- {% capture flex %}
- <td class="is-narrow">
- <p class="notification is-success">flex</p>
- </td>
- {% endcapture %}
- {% capture visible %}
- <td class="is-narrow">
- <p class="notification is-success">visible</p>
- </td>
- {% endcapture %}
- {% capture hidden %}
- <td class="is-narrow">
- <p class="notification">hidden</p>
- </td>
- {% endcapture %}
- {% capture unchanged %}
- <td class="is-narrow">
- <p class="notification">unchanged</p>
- </td>
- {% endcapture %}
- {% include subnav-modifiers.html %}
- <section class="section">
- <div class="container">
- <h1 class="title">Responsive helpers</h1>
- <h2 class="subtitle"><strong>Show/hide content</strong> depending on the width of the viewport</h2>
- {% include anchor.html name="Show" %}
- <div class="content">
- <p>
- You can use one of the following <code>display</code> classes:
- </p>
- <ul>
- <li><code>block</code></li>
- <li><code>flex</code></li>
- <li><code>inline</code></li>
- <li><code>inline-block</code></li>
- <li><code>inline-flex</code></li>
- </ul>
- <p>For example, here's what the <code>is-flex</code> helper works:</p>
- </div>
- <table class="table is-bordered">
- {{ thead }}
- <tbody>
- <tr>
- <td class="is-narrow">
- <code>is-flex-mobile</code>
- </td>
- {{ flex }}
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-tablet-only</code>
- </td>
- {{ unchanged }}
- {{ flex }}
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-desktop-only</code>
- </td>
- {{ unchanged }}
- {{ unchanged }}
- {{ flex }}
- {{ unchanged }}
- {{ unchanged }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-widescreen-only</code>
- </td>
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- {{ flex }}
- {{ unchanged }}
- </tr>
- <tr>
- <th colspan="5">
- <p>Classes to display <strong>up to</strong> or <strong>from</strong> a specific breakpoint</p>
- </th>
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-touch</code>
- </td>
- {{ flex }}
- {{ flex }}
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-tablet</code>
- </td>
- {{ unchanged }}
- {{ flex }}
- {{ flex }}
- {{ flex }}
- {{ flex }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-desktop</code>
- </td>
- {{ unchanged }}
- {{ unchanged }}
- {{ flex }}
- {{ flex }}
- {{ flex }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-widescreen</code>
- </td>
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- {{ flex }}
- {{ flex }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-flex-fullhd</code>
- </td>
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- {{ unchanged }}
- {{ flex }}
- </tr>
- </tbody>
- </table>
- <div class="content">
- <p>
- For the other display options, just replace <code>is-flex</code> with <code>is-block</code> <code>is-inline</code> <code>is-inline-block</code> or <code>is-inline-flex</code>
- </p>
- </div>
- {% include anchor.html name="Hide" %}
- <table class="table is-bordered">
- {{ thead }}
- <tbody>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-mobile</code>
- </td>
- {{ hidden }}
- {{ visible }}
- {{ visible }}
- {{ visible }}
- {{ visible }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-tablet-only</code>
- </td>
- {{ visible }}
- {{ hidden }}
- {{ visible }}
- {{ visible }}
- {{ visible }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-desktop-only</code>
- </td>
- {{ visible }}
- {{ visible }}
- {{ hidden }}
- {{ visible }}
- {{ visible }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-widescreen-only</code>
- </td>
- {{ visible }}
- {{ visible }}
- {{ visible }}
- {{ hidden }}
- {{ visible }}
- </tr>
- <tr>
- <th colspan="5">
- <p>Classes to hide <strong>up to</strong> or <strong>from</strong> a specific breakpoint</p>
- </th>
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-touch</code>
- </td>
- {{ hidden }}
- {{ hidden }}
- {{ visible }}
- {{ visible }}
- {{ visible }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-tablet</code>
- </td>
- {{ visible }}
- {{ hidden }}
- {{ hidden }}
- {{ hidden }}
- {{ hidden }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-desktop</code>
- </td>
- {{ visible }}
- {{ visible }}
- {{ hidden }}
- {{ hidden }}
- {{ hidden }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-widescreen</code>
- </td>
- {{ visible }}
- {{ visible }}
- {{ visible }}
- {{ hidden }}
- {{ hidden }}
- </tr>
- <tr>
- <td class="is-narrow">
- <code>is-hidden-fullhd</code>
- </td>
- {{ visible }}
- {{ visible }}
- {{ visible }}
- {{ visible }}
- {{ hidden }}
- </tr>
- </tbody>
- </table>
- </div>
- </section>
|