2020-06-08 09:57:35 +00:00
|
|
|
---
|
|
|
|
title: Modifiers syntax
|
|
|
|
layout: documentation
|
|
|
|
doc-tab: overview
|
|
|
|
doc-subtab: modifiers
|
|
|
|
breadcrumb:
|
|
|
|
- home
|
|
|
|
- documentation
|
|
|
|
- overview
|
|
|
|
- overview-modifiers
|
|
|
|
---
|
|
|
|
|
|
|
|
{% capture button_example %}
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
{% endcapture %}
|
|
|
|
|
|
|
|
{% capture button_primary_example %}
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
{% endcapture %}
|
|
|
|
|
|
|
|
{% capture button_colors %}
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-link">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-info">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-success">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-warning">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-danger">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
{% endcapture %}
|
|
|
|
|
|
|
|
{% capture button_sizes %}
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-small">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-medium">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-large">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
{% endcapture %}
|
|
|
|
|
|
|
|
{% capture button_states %}
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary is-outlined">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-loading">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button" disabled>
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
{% endcapture %}
|
|
|
|
|
|
|
|
{% capture button_combinations %}
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary is-small" disabled>
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-info is-loading">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
|
|
|
<button class="button is-danger is-outlined is-large">
|
2020-06-08 09:57:35 +00:00
|
|
|
Button
|
2021-09-19 00:23:53 +00:00
|
|
|
</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
{% endcapture %}
|
|
|
|
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<p>Let's start with a simple <strong>button</strong> that uses the <code>"button"</code> CSS class:</p>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p>
|
|
|
|
{{button_example}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column is-half">
|
|
|
|
{% highlight html %}{{button_example}}{% endhighlight %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<p>By <strong>adding</strong> the <code>"is-primary"</code> CSS class, you can modify the <strong>color</strong>:</p>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p>
|
|
|
|
{{button_primary_example}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column is-half">
|
|
|
|
{% highlight html %}{{button_primary_example}}{% endhighlight %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<div class="content">
|
|
|
|
<p>You can use one of the <strong>6 main colors</strong>:</p>
|
|
|
|
<ul>
|
|
|
|
<li><code>is-primary</code></li>
|
|
|
|
<li><code>is-link</code></li>
|
|
|
|
<li><code>is-info</code></li>
|
|
|
|
<li><code>is-success</code></li>
|
|
|
|
<li><code>is-warning</code></li>
|
|
|
|
<li><code>is-danger</code></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-link">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-info">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-success">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-warning">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-danger">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column is-half">
|
2021-01-27 23:30:42 +00:00
|
|
|
<div class="bd-highlight-full">
|
2020-06-08 09:57:35 +00:00
|
|
|
{% highlight html %}{{ button_colors }}{% endhighlight %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<div class="content">
|
|
|
|
<p>You can also alter the <strong>size</strong>:</p>
|
|
|
|
<ul>
|
|
|
|
<li><code>is-small</code></li>
|
|
|
|
<li><code>is-medium</code></li>
|
|
|
|
<li><code>is-large</code></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-small">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-medium">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-large">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column is-half">
|
|
|
|
{% highlight html %}{{ button_sizes }}{% endhighlight %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<div class="content">
|
|
|
|
<p>Or the <strong>style</strong> or <strong>state</strong>:</p>
|
|
|
|
<ul>
|
|
|
|
<li><code>is-outlined</code></li>
|
|
|
|
<li><code>is-loading</code></li>
|
|
|
|
<li><code>[disabled]</code></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary is-outlined">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-loading">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button" disabled>Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column is-half">
|
|
|
|
{% highlight html %}{{ button_states }}{% endhighlight %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<div class="content">
|
|
|
|
As a result, it's very easy to <strong>combine modifiers:</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-primary is-small" disabled>Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-info is-loading">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
<p class="field">
|
2021-09-19 00:23:53 +00:00
|
|
|
<button class="button is-danger is-outlined is-large">Button</button>
|
2020-06-08 09:57:35 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column is-half">
|
|
|
|
{% highlight html %}{{ button_combinations }}{% endhighlight %}
|
|
|
|
</div>
|
|
|
|
</div>
|