2015-08-18 03:33:34 +02:00
|
|
|
// Base class
|
2012-06-29 06:46:45 +02:00
|
|
|
//
|
2015-08-18 03:33:34 +02:00
|
|
|
// Kickstart any navigation component with a set of style resets. Works with
|
2019-03-07 13:38:33 +01:00
|
|
|
// `<nav>`s, `<ul>`s or `<ol>`s.
|
2012-01-08 05:40:28 +01:00
|
|
|
|
2014-07-09 22:51:49 +02:00
|
|
|
.nav {
|
2022-03-29 00:05:37 +02:00
|
|
|
// scss-docs-start nav-css-vars
|
|
|
|
--#{$prefix}nav-link-padding-x: #{$nav-link-padding-x};
|
|
|
|
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
|
|
|
|
@include rfs($nav-link-font-size, --#{$prefix}nav-link-font-size);
|
2022-05-23 04:24:08 +02:00
|
|
|
--#{$prefix}nav-link-font-weight: #{$nav-link-font-weight};
|
2022-03-29 00:05:37 +02:00
|
|
|
--#{$prefix}nav-link-color: #{$nav-link-color};
|
|
|
|
--#{$prefix}nav-link-hover-color: #{$nav-link-hover-color};
|
|
|
|
--#{$prefix}nav-link-disabled-color: #{$nav-link-disabled-color};
|
|
|
|
// scss-docs-end nav-css-vars
|
|
|
|
|
2016-12-23 19:39:53 +01:00
|
|
|
display: flex;
|
2017-01-24 08:58:22 +01:00
|
|
|
flex-wrap: wrap;
|
2015-04-26 09:02:25 +02:00
|
|
|
padding-left: 0;
|
2014-07-14 08:33:54 +02:00
|
|
|
margin-bottom: 0;
|
2015-04-26 09:02:25 +02:00
|
|
|
list-style: none;
|
2014-07-09 22:51:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.nav-link {
|
2016-12-23 19:39:53 +01:00
|
|
|
display: block;
|
2022-03-29 00:05:37 +02:00
|
|
|
padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
|
|
|
|
@include font-size(var(--#{$prefix}nav-link-font-size));
|
|
|
|
font-weight: var(--#{$prefix}nav-link-font-weight);
|
|
|
|
color: var(--#{$prefix}nav-link-color);
|
2020-03-05 15:22:52 +01:00
|
|
|
text-decoration: if($link-decoration == none, null, none);
|
2020-04-06 13:29:39 +02:00
|
|
|
@include transition($nav-link-transition);
|
2014-07-09 22:51:49 +02:00
|
|
|
|
2018-09-18 01:10:07 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2022-03-29 00:05:37 +02:00
|
|
|
color: var(--#{$prefix}nav-link-hover-color);
|
2020-03-20 09:35:55 +01:00
|
|
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
2014-07-09 22:51:49 +02:00
|
|
|
}
|
|
|
|
|
2017-04-10 23:07:44 +02:00
|
|
|
// Disabled state lightens text
|
2014-07-10 01:04:31 +02:00
|
|
|
&.disabled {
|
2022-03-29 00:05:37 +02:00
|
|
|
color: var(--#{$prefix}nav-link-disabled-color);
|
2018-11-04 21:17:14 +01:00
|
|
|
pointer-events: none;
|
|
|
|
cursor: default;
|
2014-07-09 22:51:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-10 01:04:31 +02:00
|
|
|
//
|
2012-11-04 00:14:44 +01:00
|
|
|
// Tabs
|
2014-07-10 01:04:31 +02:00
|
|
|
//
|
2012-01-08 05:40:28 +01:00
|
|
|
|
2012-01-31 06:29:50 +01:00
|
|
|
.nav-tabs {
|
2022-03-29 00:05:37 +02:00
|
|
|
// scss-docs-start nav-tabs-css-vars
|
|
|
|
--#{$prefix}nav-tabs-border-width: #{$nav-tabs-border-width};
|
|
|
|
--#{$prefix}nav-tabs-border-color: #{$nav-tabs-border-color};
|
|
|
|
--#{$prefix}nav-tabs-border-radius: #{$nav-tabs-border-radius};
|
|
|
|
--#{$prefix}nav-tabs-link-hover-border-color: #{$nav-tabs-link-hover-border-color};
|
|
|
|
--#{$prefix}nav-tabs-link-active-color: #{$nav-tabs-link-active-color};
|
|
|
|
--#{$prefix}nav-tabs-link-active-bg: #{$nav-tabs-link-active-bg};
|
|
|
|
--#{$prefix}nav-tabs-link-active-border-color: #{$nav-tabs-link-active-border-color};
|
|
|
|
// scss-docs-end nav-tabs-css-vars
|
|
|
|
|
|
|
|
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);
|
2014-07-10 01:04:31 +02:00
|
|
|
|
|
|
|
.nav-link {
|
2022-03-29 00:05:37 +02:00
|
|
|
margin-bottom: calc(var(--#{$prefix}nav-tabs-border-width) * -1); // stylelint-disable-line function-disallowed-list
|
2021-02-09 06:23:45 +01:00
|
|
|
background: none;
|
2022-03-29 00:05:37 +02:00
|
|
|
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
|
|
|
|
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
|
2013-04-16 16:45:51 +02:00
|
|
|
|
2018-09-18 01:10:07 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2021-02-09 06:23:45 +01:00
|
|
|
// Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
|
|
|
|
isolation: isolate;
|
2022-03-29 00:05:37 +02:00
|
|
|
border-color: var(--#{$prefix}nav-tabs-link-hover-border-color);
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
2015-08-19 05:25:31 +02:00
|
|
|
|
2022-05-06 04:26:15 +02:00
|
|
|
&.disabled,
|
|
|
|
&:disabled {
|
2022-03-29 00:05:37 +02:00
|
|
|
color: var(--#{$prefix}nav-link-disabled-color);
|
2016-12-28 09:03:06 +01:00
|
|
|
background-color: transparent;
|
|
|
|
border-color: transparent;
|
2015-08-19 05:25:31 +02:00
|
|
|
}
|
2014-07-10 01:04:31 +02:00
|
|
|
}
|
2013-04-16 16:45:51 +02:00
|
|
|
|
2015-08-19 05:25:31 +02:00
|
|
|
.nav-link.active,
|
2016-12-28 23:49:21 +01:00
|
|
|
.nav-item.show .nav-link {
|
2022-03-29 00:05:37 +02:00
|
|
|
color: var(--#{$prefix}nav-tabs-link-active-color);
|
|
|
|
background-color: var(--#{$prefix}nav-tabs-link-active-bg);
|
|
|
|
border-color: var(--#{$prefix}nav-tabs-link-active-border-color);
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
2016-01-07 00:51:23 +01:00
|
|
|
|
|
|
|
.dropdown-menu {
|
|
|
|
// Make dropdown border overlap tab border
|
2022-03-29 00:05:37 +02:00
|
|
|
margin-top: calc(var(--#{$prefix}nav-tabs-border-width) * -1); // stylelint-disable-line function-disallowed-list
|
2016-01-07 00:51:23 +01:00
|
|
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
|
|
|
@include border-top-radius(0);
|
|
|
|
}
|
2012-11-04 08:52:10 +01:00
|
|
|
}
|
|
|
|
|
2013-01-18 02:02:35 +01:00
|
|
|
|
2014-07-10 01:04:31 +02:00
|
|
|
//
|
|
|
|
// Pills
|
|
|
|
//
|
2013-08-02 18:42:50 +02:00
|
|
|
|
2014-07-10 01:04:31 +02:00
|
|
|
.nav-pills {
|
2022-03-29 00:05:37 +02:00
|
|
|
// scss-docs-start nav-pills-css-vars
|
|
|
|
--#{$prefix}nav-pills-border-radius: #{$nav-pills-border-radius};
|
|
|
|
--#{$prefix}nav-pills-link-active-color: #{$nav-pills-link-active-color};
|
|
|
|
--#{$prefix}nav-pills-link-active-bg: #{$nav-pills-link-active-bg};
|
|
|
|
// scss-docs-end nav-pills-css-vars
|
|
|
|
|
2014-07-10 01:04:31 +02:00
|
|
|
.nav-link {
|
2021-02-09 06:23:45 +01:00
|
|
|
background: none;
|
|
|
|
border: 0;
|
2022-03-29 00:05:37 +02:00
|
|
|
@include border-radius(var(--#{$prefix}nav-pills-border-radius));
|
2022-05-06 04:26:15 +02:00
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
color: var(--#{$prefix}nav-link-disabled-color);
|
|
|
|
background-color: transparent;
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
2017-05-30 20:36:59 +02:00
|
|
|
}
|
2013-10-29 04:51:39 +01:00
|
|
|
|
2017-05-30 20:36:59 +02:00
|
|
|
.nav-link.active,
|
|
|
|
.show > .nav-link {
|
2022-03-29 00:05:37 +02:00
|
|
|
color: var(--#{$prefix}nav-pills-link-active-color);
|
|
|
|
@include gradient-bg(var(--#{$prefix}nav-pills-link-active-bg));
|
2013-08-16 23:01:32 +02:00
|
|
|
}
|
2013-08-02 18:42:50 +02:00
|
|
|
}
|
|
|
|
|
2016-12-23 19:40:54 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Justified variants
|
|
|
|
//
|
|
|
|
|
|
|
|
.nav-fill {
|
2020-06-05 20:57:35 +02:00
|
|
|
> .nav-link,
|
2014-07-10 01:04:31 +02:00
|
|
|
.nav-item {
|
2016-12-23 19:40:54 +01:00
|
|
|
flex: 1 1 auto;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
2013-08-27 02:37:52 +02:00
|
|
|
|
2016-12-23 19:40:54 +01:00
|
|
|
.nav-justified {
|
2020-06-05 20:57:35 +02:00
|
|
|
> .nav-link,
|
2016-12-23 19:40:54 +01:00
|
|
|
.nav-item {
|
2017-03-19 23:47:34 +01:00
|
|
|
flex-basis: 0;
|
2017-03-20 01:47:53 +01:00
|
|
|
flex-grow: 1;
|
2016-12-23 19:40:54 +01:00
|
|
|
text-align: center;
|
2013-08-02 18:42:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-26 11:59:28 +01:00
|
|
|
.nav-fill,
|
|
|
|
.nav-justified {
|
|
|
|
.nav-item .nav-link {
|
|
|
|
width: 100%; // Make sure button will grow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-02 18:42:50 +02:00
|
|
|
|
2013-02-18 05:18:29 +01:00
|
|
|
// Tabbable tabs
|
2014-07-10 01:04:31 +02:00
|
|
|
//
|
2013-10-14 00:55:13 +02:00
|
|
|
// Hide tabbable panes to start, show them when `.active`
|
2016-12-23 19:40:54 +01:00
|
|
|
|
2013-10-14 00:55:13 +02:00
|
|
|
.tab-content {
|
|
|
|
> .tab-pane {
|
|
|
|
display: none;
|
|
|
|
}
|
2013-07-07 06:51:47 +02:00
|
|
|
> .active {
|
|
|
|
display: block;
|
|
|
|
}
|
2013-02-18 05:18:29 +01:00
|
|
|
}
|