Skip to content

Commit 1ce4372

Browse files
author
AMJones
committed
Adds tab overflow css.
1 parent a9cf139 commit 1ce4372

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"layout"
1010
],
1111
"homepage": "https://www.github.com/strapless/layout",
12-
"version": "1.0",
12+
"version": "1.1",
1313
"authors": [
1414
{
1515
"name": "Aaron M Jones",

scss/_header.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,30 @@ header {
203203

204204
@include header-navbar-theme(light, $navbar-light-bg, $navbar-light-color, $navbar-light-active-color, $navbar-light-hover-color, $navbar-light-disabled-color);
205205
@include header-navbar-theme(dark, $navbar-dark-bg, $navbar-dark-color, $navbar-dark-active-color, $navbar-dark-hover-color, $navbar-dark-disabled-color);
206+
}
207+
208+
.nav-tabs[data-overflow] {
209+
position: relative;
210+
display: flex;
211+
flex-direction: row;
212+
flex-wrap: nowrap;
213+
flex: 1 0 auto;
214+
overflow-x: scroll;
215+
overflow-y: hidden;
216+
// Hide Scrollbar in Edge
217+
-ms-overflow-style: none !important;
218+
// Hide Scrollbar in Chrome, Safari
219+
&::-webkit-scrollbar {
220+
display: none;
221+
}
222+
&::after {
223+
display: inline-block;
224+
content: ' ';
225+
position: absolute;
226+
width: 8px;
227+
height: 8px;
228+
right: 0;
229+
top: 50%;
230+
margin-top: -4px;
231+
}
206232
}

scss/_layout-mixins.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// region //////////////////////////////////////////////// Header Mixins
44

5-
@mixin header-navbar-theme($theme, $bg, $color, $active, $hover, $disabled) {
5+
@mixin header-navbar-theme($theme, $bg, $color, $active, $hover, $disabled, $indicator) {
66
&.header-#{$theme} {
77
background-color: $bg;
88
.navbar-brand {
@@ -59,6 +59,10 @@
5959
color: $disabled;
6060
}
6161
}
62+
63+
.nav-tabs[data-overflow]::after {
64+
background: transparent inline-svg($indicator) center center / 8px 8px no-repeat;
65+
}
6266
}
6367
}
6468

scss/_layout-variables.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ $header-navbar-padding-y: $navbar-padding-y !default;
1010
$header-navbar-height: if(variable-exists(navbar-height),$navbar-height, 64px) !default;
1111
$navbar-dropdown-offset: 2px !default;
1212

13+
$navbar-light-overflow-indicator: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><path fill="#{$navbar-light-color}" d="M0 0v8l4-4-4-4z" transform="translate(2)" /></svg>' !default;
14+
$navbar-dark-overflow-indicator: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><path fill="#{$navbar-dark-color}" d="M0 0v8l4-4-4-4z" transform="translate(2)" /></svg>' !default;
15+
1316
// endregion ///////////////////////////////////////////// End Header Variables
1417

1518
// region //////////////////////////////////////////////// Footer Variables

0 commit comments

Comments
 (0)