Skip to content

Commit

Permalink
Improve components documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jgthms committed Oct 18, 2019
1 parent d4c7731 commit e539036
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 29 deletions.
7 changes: 4 additions & 3 deletions docs/documentation/components/breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@
{% endcapture %}

<div class="content">
<p>The <strong>breadcrumb</strong> component only requires a <code>.breadcrumb</code> container and a <code>ul</code> list.</p>
<p>The dividers are automatically created in the content of the <code>::before</code> pseudo-element of <code>li</code> tags.</p>
<p>
The Bulma <strong>breadcrumb</strong> is a simple navigation component that only requires a <code>breadcrumb</code> container and a <code>ul</code> list. The dividers are automatically created in the content of the <code>::before</code> pseudo-element of <code>li</code> tags.
</p>
<p>You can inform the current page using the <code>is-active</code> modifier in a <code>li</code> tag. It will disable the navigation of inner links.</p>
</div>

Expand All @@ -175,7 +176,7 @@
{% include elements/anchor.html name="Alignment" %}

<div class="content">
<p>For alternative alignments, use the <code>is-centered</code> and <code>is-right</code> modifiers on the <code>.breadcrumb</code> container.</p>
<p>For alternative alignments, use the <code>is-centered</code> and <code>is-right</code> modifiers on the <code>breadcrumb</code> container.</p>
</div>

{% include elements/snippet.html content=breadcrumb_centered_example horizontal=true clipped=true %}
Expand Down
17 changes: 17 additions & 0 deletions docs/documentation/components/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@
</aside>
{% endcapture %}

<div class="content">
<p>
The Bulma <code>menu</code> is a vertical navigation component that comprises:
</p>
<ul>
<li>
the <code>menu</code> container
</li>
<li>
informative <code>menu-label</code> labels
</li>
<li>
interactive <code>menu-list</code> lists that can be nested up to 2 levels
</li>
</ul>
</div>

{% include elements/snippet.html content=menu_example size="one-third" %}

{% include elements/variables.html type='component' %}
33 changes: 32 additions & 1 deletion docs/documentation/components/message.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,53 @@
{% endfor %}
{% endcapture %}

<div class="content">
<p>
The Bulma <code>message</code> is a multi-part component:
</p>
<ul>
<li>
the <code>message</code> container
</li>
<li>
the optional <code>message-header</code> that can hold a title and a <code>delete</code> element
</li>
<li>
the <code>message-body</code> for the longer body of the message
</li>
</ul>
</div>

{% include elements/snippet.html content=message_example %}

{% include elements/anchor.html name="Colors" %}

<div class="content">
<p>
The message component is available in all the <strong>different colors</strong> defined by the <a href="{{ site.data.links.by_id.customize-variables.path }}"><code>$colors</code> Sass map</a>.
</p>
</div>

{% include elements/snippet.html content=message_colors_example %}

{% include elements/anchor.html name="Message body only" %}

<div class="content">
<p>You can <strong>omit</strong> the message header:</p>
<p>
You can remove the <code>message-header</code> if you don't need it, which will add a left border to the <code>message-body</code>:
</p>
</div>

{% include elements/snippet.html content=message_body_example %}

{% include elements/anchor.html name="Sizes" %}

<div class="content">
<p>
You can add one of <strong>3 size modifiers</strong> to the <code>message</code> component:
</p>
</div>

{% include elements/snippet.html content=message_small %}

{% include elements/snippet.html content=message_normal %}
Expand Down
22 changes: 20 additions & 2 deletions docs/documentation/components/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,26 @@
{% endcapture %}

<div class="content">
<p><strong>Tabs</strong> only require a <code>tabs</code> container and a <code>&lt;ul&gt;</code> list.<br>
The <strong>default</strong> tabs style has a single border at the bottom.</p>
<p>
The Bulma <code>tabs</code> are a straightforward navigation component that come in a variety of versions. They only require the following structure:
</p>
<ul>
<li>
a <code>tabs</code> container
</li>
<li>
a <code>&lt;ul&gt;</code> HTML element
</li>
<li>
a list of <code>&lt;li&gt;</code> HTML element
</li>
<li>
<code>&lt;a&gt;</code> HTML anchor elements for each link
</li>
</ul>
<p>
The <strong>default</strong> tabs style has a single border at the bottom.
</p>
</div>

{% include elements/snippet.html content=tabs_example horizontal=true %}
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/elements/box.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

<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>
Expand Down
16 changes: 8 additions & 8 deletions docs/documentation/elements/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@

<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>
Expand Down Expand Up @@ -585,7 +585,7 @@

<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>
Expand Down Expand Up @@ -674,13 +674,13 @@ <h4 class="subtitle">Rounded buttons</h4>
</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>
Expand Down Expand Up @@ -708,7 +708,7 @@ <h4 class="subtitle">Loading</h4>

<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>

Expand Down Expand Up @@ -828,7 +828,7 @@ <h4 class="subtitle">With Font Awesome icons</h4>
<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">
Expand Down Expand Up @@ -860,7 +860,7 @@ <h4 class="subtitle">With Font Awesome icons</h4>
<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">
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/elements/delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<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:
Expand Down
3 changes: 2 additions & 1 deletion docs/documentation/elements/icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@

<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" %}
Expand Down
8 changes: 4 additions & 4 deletions docs/documentation/elements/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{% 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 %}
Expand All @@ -73,7 +73,7 @@
{% 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 %}
Expand Down Expand Up @@ -178,7 +178,7 @@
</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>

Expand All @@ -188,7 +188,7 @@

<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.
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/elements/notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<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>

Expand Down
7 changes: 5 additions & 2 deletions docs/documentation/elements/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,13 @@
{% 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
Expand Down
6 changes: 3 additions & 3 deletions docs/documentation/elements/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
<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">
Expand Down Expand Up @@ -438,7 +438,7 @@
<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">
Expand Down Expand Up @@ -470,7 +470,7 @@
<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">
Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/elements/title.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ <h6 class="subtitle is-6">Subtitle 6</h6>
<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>
Expand Down

0 comments on commit e539036

Please sign in to comment.