.docs-nav-container {
overflow: auto;
}
+
+// docs example for example buttons
+@media screen and (max-width: 39.9375em) {
+ .button.small-only-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
+@media screen and (min-width: 40em) and (max-width: 63.9375em) {
+ .button.medium-only-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
+@media screen and (max-width: 63.9375em) {
+ .button.medium-down-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
+@media print, screen and (min-width: 40em) {
+ .button.medium-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
+@media screen and (min-width: 64em) and (max-width: 74.9375em) {
+ .button.large-only-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
+@media screen and (max-width: 74.9375em) {
+ .button.large-down-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
+@media print, screen and (min-width: 64em) {
+ .button.large-expanded {
+ display: block;
+ width: 100%;
+ margin-right: 0;
+ margin-left: 0; } }
}
}
}
+
+$button-responsive-expanded: true;
<a class="button large" href="#">So Large</a>
<a class="button expanded" href="#">Such Expand</a>
<a class="button small expanded" href="#">Wow, Small Expand</a>
-<a class="button small expanded-small" href="#">Wow, Expand only on small viewport</a>
-<a class="button small expanded-medium-down" href="#">Expand on medium and smaller</a>
-<a class="button small expanded-medium-up" href="#">Expand on medium and larger</a>
+```
+
+### Responsive Expanded buttons
+
+If you are using the Sass version, you can activate these additional responsive button expand classes by changing the `$button-responsive-expanded` variable to true. (It is false by default to reduce CSS file size.)
+
+For CSS download users, you can [get the CSS here](https://gist.github.com/rafibomb/2497ca75ceedfa3f5ccf3ba146eae295) and add it to your stylesheet.
+
+```html_example
+<a class="button small small-only-expanded" href="#">Wow, Expand only on small viewport</a>
+<a class="button small medium-only-expanded" href="#">Expand only on medium viewport</a>
+<a class="button small large-only-expanded" href="#">Expand only on large viewport</a>
+
+<a class="button small medium-expanded" href="#">Wow, Expand on medium and larger</a>
+<a class="button small large-expanded" href="#">Expand on large and larger</a>
+
+<a class="button small medium-down-expanded" href="#">Expand on medium and smaller</a>
+<a class="button small large-down-expanded" href="#">Expand on large and smaller</a>
```
---
border: 1px solid transparent;
border-radius: $button-radius;
transition: $button-transition;
-
font-size: map-get($button-sizes, default);
line-height: 1;
text-align: center;
/// Removes background fill on hover and focus for hollow buttons.
@mixin button-hollow {
&,
- &:hover, &:focus {
+ &:hover,
+ &:focus {
background-color: transparent;
}
@if $button-responsive-expanded {
@each $size in $breakpoint-classes {
@include breakpoint(#{$size} only) {
- &.expanded-#{$size} {
+ &.#{$size}-only-expanded {
@include button-expand;
}
}
@if $size != $-zf-zero-breakpoint {
@include breakpoint(#{$size} down) {
- &.expanded-#{$size}-down {
+ &.#{$size}-down-expanded {
@include button-expand;
}
}
@include breakpoint(#{$size}) {
- &.expanded-#{$size}-up {
+ &.#{$size}-expanded {
@include button-expand;
}
}