Ghost theme (MIT license)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
3.3 KiB

10 years ago
// Foundation by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
10 years ago
@import 'global';
@import 'grid';
10 years ago
//
// @variables
//
$include-html-tabs-classes: $include-html-classes !default;
$tabs-navigation-padding: rem-calc(16) !default;
$tabs-navigation-bg-color: $silver !default;
$tabs-navigation-active-bg-color: $white !default;
$tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -6%) !default;
$tabs-navigation-font-color: $jet !default;
$tabs-navigation-active-font-color: $tabs-navigation-font-color !default;
$tabs-navigation-font-size: rem-calc(16) !default;
$tabs-navigation-font-family: $body-font-family !default;
$tabs-content-margin-bottom: rem-calc(24) !default;
10 years ago
$tabs-content-padding: ($column-gutter/2) !default;
10 years ago
$tabs-vertical-navigation-margin-bottom: 1.25rem !default;
@include exports("tab") {
@if $include-html-tabs-classes {
.tabs {
@include clearfix;
margin-bottom: 0 !important;
margin-left: 0;
10 years ago
dd,
.tab-title {
10 years ago
float: $default-float;
10 years ago
list-style: none;
margin-bottom: 0 !important;
position: relative;
10 years ago
> a {
display: block;
10 years ago
background-color: $tabs-navigation-bg-color;
10 years ago
color: $tabs-navigation-font-color;
font-family: $tabs-navigation-font-family;
font-size: $tabs-navigation-font-size;
10 years ago
padding: $tabs-navigation-padding $tabs-navigation-padding * 2;
10 years ago
&:hover {
10 years ago
background-color: $tabs-navigation-hover-bg-color;
10 years ago
}
10 years ago
}
10 years ago
10 years ago
&.active a {
10 years ago
background-color: $tabs-navigation-active-bg-color;
color: $tabs-navigation-active-font-color;
}
10 years ago
}
10 years ago
10 years ago
&.radius {
10 years ago
dd:first-child,
.tab:first-child {
10 years ago
a { @include side-radius($default-float, $global-radius); }
}
10 years ago
dd:last-child,
.tab:last-child {
10 years ago
a { @include side-radius($opposite-direction, $global-radius); }
}
}
10 years ago
10 years ago
&.vertical {
10 years ago
dd,
.tab-title {
10 years ago
position: inherit;
float: none;
display: block;
top: auto;
}
}
}
.tabs-content {
@include clearfix;
margin-bottom: $tabs-content-margin-bottom;
width: 100%;
10 years ago
10 years ago
> .content {
display: none;
float: $default-float;
padding: $tabs-content-padding 0;
width: 100%;
10 years ago
&.active {
display: block;
float: none;
}
&.contained {
padding: $tabs-content-padding;
}
10 years ago
}
10 years ago
10 years ago
&.vertical {
display: block;
10 years ago
> .content {
padding: 0 $tabs-content-padding;
}
10 years ago
}
}
10 years ago
10 years ago
@media #{$medium-up} {
.tabs {
&.vertical {
float: $default-float;
10 years ago
margin: 0;
margin-bottom: $tabs-vertical-navigation-margin-bottom !important;
max-width: 20%;
width: 20%;
10 years ago
}
}
10 years ago
10 years ago
.tabs-content {
&.vertical {
float: $default-float;
margin-#{$default-float}: -1px;
10 years ago
max-width: 80%;
10 years ago
padding-#{$default-float}: 1rem;
10 years ago
width: 80%;
10 years ago
}
}
}
10 years ago
10 years ago
.no-js {
.tabs-content > .content {
display: block;
float: none;
}
}
}
}