|
88 | 88 | @include tab-badge-style($tabs-dark-text, $tabs-dark-bg);
|
89 | 89 | }
|
90 | 90 |
|
91 |
| -@mixin tabs-striped($style, $color) { |
| 91 | +@mixin tabs-striped($style, $color, $background) { |
92 | 92 | &.#{$style} {
|
93 |
| - .tab-item.tab-item-active, |
94 |
| - .tab-item.active, |
95 |
| - .tab-item.activated { |
96 |
| - margin-top: -4px; |
97 |
| - color: $color; |
98 |
| - border-style: solid; |
99 |
| - border-width: $tabs-striped-border-width 0 0 0; |
100 |
| - border-color: $color; |
| 93 | + .tabs{ |
| 94 | + background-color: $background; |
| 95 | + } |
| 96 | + .tab-item { |
| 97 | + color: rgba($color, $tabs-striped-off-opacity); |
| 98 | + opacity: 1; |
| 99 | + .badge{ |
| 100 | + opacity:$tabs-striped-off-opacity; |
| 101 | + } |
| 102 | + &.tab-item-active, |
| 103 | + &.active, |
| 104 | + &.activated { |
| 105 | + margin-top: -$tabs-striped-border-width; |
| 106 | + color: $color; |
| 107 | + border-style: solid; |
| 108 | + border-width: $tabs-striped-border-width 0 0 0; |
| 109 | + border-color: $color; |
| 110 | + .badge{ |
| 111 | + top:$tabs-striped-border-width; |
| 112 | + opacity: 1; |
| 113 | + } |
| 114 | + } |
| 115 | + } |
| 116 | + } |
| 117 | + &.tabs-top{ |
| 118 | + .tab-item { |
| 119 | + &.tab-item-active, |
| 120 | + &.active, |
| 121 | + &.activated { |
| 122 | + .badge { |
| 123 | + top: 4%; |
| 124 | + } |
| 125 | + } |
101 | 126 | }
|
102 | 127 | }
|
103 | 128 | }
|
104 | 129 |
|
105 |
| -.tabs-striped { |
| 130 | +@mixin tabs-background($style, $color) { |
| 131 | + &.#{$style} { |
| 132 | + .tabs { |
| 133 | + background-color: $color; |
| 134 | + } |
| 135 | + } |
| 136 | +} |
| 137 | + |
| 138 | +@mixin tabs-color($style, $color) { |
| 139 | + &.#{$style} { |
| 140 | + .tab-item { |
| 141 | + color: rgba($color, $tabs-striped-off-opacity); |
| 142 | + opacity: 1; |
| 143 | + .badge{ |
| 144 | + opacity:$tabs-striped-off-opacity; |
| 145 | + } |
| 146 | + &.tab-item-active, |
| 147 | + &.active, |
| 148 | + &.activated { |
| 149 | + margin-top: -$tabs-striped-border-width; |
| 150 | + color: $color; |
| 151 | + border: 0 solid $color; |
| 152 | + border-top-width: $tabs-striped-border-width; |
| 153 | + .badge{ |
| 154 | + top:$tabs-striped-border-width; |
| 155 | + opacity: 1; |
| 156 | + } |
| 157 | + } |
| 158 | + } |
| 159 | + } |
| 160 | +} |
106 | 161 |
|
| 162 | +.tabs-striped { |
107 | 163 | .tabs {
|
108 | 164 | background-color: white;
|
109 | 165 | background-image: none;
|
110 | 166 | border: none;
|
| 167 | + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15); |
| 168 | + padding-top: $tabs-striped-border-width; |
111 | 169 | }
|
112 |
| - |
113 |
| - @include tabs-striped('tabs-light', $light); |
114 |
| - @include tabs-striped('tabs-stable', $stable); |
115 |
| - @include tabs-striped('tabs-positive', $positive); |
116 |
| - @include tabs-striped('tabs-calm', $calm); |
117 |
| - @include tabs-striped('tabs-assertive', $assertive); |
118 |
| - @include tabs-striped('tabs-balanced', $balanced); |
119 |
| - @include tabs-striped('tabs-energized', $energized); |
120 |
| - @include tabs-striped('tabs-royal', $royal); |
121 |
| - @include tabs-striped('tabs-dark', $dark); |
122 |
| - |
123 |
| - &.tabs-icon-only .icon { |
124 |
| - } |
125 |
| - |
126 |
| - .tab-item { |
127 |
| - color: $tabs-striped-off-color; |
128 |
| - opacity: $tabs-striped-off-opacity; |
129 |
| - } |
130 |
| - .tab-item + .tab-item:before { |
131 |
| - border-left: 1px solid #ccc; |
132 |
| - display: block; |
133 |
| - float: left; |
134 |
| - width: 2px; |
135 |
| - height: 26px; |
136 |
| - margin: 11px auto; |
137 |
| - content: " "; |
138 |
| - } |
139 |
| - |
| 170 | + @include tabs-striped('tabs-light', $light, $dark); |
| 171 | + @include tabs-striped('tabs-stable', $stable, $dark); |
| 172 | + @include tabs-striped('tabs-positive', $positive, $light); |
| 173 | + @include tabs-striped('tabs-calm', $calm, $light); |
| 174 | + @include tabs-striped('tabs-assertive', $assertive, $light); |
| 175 | + @include tabs-striped('tabs-balanced', $balanced, $light); |
| 176 | + @include tabs-striped('tabs-energized', $energized, $light); |
| 177 | + @include tabs-striped('tabs-royal', $royal, $light); |
| 178 | + @include tabs-striped('tabs-dark', $dark, $light); |
| 179 | + |
| 180 | + |
| 181 | + @include tabs-background('tabs-background-light', $light); |
| 182 | + @include tabs-background('tabs-background-stable', $stable); |
| 183 | + @include tabs-background('tabs-background-positive', $positive); |
| 184 | + @include tabs-background('tabs-background-calm', $calm); |
| 185 | + @include tabs-background('tabs-background-assertive', $assertive); |
| 186 | + @include tabs-background('tabs-background-balanced', $balanced); |
| 187 | + @include tabs-background('tabs-background-energized',$energized); |
| 188 | + @include tabs-background('tabs-background-royal', $royal); |
| 189 | + @include tabs-background('tabs-background-dark', $dark); |
| 190 | + |
| 191 | + @include tabs-color('tabs-color-light', $light); |
| 192 | + @include tabs-color('tabs-color-stable', $stable); |
| 193 | + @include tabs-color('tabs-color-positive', $positive); |
| 194 | + @include tabs-color('tabs-color-calm', $calm); |
| 195 | + @include tabs-color('tabs-color-assertive', $assertive); |
| 196 | + @include tabs-color('tabs-color-balanced', $balanced); |
| 197 | + @include tabs-color('tabs-color-energized',$energized); |
| 198 | + @include tabs-color('tabs-color-royal', $royal); |
| 199 | + @include tabs-color('tabs-color-dark', $dark); |
140 | 200 | }
|
141 | 201 |
|
142 | 202 | .tabs-top {
|
143 | 203 | &.tabs-striped {
|
144 |
| - .tab-item.tab-item-active, |
145 |
| - .tab-item.active, |
146 |
| - .tab-item.activated { |
147 |
| - margin-top: 0; |
148 |
| - margin-bottom: -4px; |
149 |
| - border-width: 0px 0px $tabs-striped-border-width 0px !important; |
| 204 | + padding-bottom:0; |
| 205 | + .tab-item{ |
| 206 | + background: transparent; |
| 207 | + // animate the top bar, leave bottom for platform consistency |
| 208 | + -webkit-transition: all .1s ease; |
| 209 | + -moz-transition: all .1s ease; |
| 210 | + -ms-transition: all .1s ease; |
| 211 | + -o-transition: all .1s ease; |
| 212 | + transition: all .1s ease; |
| 213 | + &.tab-item-active, |
| 214 | + &.active, |
| 215 | + &.activated { |
| 216 | + margin-top: 0; |
| 217 | + margin-bottom: -$tabs-striped-border-width; |
| 218 | + border-width: 0px 0px $tabs-striped-border-width 0px !important; |
| 219 | + border-style: solid; |
| 220 | + } |
| 221 | + .badge{ |
| 222 | + -webkit-transition: all .2s ease; |
| 223 | + -moz-transition: all .2s ease; |
| 224 | + -ms-transition: all .2s ease; |
| 225 | + -o-transition: all .2s ease; |
| 226 | + transition: all .2s ease; |
| 227 | + } |
150 | 228 | }
|
151 | 229 | }
|
152 | 230 | }
|
|
157 | 235 | .tabs.tabs-top {
|
158 | 236 | top: $bar-height;
|
159 | 237 | padding-top: 0;
|
160 |
| - padding-bottom: 2px; |
161 | 238 | background-position: bottom;
|
162 |
| - |
| 239 | + .tab-item { |
| 240 | + &.tab-item-active, |
| 241 | + &.active, |
| 242 | + &.activated { |
| 243 | + .badge { |
| 244 | + top: 4%; |
| 245 | + } |
| 246 | + } |
| 247 | + } |
| 248 | +} |
| 249 | +.tabs-top ~ .bar-header { |
| 250 | + border-bottom-width: 0; |
163 | 251 | }
|
164 | 252 |
|
165 | 253 | .tab-item {
|
|
0 commit comments