This commit is contained in:
Jeremy Thomas 2016-10-30 20:24:23 +00:00
parent b016326ac8
commit 9d48eff270
6 changed files with 176 additions and 43 deletions

View File

@ -19,6 +19,8 @@
* Fix `.level-item` height * Fix `.level-item` height
* Fix `.menu` spacing * Fix `.menu` spacing
* Deprecate `.menu-nav` * Deprecate `.menu-nav`
* Add invert outlined buttons
* Fix `.nav`
## 0.2.2 ## 0.2.2

View File

@ -66,7 +66,7 @@
</span> </span>
{% else %} {% else %}
<span class="nav-item"> <span class="nav-item">
<a class="button is-light is-outlined" <a class="button is-primary is-inverted is-outlined"
data-social-network="Twitter" data-social-network="Twitter"
data-social-action="tweet" data-social-action="tweet"
data-social-target="http://bulma.io/" data-social-target="http://bulma.io/"

View File

@ -745,7 +745,6 @@ a.box:active {
.button.is-white.is-outlined { .button.is-white.is-outlined {
background-color: transparent; background-color: transparent;
border-color: white; border-color: white;
border-width: 1px;
color: white; color: white;
} }
@ -755,6 +754,17 @@ a.box:active {
color: #0a0a0a; color: #0a0a0a;
} }
.button.is-white.is-inverted.is-outlined {
background-color: transparent;
border-color: #0a0a0a;
color: #0a0a0a;
}
.button.is-white.is-inverted.is-outlined:hover, .button.is-white.is-inverted.is-outlined:focus {
background-color: #0a0a0a;
color: white;
}
.button.is-black { .button.is-black {
background-color: #0a0a0a; background-color: #0a0a0a;
border-color: transparent; border-color: transparent;
@ -796,7 +806,6 @@ a.box:active {
.button.is-black.is-outlined { .button.is-black.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #0a0a0a; border-color: #0a0a0a;
border-width: 1px;
color: #0a0a0a; color: #0a0a0a;
} }
@ -806,6 +815,17 @@ a.box:active {
color: white; color: white;
} }
.button.is-black.is-inverted.is-outlined {
background-color: transparent;
border-color: white;
color: white;
}
.button.is-black.is-inverted.is-outlined:hover, .button.is-black.is-inverted.is-outlined:focus {
background-color: white;
color: #0a0a0a;
}
.button.is-light { .button.is-light {
background-color: whitesmoke; background-color: whitesmoke;
border-color: transparent; border-color: transparent;
@ -847,7 +867,6 @@ a.box:active {
.button.is-light.is-outlined { .button.is-light.is-outlined {
background-color: transparent; background-color: transparent;
border-color: whitesmoke; border-color: whitesmoke;
border-width: 1px;
color: whitesmoke; color: whitesmoke;
} }
@ -857,6 +876,17 @@ a.box:active {
color: #363636; color: #363636;
} }
.button.is-light.is-inverted.is-outlined {
background-color: transparent;
border-color: #363636;
color: #363636;
}
.button.is-light.is-inverted.is-outlined:hover, .button.is-light.is-inverted.is-outlined:focus {
background-color: #363636;
color: whitesmoke;
}
.button.is-dark { .button.is-dark {
background-color: #363636; background-color: #363636;
border-color: transparent; border-color: transparent;
@ -898,7 +928,6 @@ a.box:active {
.button.is-dark.is-outlined { .button.is-dark.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #363636; border-color: #363636;
border-width: 1px;
color: #363636; color: #363636;
} }
@ -908,6 +937,17 @@ a.box:active {
color: whitesmoke; color: whitesmoke;
} }
.button.is-dark.is-inverted.is-outlined {
background-color: transparent;
border-color: whitesmoke;
color: whitesmoke;
}
.button.is-dark.is-inverted.is-outlined:hover, .button.is-dark.is-inverted.is-outlined:focus {
background-color: whitesmoke;
color: #363636;
}
.button.is-primary { .button.is-primary {
background-color: #00d1b2; background-color: #00d1b2;
border-color: transparent; border-color: transparent;
@ -949,7 +989,6 @@ a.box:active {
.button.is-primary.is-outlined { .button.is-primary.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #00d1b2; border-color: #00d1b2;
border-width: 1px;
color: #00d1b2; color: #00d1b2;
} }
@ -959,6 +998,17 @@ a.box:active {
color: #fff; color: #fff;
} }
.button.is-primary.is-inverted.is-outlined {
background-color: transparent;
border-color: #fff;
color: #fff;
}
.button.is-primary.is-inverted.is-outlined:hover, .button.is-primary.is-inverted.is-outlined:focus {
background-color: #fff;
color: #00d1b2;
}
.button.is-info { .button.is-info {
background-color: #3273dc; background-color: #3273dc;
border-color: transparent; border-color: transparent;
@ -1000,7 +1050,6 @@ a.box:active {
.button.is-info.is-outlined { .button.is-info.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #3273dc; border-color: #3273dc;
border-width: 1px;
color: #3273dc; color: #3273dc;
} }
@ -1010,6 +1059,17 @@ a.box:active {
color: #fff; color: #fff;
} }
.button.is-info.is-inverted.is-outlined {
background-color: transparent;
border-color: #fff;
color: #fff;
}
.button.is-info.is-inverted.is-outlined:hover, .button.is-info.is-inverted.is-outlined:focus {
background-color: #fff;
color: #3273dc;
}
.button.is-success { .button.is-success {
background-color: #23d160; background-color: #23d160;
border-color: transparent; border-color: transparent;
@ -1051,7 +1111,6 @@ a.box:active {
.button.is-success.is-outlined { .button.is-success.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #23d160; border-color: #23d160;
border-width: 1px;
color: #23d160; color: #23d160;
} }
@ -1061,6 +1120,17 @@ a.box:active {
color: #fff; color: #fff;
} }
.button.is-success.is-inverted.is-outlined {
background-color: transparent;
border-color: #fff;
color: #fff;
}
.button.is-success.is-inverted.is-outlined:hover, .button.is-success.is-inverted.is-outlined:focus {
background-color: #fff;
color: #23d160;
}
.button.is-warning { .button.is-warning {
background-color: #ffdd57; background-color: #ffdd57;
border-color: transparent; border-color: transparent;
@ -1102,7 +1172,6 @@ a.box:active {
.button.is-warning.is-outlined { .button.is-warning.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #ffdd57; border-color: #ffdd57;
border-width: 1px;
color: #ffdd57; color: #ffdd57;
} }
@ -1112,6 +1181,17 @@ a.box:active {
color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7);
} }
.button.is-warning.is-inverted.is-outlined {
background-color: transparent;
border-color: rgba(0, 0, 0, 0.7);
color: rgba(0, 0, 0, 0.7);
}
.button.is-warning.is-inverted.is-outlined:hover, .button.is-warning.is-inverted.is-outlined:focus {
background-color: rgba(0, 0, 0, 0.7);
color: #ffdd57;
}
.button.is-danger { .button.is-danger {
background-color: #ff3860; background-color: #ff3860;
border-color: transparent; border-color: transparent;
@ -1153,7 +1233,6 @@ a.box:active {
.button.is-danger.is-outlined { .button.is-danger.is-outlined {
background-color: transparent; background-color: transparent;
border-color: #ff3860; border-color: #ff3860;
border-width: 1px;
color: #ff3860; color: #ff3860;
} }
@ -1163,6 +1242,17 @@ a.box:active {
color: #fff; color: #fff;
} }
.button.is-danger.is-inverted.is-outlined {
background-color: transparent;
border-color: #fff;
color: #fff;
}
.button.is-danger.is-inverted.is-outlined:hover, .button.is-danger.is-inverted.is-outlined:focus {
background-color: #fff;
color: #ff3860;
}
.button.is-small { .button.is-small {
border-radius: 2px; border-radius: 2px;
font-size: 0.75rem; font-size: 0.75rem;
@ -3770,6 +3860,7 @@ a.box:active {
display: flex; display: flex;
flex-grow: 0; flex-grow: 0;
flex-shrink: 0; flex-shrink: 0;
font-size: 1rem;
justify-content: center; justify-content: center;
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
} }
@ -3787,12 +3878,12 @@ a.box:active {
margin-left: 0.75rem; margin-left: 0.75rem;
} }
.nav-item .tag:first-child { .nav-item .tag:first-child:not(:last-child) {
margin-right: 0.25rem; margin-right: 0.5rem;
} }
.nav-item .tag:last-child { .nav-item .tag:last-child:not(:first-child) {
margin-left: 0.25rem; margin-left: 0.5rem;
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
@ -3820,21 +3911,23 @@ a.nav-item.is-active {
a.nav-item.is-tab { a.nav-item.is-tab {
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
border-top: 1px solid transparent; border-top: 1px solid transparent;
padding-left: 12px; padding-bottom: calc(0.5rem - 1px);
padding-right: 12px; padding-left: 1rem;
padding-right: 1rem;
padding-top: calc(0.5rem - 1px);
} }
.nav-item a.is-tab:hover, .nav-item a.is-tab:hover,
a.nav-item.is-tab:hover { a.nav-item.is-tab:hover {
border-bottom: 1px solid #00d1b2; border-bottom-color: #00d1b2;
border-top: 1px solid transparent; border-top-color: transparent;
} }
.nav-item a.is-tab.is-active, .nav-item a.is-tab.is-active,
a.nav-item.is-tab.is-active { a.nav-item.is-tab.is-active {
border-bottom: 3px solid #00d1b2; border-bottom: 3px solid #00d1b2;
border-top: 3px solid transparent;
color: #00d1b2; color: #00d1b2;
padding-bottom: calc(0.5rem - 3px);
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
@ -3862,12 +3955,16 @@ a.nav-item.is-tab.is-active {
} }
} }
.nav-left { .nav-left,
.nav-right {
align-items: stretch; align-items: stretch;
display: flex;
flex-basis: 0; flex-basis: 0;
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
}
.nav-left {
display: flex;
justify-content: flex-start; justify-content: flex-start;
overflow: hidden; overflow: hidden;
overflow-x: auto; overflow-x: auto;
@ -3877,19 +3974,20 @@ a.nav-item.is-tab.is-active {
.nav-center { .nav-center {
align-items: stretch; align-items: stretch;
display: flex; display: flex;
flex-grow: 0;
flex-shrink: 0;
justify-content: center; justify-content: center;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.nav-right {
justify-content: flex-end;
}
@media screen and (min-width: 769px) { @media screen and (min-width: 769px) {
.nav-right { .nav-right {
align-items: stretch;
display: flex; display: flex;
flex-basis: 0;
flex-grow: 1;
flex-shrink: 0;
justify-content: flex-end;
} }
} }

View File

@ -103,6 +103,27 @@ doc-subtab: button
<div class="column"> <div class="column">
{% highlight html %} {% highlight html %}
{{button_inverted_example}} {{button_inverted_example}}
{% endhighlight %}
</div>
</div>
<h4 class="subtitle">Invert Outlined (the invert color becomes the text and border colors)</h4>
{% capture button_inverted_outlined_example %}
<a class="button is-primary is-inverted is-outlined">Invert Outlined</a>
<a class="button is-info is-inverted is-outlined">Invert Outlined</a>
<a class="button is-success is-inverted is-outlined">Invert Outlined</a>
<a class="button is-danger is-inverted is-outlined">Invert Outlined</a>
{% endcapture %}
<div class="columns">
<div class="column">
<div class="notification is-primary">
{{button_inverted_outlined_example}}
</div>
</div>
<div class="column">
{% highlight html %}
{{button_inverted_outlined_example}}
{% endhighlight %} {% endhighlight %}
</div> </div>
</div> </div>

View File

@ -13,6 +13,7 @@ $nav-height: 3rem !default
display: flex display: flex
flex-grow: 0 flex-grow: 0
flex-shrink: 0 flex-shrink: 0
font-size: $size-normal
justify-content: center justify-content: center
padding: 0.5rem 0.75rem padding: 0.5rem 0.75rem
a a
@ -23,10 +24,10 @@ $nav-height: 3rem !default
.button + .button .button + .button
margin-left: 0.75rem margin-left: 0.75rem
.tag .tag
&:first-child &:first-child:not(:last-child)
margin-right: 0.25rem margin-right: 0.5rem
&:last-child &:last-child:not(:first-child)
margin-left: 0.25rem margin-left: 0.5rem
// Responsiveness // Responsiveness
+mobile +mobile
justify-content: flex-start justify-content: flex-start
@ -42,15 +43,17 @@ a.nav-item
&.is-tab &.is-tab
border-bottom: 1px solid transparent border-bottom: 1px solid transparent
border-top: 1px solid transparent border-top: 1px solid transparent
padding-left: 12px padding-bottom: calc(0.5rem - 1px)
padding-right: 12px padding-left: 1rem
padding-right: 1rem
padding-top: calc(0.5rem - 1px)
&:hover &:hover
border-bottom: 1px solid $link border-bottom-color: $link
border-top: 1px solid transparent border-top-color: transparent
&.is-active &.is-active
border-bottom: 3px solid $link border-bottom: 3px solid $link
border-top: 3px solid transparent
color: $link color: $link
padding-bottom: calc(0.5rem - 3px)
// Containers // Containers
@ -72,12 +75,16 @@ a.nav-item
+tablet-only +tablet-only
padding-right: 1.5rem padding-right: 1.5rem
.nav-left
.nav-left,
.nav-right
align-items: stretch align-items: stretch
display: flex
flex-basis: 0 flex-basis: 0
flex-grow: 1 flex-grow: 1
flex-shrink: 0 flex-shrink: 0
.nav-left
display: flex
justify-content: flex-start justify-content: flex-start
overflow: hidden overflow: hidden
overflow-x: auto overflow-x: auto
@ -86,19 +93,17 @@ a.nav-item
.nav-center .nav-center
align-items: stretch align-items: stretch
display: flex display: flex
flex-grow: 0
flex-shrink: 0
justify-content: center justify-content: center
margin-left: auto margin-left: auto
margin-right: auto margin-right: auto
.nav-right .nav-right
justify-content: flex-end
// Responsiveness // Responsiveness
+tablet +tablet
align-items: stretch
display: flex display: flex
flex-basis: 0
flex-grow: 1
flex-shrink: 0
justify-content: flex-end
// Main container // Main container

View File

@ -161,13 +161,20 @@ $button-shadow-inset: inset 0 1px 2px rgba($black, 0.2)
&.is-outlined &.is-outlined
background-color: transparent background-color: transparent
border-color: $color border-color: $color
border-width: 1px
color: $color color: $color
&:hover, &:hover,
&:focus &:focus
background-color: $color background-color: $color
border-color: $color border-color: $color
color: $color-invert color: $color-invert
&.is-inverted.is-outlined
background-color: transparent
border-color: $color-invert
color: $color-invert
&:hover,
&:focus
background-color: $color-invert
color: $color
// Sizes // Sizes
&.is-small &.is-small
+button-small +button-small