<hr style="margin-bottom: 0;">
-<h3 id="{{ include.name | slugify }}" class="title is-4 bd-anchor-title">
+<h3 id="{{ include.name | slugify }}" class="title is-4 is-spaced bd-anchor-title">
{{ include.name }}
<a class="bd-anchor-link" href="#{{ include.name | slugify }}">
#
--- /dev/null
+<div class="bd-snippet">
+ <div class="bd-snippet-preview">
+ {{ include.content }}
+ </div>
+ <div class="bd-snippet-code">
+ {% highlight html %}{{ include.content }}{% endhighlight %}
+ </div>
+</div>
.bd-example,
-.bd-structure
- border: 1px solid $warning
- border-top-right-radius: $radius
- color: $warning-invert
- padding: 1.5rem
+.bd-structure,
+.bd-snippet
+ border: 1px solid $yellow
position: relative
- &:not(:first-child)
- margin-top: 2rem
- &:not(:last-child)
- margin-bottom: 1.5rem
&:before
- background: $warning
+ background: $yellow
border-radius: $radius $radius 0 0
bottom: 100%
+ color: $yellow-invert
content: "Example"
display: inline-block
font-size: 7px
border-right: none
padding: 0
+.bd-example,
+.bd-structure
+ padding: 1.5rem
+ &:not(:first-child)
+ margin-top: 2rem
+ &:not(:last-child)
+ margin-bottom: 1.5rem
+
.bd-example
& + .highlight
- border: 1px solid $warning
+ border: 1px solid $yellow
border-radius: 0 0 $radius $radius
border-top: none
margin-top: -1.5rem
&:not(:last-child)
margin-bottom: 1.5rem
+// Snippet
+.bd-snippet
+ +block
+ border: 1px solid $yellow
+ margin-top: 2rem
+ position: relative
+ &::before
+ content: "Snippet"
+ +tablet
+ align-items: stretch
+ display: flex
+
+.bd-snippet-preview,
+.bd-snippet-code
+ +tablet
+ width: 50%
+
+.bd-snippet-preview
+ padding: 1.5rem
+
+.bd-snippet-code
+ background-color: $pre-background
+ +tablet
+ align-items: stretch
+ display: flex
+ flex-direction: column
+ .highlight
+ flex-grow: 1
+
+// Highlight
.highlight.bd-is-hovering
border-radius: 2px
- box-shadow: 0 0 0 3px $border
+ box-shadow: 0 0 0 2px $yellow
.highlight pre
max-height: 480px
right: 0.25rem
top: 0.25rem
&:hover
- background-color: $text
- color: $white
+ background-color: $yellow
+ color: $yellow-invert
.bd-expand
right: 45px
+tablet
@import "./_sass/love"
@import "./_sass/bootstrap"
@import "./_sass/klmn"
-
-// .columns
-// background-color: coral
}
.bd-example,
-.bd-structure {
+.bd-structure,
+.bd-snippet {
border: 1px solid #ffdd57;
- border-top-right-radius: 3px;
- color: rgba(0, 0, 0, 0.7);
- padding: 1.5rem;
position: relative;
}
-.bd-example:not(:first-child),
-.bd-structure:not(:first-child) {
- margin-top: 2rem;
-}
-
-.bd-example:not(:last-child),
-.bd-structure:not(:last-child) {
- margin-bottom: 1.5rem;
-}
-
.bd-example:before,
-.bd-structure:before {
+.bd-structure:before,
+.bd-snippet:before {
background: #ffdd57;
border-radius: 3px 3px 0 0;
bottom: 100%;
+ color: rgba(0, 0, 0, 0.7);
content: "Example";
display: inline-block;
font-size: 7px;
@media screen and (min-width: 769px), print {
.bd-example.is-fullwidth,
- .bd-structure.is-fullwidth {
+ .bd-structure.is-fullwidth,
+ .bd-snippet.is-fullwidth {
border-left: none;
border-right: none;
padding: 0;
}
}
+.bd-example,
+.bd-structure {
+ padding: 1.5rem;
+}
+
+.bd-example:not(:first-child),
+.bd-structure:not(:first-child) {
+ margin-top: 2rem;
+}
+
+.bd-example:not(:last-child),
+.bd-structure:not(:last-child) {
+ margin-bottom: 1.5rem;
+}
+
.bd-example + .highlight {
border: 1px solid #ffdd57;
border-radius: 0 0 3px 3px;
margin-bottom: 1.5rem;
}
+.bd-snippet {
+ border: 1px solid #ffdd57;
+ margin-top: 2rem;
+ position: relative;
+}
+
+.bd-snippet:not(:last-child) {
+ margin-bottom: 1.5rem;
+}
+
+.bd-snippet::before {
+ content: "Snippet";
+}
+
+@media screen and (min-width: 769px), print {
+ .bd-snippet {
+ align-items: stretch;
+ display: flex;
+ }
+}
+
+@media screen and (min-width: 769px), print {
+ .bd-snippet-preview,
+ .bd-snippet-code {
+ width: 50%;
+ }
+}
+
+.bd-snippet-preview {
+ padding: 1.5rem;
+}
+
+.bd-snippet-code {
+ background-color: whitesmoke;
+}
+
+@media screen and (min-width: 769px), print {
+ .bd-snippet-code {
+ align-items: stretch;
+ display: flex;
+ flex-direction: column;
+ }
+ .bd-snippet-code .highlight {
+ flex-grow: 1;
+ }
+}
+
.highlight.bd-is-hovering {
border-radius: 2px;
- box-shadow: 0 0 0 3px #dbdbdb;
+ box-shadow: 0 0 0 2px #ffdd57;
}
.highlight pre {
.highlight .bd-copy:hover,
.highlight .bd-expand:hover {
- background-color: #4a4a4a;
- color: white;
+ background-color: #ffdd57;
+ color: rgba(0, 0, 0, 0.7);
}
.highlight .bd-expand {
</p>
</div>
- <div class="columns">
- <div class="column">
- {{button_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_example %}
<div class="content">
<p>
</ul>
</div>
- <div class="columns">
- <div class="column">
- {{button_tags_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_tags_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_tags_example %}
{% include anchor.html name="Colors" %}
- <div class="columns">
- <div class="column">
- {{button_colors_a_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_colors_a_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_colors_a_example %}
- <div class="columns">
- <div class="column">
- {{button_colors_b_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_colors_b_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_colors_b_example %}
{% include anchor.html name="Sizes" %}
- <div class="columns">
- <div class="column">
- {{button_sizes_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_sizes_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_sizes_example %}
- <hr>
+ {% include anchor.html name="Styles" %}
- <h3 class="title">Styles</h3>
<h4 class="subtitle">Outlined</h4>
- <div class="columns">
- <div class="column">
- {{button_outlined_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_outlined_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_outlined_example %}
<h4 class="subtitle">Inverted (the text color becomes the background color, and vice-versa)</h4>
</div>
</div>
<div class="column">
- {% highlight html %}{{button_inverted_example}}{% endhighlight %}
+ {% highlight html %}{{button_inverted_example}}{% endhighlight %}
</div>
</div>
</div>
</div>
- <hr>
+ {% include anchor.html name="States" %}
- <h3 class="title">States</h3>
<h4 class="subtitle">Normal</h4>
- <div class="columns">
- <div class="column">
- {{button_normal_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_normal_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_normal_example %}
<h4 class="subtitle">Hover</h4>
- <div class="columns">
- <div class="column">
- {{button_hover_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_hover_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_hover_example %}
<h4 class="subtitle">Focus</h4>
- <div class="columns">
- <div class="column">
- {{button_focus_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_focus_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_focus_example %}
<h4 class="subtitle">Active</h4>
- <div class="columns">
- <div class="column">
- {{button_active_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_active_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_active_example %}
<h4 class="subtitle">Loading</h4>
<h4 class="subtitle">With Font Awesome icons</h4>
- <div class="columns">
- <div class="column">
- {{button_fa_example}}
- </div>
- <div class="column">
- {% highlight html %}{{button_fa_example}}{% endhighlight %}
- </div>
- </div>
+ {% include snippet.html content=button_fa_example %}
<div class="columns">
<div class="column">
</div>
</div>
- <hr>
+ {% include anchor.html name="Button group" %}
- <h3 class="title">Button group</h3>
<div class="content">
- <p>If you want to <strong>group</strong> buttons together, use the <code>is-grouped</code> modifier on the <code>field</code> container:</p>
+ <p>If you want to <strong>group</strong> buttons together on a <strong>single line</strong>, use the <code>is-grouped</code> modifier on the <code>field</code> container:</p>
</div>
- <div class="bd-example">
- {{button_group_example}}
- </div>
- {% highlight html %}{{button_group_example}}{% endhighlight %}
- <hr>
+ {% include snippet.html content=button_group_example %}
+
+ {% include anchor.html name="Button addons" %}
- <h3 class="title">Button addons</h3>
<div class="content">
<p>If you want to use buttons as <strong>addons</strong>, use the <code>has-addons</code> modifier on the <code>field</code> container:</p>
</div>
- <div class="bd-example">
- {{button_addons_example}}
- </div>
- {% highlight html %}{{button_addons_example}}{% endhighlight %}
+ {% include snippet.html content=button_addons_example %}
- <hr>
+ {% include anchor.html name="Button group with addons" %}
- <h3 class="title">Button group with addons</h3>
<div class="content">
<p>You can group together addons as well:</p>
</div>
- <div class="bd-example">
- {{button_group_addons_example}}
- </div>
- {% highlight html %}{{button_group_addons_example}}{% endhighlight %}
+ {% include snippet.html content=button_group_addons_example %}
{% include variables.html %}
{% highlight html %}{{table_example}}{% endhighlight %}
- <hr>
-
- <h3 class="title">Modifiers</h3>
+ {% include anchor.html name="Modifiers" %}
<div class="columns">
<div class="column">
<section class="section">
<div class="container">
- <h3 class="title">Fluid container</h3>
+ <h3 class="title is-4">Fluid container</h3>
<div class="content">
<p>If you don't want to have a maximum width but want to keep the 24px margin on the left and right sides, add the <code>is-fluid</code> modifier:</p>
</div>
<section class="section">
<div class="container">
- <h3 class="title">Breakpoint containers</h3>
+ <h3 class="title is-4">Breakpoint containers</h3>
<div class="content">
<p>
<span class="tag is-success">New!</span>
{% highlight html %}{{media_bis_example}}{% endhighlight %}
- <hr>
+ {% include anchor.html name="Nesting" %}
- <h3 class="title">Nesting</h3>
<div class="content">
<p>You can nest media objects up to <strong>3 levels</strong> deep.</p>
</div>
</div>
{% endhighlight %}
- <hr>
+ {% include anchor.html name="Example" %}
- <h3 class="title">Example</h3>
<div class="tile is-ancestor">
<div class="tile is-vertical is-8">
<div class="tile">
</div>
{% endhighlight %}
- <hr>
+ {% include anchor.html name="Modifiers" %}
- <h3 class="title">Modifiers</h3>
<div class="content">
<p>The <code>tile</code> element has <strong>16 modifiers</strong>:</p>
</ul>
</div>
- <hr>
+ {% include anchor.html name="How it works: Nesting" %}
- <h3 class="title">How it works: Nesting</h3>
<div class="content">
<p>Everything is a tile! To create a grid of tiles, you only need to <strong>nest</strong> <code>tile</code> elements.</p>
</div>
</div>
{% endhighlight %}
- <hr>
+ {% include anchor.html name="Nesting requirements" %}
- <h3 class="title">Nesting requirements</h3>
<article class="message is-danger">
<div class="message-header">
</div>
{% endhighlight %}
- <hr>
+ {% include anchor.html name="3 columns" %}
- <h3 class="title">3 columns</h3>
<div class="tile is-ancestor">
<div class="tile is-parent">
</div>
{% endhighlight %}
- <hr>
+ {% include anchor.html name="4 columns" %}
- <h3 class="title">4 columns</h3>
<div class="tile is-ancestor">
<div class="tile is-parent">
<h1 class="title">Responsive helpers</h1>
<h2 class="subtitle"><strong>Show/hide content</strong> depending on the width of the viewport</h2>
- <hr>
-
- <h3 class="title">Show</h3>
+ {% include anchor.html name="Show" %}
<div class="content">
<p>
</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>
-
- <hr>
+ <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>
- <h3 class="title">Hide</h3>
+ {% include anchor.html name="Hide" %}
<table class="table is-bordered">
{{ thead }}
Change the <strong>size</strong> and <strong>color</strong> of the text for one or multiple viewport width
</h2>
- <hr>
-
- <h3 class="title">Size</h3>
+ {% include anchor.html name="Size" %}
<div class="content">
<p>
</tbody>
</table>
- <hr>
-
- <h3 class="title">
- Responsive size
- </h3>
+ {% include anchor.html name="Responsive size" %}
<div class="content">
<p>
</p>
</div>
- <hr>
-
- <h3 class="title">
- Colors
- </h3>
+ {% include anchor.html name="Colors" %}
<div class="content">
<p>
</tbody>
</table>
- <hr>
-
- <h3 class="title">Alignment</h3>
+ {% include anchor.html name="Alignment" %}
<div class="content">
<p>
</tbody>
</table>
- <hr>
-
- <h3 class="title">Responsive Alignment</h3>
+ {% include anchor.html name="Responsive Alignment" %}
<div class="content">
<p>
You can now <strong>align text</strong> for <em>each</em> viewport width. You simply need to append the <strong>viewport width</strong> to the alignment modifier.
</p>
-
+
<p>
For example, here are the modifiers for <code>.has-text-left</code>:
</p>
</tbody>
</table>
- <hr>
-
- <h3 class="title">Text transformation</h3>
+ {% include anchor.html name="Text transformation" %}
<div class="content">
<p>
</ul>
</div>
- <hr>
-
- <h2 id="findColorInvert" class="title">The <code>findColorInvert()</code> function</h2>
+ {% include anchor.html name="The <code>findColorInvert()</code> function" %}
<div class="content">
<p>The <code>findColorInvert($color)</code> function takes a <strong>color</strong> as an input, and outputs either transparent <strong>black</strong> <code>rgba(#000, 0.7)</code> or <strong>white</strong> <code>#fff</code>:</p>
<h1 class="title">Responsiveness</h1>
<h2 class="subtitle">Bulma is a <strong>mobile-first</strong> framework</h2>
- <hr>
+ {% include anchor.html name="Vertical by default" %}
- <h3 class="title">Vertical by default</h3>
<div class="content">
<p>
Every element in Bulma is <strong>mobile-first</strong> and optimizes for <strong>vertical reading</strong>, so by default on mobile:
<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>
</div>
- <hr>
+ {% include anchor.html name="Breakpoints" %}
- <h3 class="title">Breakpoints</h3>
<div class="content">
<p>Bulma has 5 breakpoints:</p>
<ul>
</ul>
</div>
- <hr>
+ {% include anchor.html name="How it works: Nesting" %}
- <h3 class="title">How it works: Nesting</h3>
<div class="content">
<p>Everything is a tile! To create a grid of tiles, you only need to <strong>nest</strong> <code>tile</code> elements.</p>
</div>
</div>
{% endhighlight %}
- <hr>
-
- <h3 class="title">Nesting requirements</h3>
+ {% include anchor.html name="Nesting requirements" %}
<article class="message is-danger">
<div class="message-header">
</div>
{% endhighlight %}
- <hr>
-
- <h3 class="title">3 columns</h3>
+ {% include anchor.html name="3 columns" %}
<div class="tile is-ancestor">
<div class="tile is-parent">
</div>
{% endhighlight %}
- <hr>
-
- <h3 class="title">4 columns</h3>
+ {% include anchor.html name="4 columns" %}
<div class="tile is-ancestor">
<div class="tile is-parent">