<h3>Vertical Icon Bar</h3>
-It's easy. Just add a class of `.vertical` to make the Icon Bar stack up. For an Icon bar that's horizontal on small screens but vertical on larger use '.medium-vertical' and 'large-vertical' to utilize those breakpoints.
+It's easy. Just add a class of `.vertical` to make the Icon Bar stack up. For an Icon bar that's horizontal on small screens but vertical on larger use '.medium-vertical' and 'large-vertical' to utilize those breakpoints.
<div class="row">
<div class="large-6 columns">
***
-## Customize with Sass
+## Customize with Sass
Icon Bar can be easily customized using our provided Sass variables.
$icon-bar-image-height: 1.875rem;
$icon-bar-active-color: $primary-color;
$icon-bar-item-padding: 1.25rem;
+$icon-bar-disabled-opacity: 0.7
```
{{/markdown}}
</div>
{{#markdown}}
```html
-<div class="my-custom-class"> </div>
+<div class="my-custom-class"> </div>
```
{{/markdown}}
```scss
.my-custom-class {
@include icon-bar(
-
+
// Set the background color of the icon bar. Default: $icon-bar-bg.
$bar-bg: $icon-bar-bg,
// Set the font color of the icon bar. Default: $icon-bar-font-color.
// Set the height of images within the icon bar. Default: $icon-bar-image-height
$image-height,
// Assign whether or not base styles usually associated with the icon bar to appear the way it usually does should be included. Default: true.
- $base-style: true
+ $base-style: true,
+ // Allow disabled icons. Default: false.
+ // If enabled add class disabled.
+ $disabled: false
);
}
$icon-bar-active-color: $primary-color !default;
$icon-bar-item-padding: 1.25rem !default;
+// We use this to set default opacity and cursor for disabled icons.
+$icon-bar-disabled-opacity: 0.7 !default;
+$icon-bar-disabled-cursor: $cursor-default-value !default;
+
//
// @mixins
//
$bar-icon-color:$icon-bar-icon-color,
$bar-icon-color-hover:$icon-bar-icon-color-hover,
$bar-active-color:$icon-bar-active-color,
- $base-style:true) {
+ $base-style:true,
+ $disabled:false) {
@if $base-style {
i { color: $bar-icon-color-hover; }
}
}
+ @if $disabled {
+ .item.disabled {
+ opacity: $icon-bar-disabled-opacity;
+ cursor: $icon-bar-disabled-cursor;
+ >* {
+ opacity: $icon-bar-disabled-opacity;
+ cursor: $icon-bar-disabled-cursor;
+ }
+ }
+ }
}
// $bar-icon-color - maybe we could skip explaining them all? Okay this one does change icon color if you use an icon font
// $bar-active-color - the color of an active / hover state
// $base-style - Apply base styles? Default: true.
+// $disabled - Allow disabled icons? Default: false.
@mixin icon-bar(
$bar-bg:$icon-bar-bg,
$icon-size: $icon-bar-icon-size,
$image-width: $icon-bar-image-width,
$image-height: $icon-bar-image-height,
- $base-style:true) {
+ $base-style:true,
+ $disabled:false) {
@include icon-bar-base();
@include icon-bar-size($padding, $font-size, $icon-size, $image-width, $image-height);
- @include icon-bar-style($bar-bg, $bar-font-color, $bar-font-color-hover, $bar-hover-color, $bar-icon-color, $bar-icon-color-hover, $bar-active-color, $base-style);
+ @include icon-bar-style($bar-bg, $bar-font-color, $bar-font-color-hover, $bar-hover-color, $bar-icon-color, $bar-icon-color-hover, $bar-active-color, $base-style, $disabled);
}
@include exports("icon-bar") {