Fix media object

This commit is contained in:
Jeremy Thomas 2016-10-30 17:35:39 +00:00
parent 36822ed3fb
commit 4a40ad0059
12 changed files with 198 additions and 434 deletions

View File

@ -12,6 +12,8 @@
* Add `.content` table * Add `.content` table
* Fix inputs with icons * Fix inputs with icons
* Input icons require the `.icon` container * Input icons require the `.icon` container
* Deprecate `.media-number`
* Fix `.level-item` height
## 0.2.2 ## 0.2.2

View File

@ -296,7 +296,7 @@ html.route-index #carbon
pre pre
max-height: 600px max-height: 600px
&:not(:last-child) &:not(:last-child)
margin-bottom: 3rem margin-bottom: 1.5rem
$structure: $danger $structure: $danger
$structure-invert: $danger-invert $structure-invert: $danger-invert

View File

@ -662,7 +662,7 @@ a.box:active {
.button:focus, .button.is-focused { .button:focus, .button.is-focused {
border-color: #00d1b2; border-color: #00d1b2;
box-shadow: 0 0 0.5em rgba(0, 209, 178, 0.5); box-shadow: 0 0 0.5em rgba(0, 209, 178, 0.25);
color: #363636; color: #363636;
} }
@ -698,7 +698,7 @@ a.box:active {
.button.is-white:focus, .button.is-white.is-focused { .button.is-white:focus, .button.is-white.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.5); box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.25);
color: #0a0a0a; color: #0a0a0a;
} }
@ -749,7 +749,7 @@ a.box:active {
.button.is-black:focus, .button.is-black.is-focused { .button.is-black:focus, .button.is-black.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(10, 10, 10, 0.5); box-shadow: 0 0 0.5em rgba(10, 10, 10, 0.25);
color: white; color: white;
} }
@ -800,7 +800,7 @@ a.box:active {
.button.is-light:focus, .button.is-light.is-focused { .button.is-light:focus, .button.is-light.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(245, 245, 245, 0.5); box-shadow: 0 0 0.5em rgba(245, 245, 245, 0.25);
color: #363636; color: #363636;
} }
@ -851,7 +851,7 @@ a.box:active {
.button.is-dark:focus, .button.is-dark.is-focused { .button.is-dark:focus, .button.is-dark.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(54, 54, 54, 0.5); box-shadow: 0 0 0.5em rgba(54, 54, 54, 0.25);
color: whitesmoke; color: whitesmoke;
} }
@ -902,7 +902,7 @@ a.box:active {
.button.is-primary:focus, .button.is-primary.is-focused { .button.is-primary:focus, .button.is-primary.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(0, 209, 178, 0.5); box-shadow: 0 0 0.5em rgba(0, 209, 178, 0.25);
color: #fff; color: #fff;
} }
@ -953,7 +953,7 @@ a.box:active {
.button.is-info:focus, .button.is-info.is-focused { .button.is-info:focus, .button.is-info.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(50, 115, 220, 0.5); box-shadow: 0 0 0.5em rgba(50, 115, 220, 0.25);
color: #fff; color: #fff;
} }
@ -1004,7 +1004,7 @@ a.box:active {
.button.is-success:focus, .button.is-success.is-focused { .button.is-success:focus, .button.is-success.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(35, 209, 96, 0.5); box-shadow: 0 0 0.5em rgba(35, 209, 96, 0.25);
color: #fff; color: #fff;
} }
@ -1055,7 +1055,7 @@ a.box:active {
.button.is-warning:focus, .button.is-warning.is-focused { .button.is-warning:focus, .button.is-warning.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(255, 221, 87, 0.5); box-shadow: 0 0 0.5em rgba(255, 221, 87, 0.25);
color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7);
} }
@ -1106,7 +1106,7 @@ a.box:active {
.button.is-danger:focus, .button.is-danger.is-focused { .button.is-danger:focus, .button.is-danger.is-focused {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 0.5em rgba(255, 56, 96, 0.5); box-shadow: 0 0 0.5em rgba(255, 56, 96, 0.25);
color: #fff; color: #fff;
} }
@ -2592,7 +2592,7 @@ a.box:active {
} }
.subtitle + .title { .subtitle + .title {
margin-top: -1.4rem; margin-top: -1.5rem;
} }
.subtitle.is-1 { .subtitle.is-1 {
@ -2751,10 +2751,17 @@ a.box:active {
} }
.number { .number {
align-items: center;
background-color: whitesmoke; background-color: whitesmoke;
border-radius: 290486px; border-radius: 290486px;
display: inline-block; display: inline-flex;
font-size: 1.25rem; font-size: 1.25rem;
height: 2em;
justify-content: center;
margin-right: 1.5rem;
min-width: 2.5em;
padding: 0.25rem 0.5rem;
text-align: center;
vertical-align: top; vertical-align: top;
} }
@ -2762,16 +2769,15 @@ a.box:active {
align-items: stretch; align-items: stretch;
box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1); box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1);
display: flex; display: flex;
min-height: 40px;
} }
.card-header-title { .card-header-title {
align-items: flex-start; align-items: center;
color: #363636; color: #363636;
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
font-weight: bold; font-weight: 700;
padding: 10px; padding: 0.75rem;
} }
.card-header-icon { .card-header-icon {
@ -2779,7 +2785,7 @@ a.box:active {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 40px; padding: 0.75rem;
} }
.card-image { .card-image {
@ -2788,11 +2794,11 @@ a.box:active {
} }
.card-content { .card-content {
padding: 20px; padding: 1.5rem;
} }
.card-content .title + .subtitle { .card-content .title + .subtitle {
margin-top: -20px; margin-top: -1.5rem;
} }
.card-footer { .card-footer {
@ -2805,8 +2811,9 @@ a.box:active {
align-items: center; align-items: center;
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
flex-shrink: 0;
justify-content: center; justify-content: center;
padding: 10px; padding: 0.75rem;
} }
.card-footer-item:not(:last-child) { .card-footer-item:not(:last-child) {
@ -2819,15 +2826,10 @@ a.box:active {
color: #4a4a4a; color: #4a4a4a;
max-width: 100%; max-width: 100%;
position: relative; position: relative;
width: 300px;
} }
.card .media:not(:last-child) { .card .media:not(:last-child) {
margin-bottom: 10px; margin-bottom: 0.75rem;
}
.card.is-fullwidth {
width: 100%;
} }
.card.is-rounded { .card.is-rounded {
@ -3059,6 +3061,12 @@ a.box:active {
color: #2aa198; color: #2aa198;
} }
.level-item {
align-items: center;
display: flex;
justify-content: center;
}
.level-item .title, .level-item .title,
.level-item .subtitle { .level-item .subtitle {
margin-bottom: 0; margin-bottom: 0;
@ -3066,13 +3074,13 @@ a.box:active {
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.level-item:not(:last-child) { .level-item:not(:last-child) {
margin-bottom: 10px; margin-bottom: 0.75rem;
} }
} }
.level-left .level-item:not(:last-child), .level-left .level-item:not(:last-child),
.level-right .level-item:not(:last-child) { .level-right .level-item:not(:last-child) {
margin-right: 10px; margin-right: 0.75rem;
} }
.level-left .level-item.is-flexible, .level-left .level-item.is-flexible,
@ -3080,24 +3088,31 @@ a.box:active {
flex-grow: 1; flex-grow: 1;
} }
.level-left {
align-items: center;
justify-content: flex-start;
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.level-left + .level-right { .level-left + .level-right {
margin-top: 20px; margin-top: 1.5rem;
} }
} }
@media screen and (min-width: 769px) { @media screen and (min-width: 769px) {
.level-left { .level-left {
align-items: center;
display: flex; display: flex;
} }
} }
.level-right {
align-items: center;
justify-content: flex-end;
}
@media screen and (min-width: 769px) { @media screen and (min-width: 769px) {
.level-right { .level-right {
align-items: center;
display: flex; display: flex;
justify-content: flex-end;
} }
} }
@ -3140,33 +3155,18 @@ a.box:active {
} }
} }
.media-number,
.media-left, .media-left,
.media-right { .media-right {
flex-grow: 0; flex-grow: 0;
flex-shrink: 0; flex-shrink: 0;
} }
.media-number {
background-color: whitesmoke;
border-radius: 290486px;
display: inline-block;
font-size: 1.25rem;
height: 32px;
line-height: 24px;
margin-right: 1rem;
min-width: 32px;
padding: 4px 8px;
text-align: center;
vertical-align: top;
}
.media-left { .media-left {
margin-right: 1rem; margin-right: 0.75rem;
} }
.media-right { .media-right {
margin-left: 1rem; margin-left: 0.75rem;
} }
.media-content { .media-content {
@ -3188,7 +3188,7 @@ a.box:active {
.media .media { .media .media {
border-top: 1px solid rgba(219, 219, 219, 0.5); border-top: 1px solid rgba(219, 219, 219, 0.5);
display: flex; display: flex;
padding-top: 10px; padding-top: 0.75rem;
} }
.media .media .content:not(:last-child), .media .media .content:not(:last-child),
@ -3211,14 +3211,8 @@ a.box:active {
} }
.media.is-large + .media { .media.is-large + .media {
margin-top: 1.4rem; margin-top: 1.5rem;
padding-top: 1.4rem; padding-top: 1.5rem;
}
@media screen and (min-width: 769px) {
.media.is-large .media-number {
margin-right: 1.4rem;
}
} }
.menu-nav a { .menu-nav a {
@ -6342,7 +6336,7 @@ html.route-index #carbon {
} }
.example + .highlight:not(:last-child) { .example + .highlight:not(:last-child) {
margin-bottom: 3rem; margin-bottom: 1.5rem;
} }
.structure { .structure {

View File

@ -13,37 +13,7 @@ doc-subtab: card
<hr> <hr>
<div class="columns"> {% capture card_example %}
<div class="column is-one-third">
<div class="card">
<div class="card-image">
<figure class="image is-4by3">
<img src="http://placehold.it/300x225" alt="">
</figure>
</div>
<div class="card-content">
<div class="media">
<div class="media-left">
<figure class="image is-32x32">
<img src="http://placehold.it/64x64" alt="Image">
</figure>
</div>
<div class="media-content">
<p class="title is-5">John Smith</p>
<p class="subtitle is-6">@johnsmith</p>
</div>
</div>
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. <a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
<br>
<small>11:09 PM - 1 Jan 2016</small>
</div>
</div>
</div>
</div>
<div class="column">
{% highlight html %}
<div class="card"> <div class="card">
<div class="card-image"> <div class="card-image">
<figure class="image is-4by3"> <figure class="image is-4by3">
@ -72,51 +42,36 @@ doc-subtab: card
</div> </div>
</div> </div>
</div> </div>
{% endcapture %}
<div class="columns">
<div class="column is-one-third">
{{card_example}}
</div>
<div class="column">
{% highlight html %}
{{card_example}}
{% endhighlight %} {% endhighlight %}
</div> </div>
</div> </div>
<hr> <hr>
<div class="columns"> {% capture card_header_example %}
<div class="column is-one-third"> <div class="card">
<div class="card is-fullwidth">
<header class="card-header">
<p class="card-header-title">
Component
</p>
<a class="card-header-icon">
<i class="fa fa-angle-down"></i>
</a>
</header>
<div class="card-content">
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. <a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
<br>
<small>11:09 PM - 1 Jan 2016</small>
</div>
</div>
<footer class="card-footer">
<a class="card-footer-item">Save</a>
<a class="card-footer-item">Edit</a>
<a class="card-footer-item">Delete</a>
</footer>
</div>
</div>
<div class="column">
{% highlight html %}
<div class="card is-fullwidth">
<header class="card-header"> <header class="card-header">
<p class="card-header-title"> <p class="card-header-title">
Component Component
</p> </p>
<a class="card-header-icon"> <a class="card-header-icon">
<i class="fa fa-angle-down"></i> <span class="icon">
<i class="fa fa-angle-down"></i>
</span>
</a> </a>
</header> </header>
<div class="card-content"> <div class="card-content">
<div class="content"> <div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. <a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
<a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
<br> <br>
<small>11:09 PM - 1 Jan 2016</small> <small>11:09 PM - 1 Jan 2016</small>
</div> </div>
@ -127,8 +82,17 @@ doc-subtab: card
<a class="card-footer-item">Delete</a> <a class="card-footer-item">Delete</a>
</footer> </footer>
</div> </div>
{% endcapture %}
<div class="columns">
<div class="column is-one-third">
{{card_header_example}}
</div>
<div class="column">
{% highlight html %}
{{card_header_example}}
{% endhighlight %} {% endhighlight %}
</div> </div>
</div> </div>
</div> </div>
</section> </section>

View File

@ -71,46 +71,7 @@ doc-subtab: level
</nav> </nav>
</div> </div>
<div class="example"> {% capture nav_example %}
<nav class="level">
<div class="level-left">
<div class="level-item">
<p class="subtitle is-5">
<strong>123</strong> posts
</p>
</div>
<div class="level-item">
<p class="control has-addons">
<input class="input" type="text" placeholder="Find a post">
<button class="button">
Search
</button>
</p>
</div>
</div>
<div class="level-right">
<p class="level-item">
<strong>All</strong>
</p>
<p class="level-item">
<a>Published</a>
</p>
<p class="level-item">
<a>Drafts</a>
</p>
<p class="level-item">
<a>Deleted</a>
</p>
<p class="level-item">
<a class="button is-success">
New
</a>
</p>
</div>
</nav>
</div>
{% highlight html %}
<!-- Main container --> <!-- Main container -->
<nav class="level"> <nav class="level">
<!-- Left side --> <!-- Left side -->
@ -139,37 +100,21 @@ doc-subtab: level
<p class="level-item"><a class="button is-success">New</a></p> <p class="level-item"><a class="button is-success">New</a></p>
</div> </div>
</nav> </nav>
{% endcapture %}
<div class="example">
{{nav_example}}
</div>
{% highlight html %}
{{nav_example}}
{% endhighlight %} {% endhighlight %}
<hr> <hr>
<h3 class="title">Centered level</h3>
<div class="content"> <h3 class="title">Centered level</h3>
If you want a <strong>centered level</strong>, you can use as many <code>level-item</code> as you want, as long as they are <strong>direct</strong> children of the <code>level</code> container. <div class="content">
</div> If you want a <strong>centered level</strong>, you can use as many <code>level-item</code> as you want, as long as they are <strong>direct</strong> children of the <code>level</code> container.
</div>
<div class="example"> {% capture nav_centered_example %}
<nav class="level">
<div class="level-item has-text-centered">
<p class="heading">Tweets</p>
<p class="title">3,456</p>
</div>
<div class="level-item has-text-centered">
<p class="heading">Following</p>
<p class="title">123</p>
</div>
<div class="level-item has-text-centered">
<p class="heading">Followers</p>
<p class="title">456K</p>
</div>
<div class="level-item has-text-centered">
<p class="heading">Likes</p>
<p class="title">789</p>
</div>
</nav>
</div>
{% highlight html %}
<nav class="level"> <nav class="level">
<div class="level-item has-text-centered"> <div class="level-item has-text-centered">
<p class="heading">Tweets</p> <p class="heading">Tweets</p>
@ -188,29 +133,8 @@ doc-subtab: level
<p class="title">789</p> <p class="title">789</p>
</div> </div>
</nav> </nav>
{% endhighlight %} {% endcapture %}
{% capture nav_centered_bis_example %}
<div class="example">
<nav class="level">
<p class="level-item has-text-centered">
<a class="link is-info">Home</a>
</p>
<p class="level-item has-text-centered">
<a class="link is-info">Menu</a>
</p>
<p class="level-item has-text-centered">
<img src="{{ site.url }}/images/bulma-type.png" alt="" style="height: 33px;">
</p>
<p class="level-item has-text-centered">
<a class="link is-info">Reservations</a>
</p>
<p class="level-item has-text-centered">
<a class="link is-info">Contact</a>
</p>
</nav>
</div>
{% highlight html %}
<nav class="level"> <nav class="level">
<p class="level-item has-text-centered"> <p class="level-item has-text-centered">
<a class="link is-info">Home</a> <a class="link is-info">Home</a>
@ -228,33 +152,52 @@ doc-subtab: level
<a class="link is-info">Contact</a> <a class="link is-info">Contact</a>
</p> </p>
</nav> </nav>
{% endcapture %}
<div class="example">
{{nav_centered_example}}
</div>
{% highlight html %}
{{nav_centered_example}}
{% endhighlight %}
<div class="example">
{{nav_centered_bis_example}}
</div>
{% highlight html %}
{{nav_centered_bis_example}}
{% endhighlight %} {% endhighlight %}
<hr> <hr>
<h3 class="title">Mobile level</h3>
<div class="content">
By default, for space concerns, the level is vertical on mobile. If you want the level to be horizontal on mobile as well, add the <code>is-mobile</code> modifier on the <code>level</code> container.
</div>
<div class="example"> <h3 class="title">Mobile level</h3>
<nav class="level is-mobile"> <div class="content">
<div class="level-item has-text-centered"> By default, for space concerns, the level is vertical on mobile. If you want the level to be horizontal on mobile as well, add the <code>is-mobile</code> modifier on the <code>level</code> container.
<p class="heading">Tweets</p> </div>
<p class="title">3,456</p> {% capture nav_mobile_example %}
</div> <nav class="level is-mobile">
<div class="level-item has-text-centered"> <div class="level-item has-text-centered">
<p class="heading">Following</p> <p class="heading">Tweets</p>
<p class="title">123</p> <p class="title">3,456</p>
</div> </div>
<div class="level-item has-text-centered"> <div class="level-item has-text-centered">
<p class="heading">Followers</p> <p class="heading">Following</p>
<p class="title">456K</p> <p class="title">123</p>
</div> </div>
<div class="level-item has-text-centered"> <div class="level-item has-text-centered">
<p class="heading">Likes</p> <p class="heading">Followers</p>
<p class="title">789</p> <p class="title">456K</p>
</div> </div>
</nav> <div class="level-item has-text-centered">
</div> <p class="heading">Likes</p>
<p class="title">789</p>
</div>
</nav>
{% endcapture %}
<div class="example">
{{nav_mobile_example}}
</div>
{% highlight html %}
{{nav_mobile_example}}
{% endhighlight %}
</div> </div>
</section> </section>

View File

@ -52,43 +52,7 @@ doc-subtab: media-object
</article> </article>
</div> </div>
{% capture media_example %}
<div class="example">
<article class="media">
<figure class="media-left">
<p class="image is-64x64">
<img src="http://placehold.it/128x128">
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
<br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.
</p>
</div>
<nav class="level">
<div class="level-left">
<a class="level-item">
<span class="icon is-small"><i class="fa fa-reply"></i></span>
</a>
<a class="level-item">
<span class="icon is-small"><i class="fa fa-retweet"></i></span>
</a>
<a class="level-item">
<span class="icon is-small"><i class="fa fa-heart"></i></span>
</a>
</div>
</nav>
</div>
<div class="media-right">
<button class="delete"></button>
</div>
</article>
</div>
{% highlight html %}
<article class="media"> <article class="media">
<figure class="media-left"> <figure class="media-left">
<p class="image is-64x64"> <p class="image is-64x64">
@ -121,42 +85,19 @@ doc-subtab: media-object
<button class="delete"></button> <button class="delete"></button>
</div> </div>
</article> </article>
{% endcapture %}
<div class="example">
{{media_example}}
</div>
{% highlight html %}
{{media_example}}
{% endhighlight %} {% endhighlight %}
<div class="content"> <div class="content">
<p>You can include <em>any</em> other Bulma element, like inputs, textareas, icons, buttons... or even a <strong>nav bar</strong>.</p> <p>You can include <em>any</em> other Bulma element, like inputs, textareas, icons, buttons... or even a <strong>nav bar</strong>.</p>
</div> </div>
<div class="example"> {% capture media_bis_example %}
<article class="media">
<figure class="media-left">
<p class="image is-64x64">
<img src="http://placehold.it/128x128">
</p>
</figure>
<div class="media-content">
<p class="control">
<textarea class="textarea" placeholder="Add a comment..."></textarea>
</p>
<nav class="level">
<div class="level-left">
<div class="level-item">
<a class="button is-info">Post comment</a>
</div>
</div>
<div class="level-right">
<div class="level-item">
<label class="checkbox">
<input type="checkbox"> Press enter to submit
</label>
</div>
</div>
</nav>
</div>
</article>
</div>
{% highlight html %}
<article class="media"> <article class="media">
<figure class="media-left"> <figure class="media-left">
<p class="image is-64x64"> <p class="image is-64x64">
@ -183,6 +124,12 @@ doc-subtab: media-object
</nav> </nav>
</div> </div>
</article> </article>
{% endcapture %}
<div class="example">
{{media_bis_example}}
</div>
{% highlight html %}
{{media_bis_example}}
{% endhighlight %} {% endhighlight %}
<hr> <hr>
@ -191,88 +138,7 @@ doc-subtab: media-object
<div class="content"> <div class="content">
<p>You can nest media objects up to <strong>3 levels</strong> deep.</p> <p>You can nest media objects up to <strong>3 levels</strong> deep.</p>
</div> </div>
<div class="example"> {% capture media_nested_example %}
<article class="media">
<figure class="media-left">
<p class="image is-64x64">
<img src="http://placehold.it/128x128">
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>Barbara Middleton</strong>
<br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porta eros lacus, nec ultricies elit blandit non. Suspendisse pellentesque mauris sit amet dolor blandit rutrum. Nunc in tempus turpis.
<br>
<small><a>Like</a> · <a>Reply</a> · 3 hrs</small>
</p>
</div>
<article class="media">
<figure class="media-left">
<p class="image is-48x48">
<img src="http://placehold.it/96x96">
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>Sean Brown</strong>
<br>
Donec sollicitudin urna eget eros malesuada sagittis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit nisl a nulla sagittis, a lobortis leo feugiat.
<br>
<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
</p>
</div>
<article class="media">
Vivamus quis semper metus, non tincidunt dolor. Vivamus in mi eu lorem cursus ullamcorper sit amet nec massa.
</article>
<article class="media">
Morbi vitae diam et purus tincidunt porttitor vel vitae augue. Praesent malesuada metus sed pharetra euismod. Cras tellus odio, tincidunt iaculis diam non, porta aliquet tortor.
</article>
</div>
</article>
<article class="media">
<figure class="media-left">
<p class="image is-48x48">
<img src="http://placehold.it/96x96">
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>Kayli Eunice </strong>
<br>
Sed convallis scelerisque mauris, non pulvinar nunc mattis vel. Maecenas varius felis sit amet magna vestibulum euismod malesuada cursus libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus lacinia non nisl id feugiat.
<br>
<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
</p>
</div>
</div>
</article>
</div>
</article>
<article class="media">
<figure class="media-left">
<p class="image is-64x64">
<img src="http://placehold.it/128x128">
</p>
</figure>
<div class="media-content">
<p class="control">
<textarea class="textarea" placeholder="Add a comment..."></textarea>
</p>
<p class="control">
<button class="button">Post comment</button>
</p>
</div>
</article>
</div>
{% highlight html %}
<article class="media"> <article class="media">
<figure class="media-left"> <figure class="media-left">
<p class="image is-64x64"> <p class="image is-64x64">
@ -352,6 +218,12 @@ doc-subtab: media-object
</p> </p>
</div> </div>
</article> </article>
{% endcapture %}
<div class="example">
{{media_nested_example}}
</div>
{% highlight html %}
{{media_nested_example}}
{% endhighlight %} {% endhighlight %}
</div> </div>

View File

@ -2,31 +2,30 @@
align-items: stretch align-items: stretch
box-shadow: 0 1px 2px rgba($black, 0.1) box-shadow: 0 1px 2px rgba($black, 0.1)
display: flex display: flex
min-height: 40px
.card-header-title .card-header-title
align-items: flex-start align-items: center
color: $text-strong color: $text-strong
display: flex display: flex
flex-grow: 1 flex-grow: 1
font-weight: bold font-weight: $weight-bold
padding: 10px padding: 0.75rem
.card-header-icon .card-header-icon
align-items: center align-items: center
cursor: pointer cursor: pointer
display: flex display: flex
justify-content: center justify-content: center
width: 40px padding: 0.75rem
.card-image .card-image
display: block display: block
position: relative position: relative
.card-content .card-content
padding: 20px padding: 1.5rem
.title + .subtitle .title + .subtitle
margin-top: -20px margin-top: -1.5rem
.card-footer .card-footer
border-top: 1px solid $border border-top: 1px solid $border
@ -37,8 +36,9 @@
align-items: center align-items: center
display: flex display: flex
flex-grow: 1 flex-grow: 1
flex-shrink: 0
justify-content: center justify-content: center
padding: 10px padding: 0.75rem
&:not(:last-child) &:not(:last-child)
border-right: 1px solid $border border-right: 1px solid $border
@ -48,11 +48,8 @@
color: $text color: $text
max-width: 100% max-width: 100%
position: relative position: relative
width: 300px
.media:not(:last-child) .media:not(:last-child)
margin-bottom: 10px margin-bottom: 0.75rem
// Modifiers // Modifiers
&.is-fullwidth
width: 100%
&.is-rounded &.is-rounded
border-radius: $radius-large border-radius: $radius-large

View File

@ -1,36 +1,40 @@
.level-item .level-item
align-items: center
display: flex
justify-content: center
.title, .title,
.subtitle .subtitle
margin-bottom: 0 margin-bottom: 0
// Responsiveness // Responsiveness
+mobile +mobile
&:not(:last-child) &:not(:last-child)
margin-bottom: 10px margin-bottom: 0.75rem
.level-left, .level-left,
.level-right .level-right
.level-item .level-item
&:not(:last-child) &:not(:last-child)
margin-right: 10px margin-right: 0.75rem
// Modifiers // Modifiers
&.is-flexible &.is-flexible
flex-grow: 1 flex-grow: 1
.level-left .level-left
align-items: center
justify-content: flex-start
// Responsiveness // Responsiveness
+mobile +mobile
& + .level-right & + .level-right
margin-top: 20px margin-top: 1.5rem
+tablet +tablet
align-items: center
display: flex display: flex
.level-right .level-right
align-items: center
justify-content: flex-end
// Responsiveness // Responsiveness
+tablet +tablet
align-items: center
display: flex display: flex
justify-content: flex-end
.level .level
+block +block

View File

@ -1,27 +1,13 @@
.media-number,
.media-left, .media-left,
.media-right .media-right
flex-grow: 0 flex-grow: 0
flex-shrink: 0 flex-shrink: 0
.media-number
background-color: $background
border-radius: 290486px
display: inline-block
font-size: $size-medium
height: 32px
line-height: 24px
margin-right: 1rem
min-width: 32px
padding: 4px 8px
text-align: center
vertical-align: top
.media-left .media-left
margin-right: 1rem margin-right: 0.75rem
.media-right .media-right
margin-left: 1rem margin-left: 0.75rem
.media-content .media-content
flex-grow: 1 flex-grow: 1
@ -37,7 +23,7 @@
.media .media
border-top: 1px solid rgba($border, 0.5) border-top: 1px solid rgba($border, 0.5)
display: flex display: flex
padding-top: 10px padding-top: 0.75rem
.content:not(:last-child), .content:not(:last-child),
.control:not(:last-child) .control:not(:last-child)
margin-bottom: 0.5rem margin-bottom: 0.5rem
@ -52,10 +38,5 @@
// Sizes // Sizes
&.is-large &.is-large
& + .media & + .media
margin-top: 1.4rem margin-top: 1.5rem
padding-top: 1.4rem padding-top: 1.5rem
// Responsiveness
+tablet
&.is-large
.media-number
margin-right: 1.4rem

View File

@ -89,7 +89,7 @@ $button-shadow-inset: inset 0 1px 2px rgba($black, 0.2)
&:focus, &:focus,
&.is-focused &.is-focused
border-color: $button-focus-border border-color: $button-focus-border
box-shadow: 0 0 0.5em rgba($button-focus-border, 0.5) box-shadow: 0 0 0.5em rgba($button-focus-border, 0.25)
color: $button-focus color: $button-focus
&:active, &:active,
&.is-active &.is-active
@ -125,7 +125,7 @@ $button-shadow-inset: inset 0 1px 2px rgba($black, 0.2)
&:focus, &:focus,
&.is-focused &.is-focused
border-color: transparent border-color: transparent
box-shadow: 0 0 0.5em rgba($color, 0.5) box-shadow: 0 0 0.5em rgba($color, 0.25)
color: $color-invert color: $color-invert
&:active, &:active,
&.is-active &.is-active

View File

@ -42,8 +42,15 @@
+loader +loader
.number .number
align-items: center
background-color: $background background-color: $background
border-radius: 290486px border-radius: 290486px
display: inline-block display: inline-flex
font-size: $size-medium font-size: $size-medium
height: 2em
justify-content: center
margin-right: 1.5rem
min-width: 2.5em
padding: 0.25rem 0.5rem
text-align: center
vertical-align: top vertical-align: top

View File

@ -48,7 +48,7 @@ $subtitle-weight: $weight-light !default
strong strong
color: $subtitle-strong color: $subtitle-strong
& + .title & + .title
margin-top: -1.4rem margin-top: -1.5rem
// Colors // Colors
@each $size in $sizes @each $size in $sizes
$i: index($sizes, $size) $i: index($sizes, $size)