Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 40 additions & 28 deletions bootstrap-nav-wizard.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

@arrow-size: 20px;
@arrow-sep: 6px;
@wizard-border: solid 0px @wizard-border-color;
@wizard-border-color: #fff;
@wizard-background: @nav-link-hover-bg;
@wizard-active-background: @nav-pills-active-link-hover-bg;
@wizard-active-color: @nav-pills-active-link-hover-color;
@wizard-hover-background: darken(@wizard-background, 10%);
@wizard-done-background: darken(@wizard-background, 5%);
@wizard-border-radius: @nav-pills-border-radius;
@wizard-disabled-color: @nav-disabled-link-color;
@wizard-padding: @nav-link-padding;

.arrow(@color) {
width: 0px;
Expand All @@ -18,76 +28,78 @@
// From github.com/acornejo/bootstrap-nav-wizard
// -------------------------
.nav-wizard {
border: @wizard-border;

> li {
float: left;

> a {
position: relative;
background-color: @nav-link-hover-bg;
background-color: @wizard-background;

.badge {
margin-left: 3px;
color: @nav-link-hover-bg;
color: @wizard-background;
background-color: @badge-active-color;
}
}
&:not(:first-child) > a {
padding-left: 2*@arrow-size - @arrow-sep;

&:before {
.arrow(#fff);
.arrow(@wizard-border-color);
left: 0;
}
}
&:not(:last-child) > a {
margin-right: @arrow-sep;

&:after {
.arrow(@nav-link-hover-bg);
.arrow(@wizard-background);
right: -@arrow-size;
z-index: 2;
}
}
&:first-child > a {
border-top-left-radius: @nav-pills-border-radius;
border-bottom-left-radius: @nav-pills-border-radius;
border-top-left-radius: @wizard-border-radius;
border-bottom-left-radius: @wizard-border-radius;
}
&:last-child > a {
border-top-right-radius: @nav-pills-border-radius;
border-bottom-right-radius: @nav-pills-border-radius;
border-top-right-radius: @wizard-border-radius;
border-bottom-right-radius: @wizard-border-radius;
}

&.done:hover > a, &:hover > a {
background-color: darken(@nav-link-hover-bg, 10%);
background-color: @wizard-hover-background;
&:before {
border-right-color: darken(@nav-link-hover-bg, 10%);
border-right-color: @wizard-hover-background;
}
&:after {
border-left-color: darken(@nav-link-hover-bg, 10%);
border-left-color: @wizard-hover-background;
}
}

&.done > a {
background-color: darken(@nav-link-hover-bg, 5%);
background-color: @wizard-done-background;

&:before {
border-right-color: darken(@nav-link-hover-bg, 5%);
border-right-color: @wizard-done-background;
}
&:after {
border-left-color: darken(@nav-link-hover-bg, 5%);
border-left-color: @wizard-done-background;
}
}

&.active > a {
&,
&:hover,
&:focus {
color: @nav-pills-active-link-hover-color;
background-color: @nav-pills-active-link-hover-bg;
color: @wizard-active-color;
background-color: @wizard-active-background;
}

&:after {
border-left-color: @nav-pills-active-link-hover-bg;
border-left-color: @wizard-active-background;
}

.badge {
Expand All @@ -97,38 +109,38 @@
}

&.disabled > a {
color: @nav-disabled-link-color;
color: @wizard-disabled-color;

&:hover,
&:focus {
color: @nav-disabled-link-color;
color: @wizard-disabled-color;
text-decoration: none;
background-color: @nav-link-hover-bg;
background-color: @wizard-background;
cursor: default;
}
&:before {
border-right-color: @nav-link-hover-bg;
border-right-color: @wizard-background;
}
&:after {
border-left-color: @nav-link-hover-bg;
border-left-color: @wizard-background;
}
}

// &.active ~ li > a {
// color: @nav-disabled-link-color;
// color: @wizard-disabled-color;
// &:hover,
// &:focus {
// color: @nav-disabled-link-hover-color;
// text-decoration: none;
// background-color: transparent;
// cursor: not-allowed;
// }
// // background-color: darken(@nav-link-hover-bg, 20%);
// // background-color: darken(@wizard-background, 20%);
// // &:before {
// // border-right-color: darken(@nav-link-hover-bg, 20%);
// // border-right-color: darken(@wizard-background, 20%);
// // }
// // &:after {
// // border-left-color: darken(@nav-link-hover-bg, 20%);
// // border-left-color: darken(@wizard-background, 20%);
// // }
// }
}
Expand All @@ -139,14 +151,14 @@
float: none;

> a {
padding: @nav-link-padding;
padding: @wizard-padding;
}
}

// Small screens size, remove the "arrows" and just show it like stacked pills.
@media (max-width: @screen-sm-min) {
> li > a {
border-radius: @nav-pills-border-radius;
border-radius: @wizard-border-radius;
margin-right: 0;

&:before,
Expand Down