Improve components documentation

This commit is contained in:
Jeremy Thomas
2019-10-13 19:20:44 +01:00
parent d4c7731792
commit e5390369a9
13 changed files with 100 additions and 29 deletions

View File

@@ -56,7 +56,7 @@ meta:
<div class="content">
<p>
The <code>.box</code> element is simply a container with a shadow, a border, a radius, and some padding.
The <code>box</code> element is simply a container with a shadow, a border, a radius, and some padding.
<br>
For example, you can include a media object:
</p>

View File

@@ -512,7 +512,7 @@ meta:
<div class="content">
<p>
The <code>.button</code> class can be used on:
The <code>button</code> class can be used on:
</p>
<ul>
<li>
@@ -585,7 +585,7 @@ meta:
<div class="content">
<p>
You can change the size of <strong>multiple buttons</strong> at once by wrapping them in a <code>.buttons</code> parent, and applying one of 3 modifiers:
You can change the size of <strong>multiple buttons</strong> at once by wrapping them in a <code>buttons</code> parent, and applying one of 3 modifiers:
</p>
<ul>
<li>
@@ -674,13 +674,13 @@ meta:
</p>
<ul>
<li>
<code>:hover</code> and <code>.is-hovered</code>
<code>:hover</code> and <code>is-hovered</code>
</li>
<li>
<code>:focus</code> and <code>.is-focused</code>
<code>:focus</code> and <code>is-focused</code>
</li>
<li>
<code>:active</code> and <code>.is-active</code>
<code>:active</code> and <code>is-active</code>
</li>
</ul>
<p>
@@ -708,7 +708,7 @@ meta:
<div class="content">
<p>
You can very easily turn a button into its <strong>loading</strong> version by appending the <code>.is-loading</code> modifier. You don't even need to remove the inner text, which allows the button to maintain its <strong>original size</strong> between its default and loading states.
You can very easily turn a button into its <strong>loading</strong> version by appending the <code>is-loading</code> modifier. You don't even need to remove the inner text, which allows the button to maintain its <strong>original size</strong> between its default and loading states.
</p>
</div>
@@ -828,7 +828,7 @@ meta:
<div class="column">
<div class="content">
<p>
You can create a <strong>list of buttons</strong> by using the <code>.buttons</code> container.
You can create a <strong>list of buttons</strong> by using the <code>buttons</code> container.
</p>
</div>
<div class="bd-example">
@@ -860,7 +860,7 @@ meta:
<div class="column">
<div class="content">
<p>
You can <strong>attach buttons together</strong> with the <code>.has-addons</code> modifier.
You can <strong>attach buttons together</strong> with the <code>has-addons</code> modifier.
</p>
</div>
<div class="bd-example">

View File

@@ -51,7 +51,7 @@ meta:
<div class="content">
<p>
The <code>.delete</code> element is a stand-alone element that can be used in different contexts.
The <code>delete</code> element is a stand-alone element that can be used in different contexts.
</p>
<p>
On its own, it's a simple circle with a cross:

View File

@@ -94,7 +94,8 @@ meta:
<div class="content">
<p>
By default, the <code>icon</code> container will take up <em>exactly</em> <code>1.5rem x 1.5rem</code>. The icon itself is sized accordingly to the icon library you're using. For example, Font Awesome 5 icons will <strong>inherit</strong> the font size.</p>
By default, the <code>icon</code> container will take up <em>exactly</em> <code>1.5rem x 1.5rem</code>. The icon itself is sized accordingly to the icon library you're using. For example, Font Awesome 5 icons will <strong>inherit</strong> the font size.
</p>
</div>
{% include elements/anchor.html name="Colors" %}

View File

@@ -47,7 +47,7 @@ meta:
{% endcapture %}
<div class="content">
<p>Because images can take a few seconds to load (or not at all), use the <code>.image</code> container to specify a <strong>precisely sized</strong> container so that your layout isn't broken because of image loading or image errors.</p>
<p>Because images can take a few seconds to load (or not at all), use the <code>image</code> container to specify a <strong>precisely sized</strong> container so that your layout isn't broken because of image loading or image errors.</p>
</div>
{% include elements/snippet.html content=image %}
@@ -73,7 +73,7 @@ meta:
{% include elements/anchor.html name="Rounded images" %}
<div class="content">
<p>You can also make rounded images, using <code>.is-rounded</code> class:</p>
<p>You can also make rounded images, using <code>is-rounded</code> class:</p>
</div>
{% include elements/snippet.html content=rounded_image %}
@@ -178,7 +178,7 @@ meta:
</table>
<div class="content">
<p>The <code>.image</code> container will usually take up the <strong>whole width</strong> while maintaining the perfect ratio.
<p>The <code>image</code> container will usually take up the <strong>whole width</strong> while maintaining the perfect ratio.
<br>If it doesn't, you can force it by appending the <code>is-fullwidth</code> modifier.</p>
</div>
@@ -188,7 +188,7 @@ meta:
<div class="content">
<p>
You can apply a specific <strong>ratio</strong> on <strong>any element</strong> other than an <code>img</code>, simply by applying the <code>.has-ratio</code> modifier to a resizable element.
You can apply a specific <strong>ratio</strong> on <strong>any element</strong> other than an <code>img</code>, simply by applying the <code>has-ratio</code> modifier to a resizable element.
</p>
<p>
For example, you can apply a <code>16by9</code> ratio on an <code>iframe</code>. Resize the browser, and you'll see how the ratio is maintained.

View File

@@ -54,7 +54,7 @@ document.addEventListener('DOMContentLoaded', () => {
<div class="content">
<p>
The notification is a simple colored block meant to draw the attention to the user about something. As such, it can be used as a pinned notification in the corner of the viewport. That's why it supports the use of the <code>.delete</code> element.
The notification is a simple colored block meant to draw the attention to the user about something. As such, it can be used as a pinned notification in the corner of the viewport. That's why it supports the use of the <code>delete</code> element.
</p>
</div>

View File

@@ -315,10 +315,13 @@ meta:
{% endcapture %}
<div class="content">
<p>You simply need to attach a single <code>.table</code> CSS class on a <code>&lt;table&gt;</code> with the following structure:</p>
<p>
You can create a <strong>Bulma table</strong> simply by attaching a single <code>table</code> CSS class on a <code>&lt;table&gt;</code> HTML element with the following structure:
</p>
<ul>
<li>
<code>table</code> the main <strong>container</strong>
<code>&lt;table class="table"&gt;</code> as the main <strong>container</strong>
<ul>
<li>
<code>thead</code> the optional <strong>top</strong> part of the table

View File

@@ -406,7 +406,7 @@ meta:
<div class="column">
<div class="content">
<p>
You can now create a <strong>list of tags</strong> with the <code>.tags</code> container.
You can now create a <strong>list of tags</strong> with the <code>tags</code> container.
</p>
</div>
<div class="bd-example">
@@ -438,7 +438,7 @@ meta:
<div class="column">
<div class="content">
<p>
You can <strong>attach tags together</strong> with the <code>.has-addons</code> modifier.
You can <strong>attach tags together</strong> with the <code>has-addons</code> modifier.
</p>
</div>
<div class="bd-example">
@@ -470,7 +470,7 @@ meta:
<div class="column">
<div class="content">
<p>
If you want to attach <code>.tags</code> containers <strong>together</strong>, simply use the <code>.field</code> element with the <code>.is-grouped</code> and <code>.is-grouped-multiline</code> modifiers.
If you want to attach <code>tags</code> containers <strong>together</strong>, simply use the <code>field</code> element with the <code>is-grouped</code> and <code>is-grouped-multiline</code> modifiers.
</p>
</div>
<div class="bd-example">

View File

@@ -65,10 +65,10 @@ meta:
<p>There are <strong>2 types</strong> of heading:</p>
<ul>
<li>
<code>.title</code>
<code>title</code>
</li>
<li>
<code>.subtitle</code>
<code>subtitle</code>
</li>
</ul>
</div>