smartwizard
Version:
The awesome step wizard plugin for jQuery
482 lines (408 loc) • 11.8 kB
CSS
/*!
* jQuery SmartWizard v6.x
* The awesome step wizard plugin for jQuery
* http://www.techlaboratory.net/jquery-smartwizard
*
* Created by Dipu Raj (http://dipu.me)
*
* Licensed under the terms of the MIT License
* https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE
*/
/* SmartWizard Variables */
/* SmartWizard Root */
:root {
--sw-border-color: #eeeeee;
--sw-toolbar-btn-color: #ffffff;
--sw-toolbar-btn-background-color: #009EF7;
--sw-anchor-default-primary-color: #f8f9fa;
--sw-anchor-default-secondary-color: #b0b0b1;
--sw-anchor-active-primary-color: #009EF7;
--sw-anchor-active-secondary-color: #ffffff;
--sw-anchor-done-primary-color: #90d4fa;
--sw-anchor-done-secondary-color: #fefefe;
--sw-anchor-disabled-primary-color: #f8f9fa;
--sw-anchor-disabled-secondary-color: #dbe0e5;
--sw-anchor-error-primary-color: #dc3545;
--sw-anchor-error-secondary-color: #ffffff;
--sw-anchor-warning-primary-color: #ffc107;
--sw-anchor-warning-secondary-color: #ffffff;
--sw-progress-color: #009EF7;
--sw-progress-background-color: #f8f9fa;
--sw-loader-color: #009EF7;
--sw-loader-background-color: #f8f9fa;
--sw-loader-background-wrapper-color: rgba(255, 255, 255, 0.7);
}
/* SmartWizard Base Styles */
.sw {
position: relative;
}
.sw *,
.sw *::before,
.sw *::after {
box-sizing: border-box;
}
.sw > .tab-content {
position: relative;
overflow: hidden;
}
.sw > .tab-content > .tab-pane {
padding: 0.8rem;
}
.sw .toolbar {
padding: 0.8rem;
text-align: right;
}
.sw .toolbar > .sw-btn {
display: inline-block;
text-decoration: none;
text-align: center;
text-transform: none;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
margin-left: 0.2rem;
margin-right: 0.2rem;
cursor: pointer;
padding: 0.375rem 0.75rem;
border-radius: 0.25rem;
font-weight: 400;
color: var(--sw-toolbar-btn-color);
background-color: var(--sw-toolbar-btn-background-color);
border: 1px solid var(--sw-toolbar-btn-background-color);
}
.sw .toolbar > .sw-btn.disabled, .sw .toolbar > .sw-btn:disabled {
opacity: 0.65;
}
.sw[dir=rtl] > .toolbar {
text-align: left;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column ;
flex: 1 auto;
}
}
.sw > .nav .nav-link {
display: block;
padding: 0.5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus {
text-decoration: none;
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0;
}
.sw > .nav .nav-link.disabled {
pointer-events: none;
cursor: not-allowed;
}
.sw > .nav .nav-link.hidden {
display: none;
visibility: none;
}
.sw > .nav .nav-link > .num {
display: flex;
justify-content: center;
align-items: center;
float: left;
pointer-events: none;
height: 100%;
padding-left: 0.5rem;
padding-right: 0.5rem;
border-radius: 10em;
text-align: center;
font-size: 2em;
font-weight: 800;
clear: both;
line-height: 1;
text-decoration: none;
}
.sw[dir=rtl] > .nav .nav-link > .num {
float: right;
}
.sw > .progress {
padding: 0;
margin: 0;
border: 0;
width: 100%;
height: 5px;
background: var(--sw-progress-background-color);
overflow: hidden;
}
.sw > .progress > .progress-bar {
height: 5px;
width: 0%;
background-color: var(--sw-progress-color);
transition: width 0.5s ease-in-out;
}
.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
.sw.sw-loading {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.sw.sw-loading::after {
content: "";
display: block;
position: absolute;
opacity: 1;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: var(--sw-loader-background-wrapper-color);
z-index: 2;
}
.sw.sw-loading::before {
content: "";
display: inline-block;
position: absolute;
top: 45%;
left: 45%;
width: 2rem;
height: 2rem;
border: 10px solid var(--sw-loader-color);
border-top: 10px solid var(--sw-loader-background-color);
border-radius: 50%;
z-index: 10;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* SmartWizard Theme: Arrows */
.sw-theme-arrows {
border: 1px solid var(--sw-border-color);
}
.sw-theme-arrows > .nav {
overflow: hidden;
}
@media screen and (min-width: 640px) {
.sw-theme-arrows > .nav .nav-item:first-child .nav-link {
padding-left: 10px;
margin-left: 0;
}
}
.sw-theme-arrows > .nav .nav-item:last-child .nav-link {
margin-right: 0px;
}
.sw-theme-arrows > .nav .nav-link {
position: relative;
height: 100%;
padding: 10px;
margin-right: 30px;
margin-left: -30px;
padding-left: 50px;
transition: all 0.5s ease-in-out;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link {
overflow: hidden;
margin-right: unset;
text-align: left ;
}
}
.sw-theme-arrows > .nav .nav-link::after, .sw-theme-arrows > .nav .nav-link::before {
content: "";
pointer-events: none;
position: absolute;
display: block;
left: 100%;
top: 50%;
height: 0;
width: 0;
margin-top: -50px;
border: 50px solid transparent;
border-left-width: 40px;
transition: all 0.5s ease-in-out;
}
.sw-theme-arrows > .nav .nav-link::after {
z-index: 2;
}
.sw-theme-arrows > .nav .nav-link::before {
z-index: 1;
}
.sw-theme-arrows > .nav .nav-link.default {
color: var(--sw-anchor-default-secondary-color);
background-color: var(--sw-anchor-default-primary-color);
cursor: not-allowed;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link.default {
border-bottom: 1px solid var(--sw-anchor-default-primary-color);
}
}
.sw-theme-arrows > .nav .nav-link.default::after {
border-left-color: var(--sw-anchor-default-primary-color);
}
.sw-theme-arrows > .nav .nav-link.default::before {
border-left-color: var(--sw-anchor-default-secondary-color);
}
.sw-theme-arrows > .nav .nav-link.active {
color: var(--sw-anchor-active-secondary-color) ;
border-color: var(--sw-anchor-active-primary-color);
background-color: var(--sw-anchor-active-primary-color);
cursor: pointer;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link.active {
border-bottom: 1px solid var(--sw-anchor-active-secondary-color);
}
}
.sw-theme-arrows > .nav .nav-link.active::after {
border-left-color: var(--sw-anchor-active-primary-color);
}
.sw-theme-arrows > .nav .nav-link.active::before {
border-left-color: var(--sw-anchor-active-secondary-color);
}
.sw-theme-arrows > .nav .nav-link.done {
color: var(--sw-anchor-done-secondary-color);
border-color: var(--sw-anchor-done-primary-color);
background-color: var(--sw-anchor-done-primary-color);
cursor: pointer;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link.done {
border-bottom: 1px solid var(--sw-anchor-done-secondary-color);
}
}
.sw-theme-arrows > .nav .nav-link.done::after {
border-left-color: var(--sw-anchor-done-primary-color);
}
.sw-theme-arrows > .nav .nav-link.done::before {
border-left-color: var(--sw-anchor-done-secondary-color);
}
.sw-theme-arrows > .nav .nav-link.disabled {
color: var(--sw-anchor-disabled-secondary-color);
border-color: var(--sw-anchor-disabled-primary-color);
background-color: var(--sw-anchor-disabled-primary-color);
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link.disabled {
border-bottom: 1px solid var(--sw-anchor-disabled-secondary-color);
}
}
.sw-theme-arrows > .nav .nav-link.disabled::after {
border-left-color: var(--sw-anchor-disabled-primary-color);
}
.sw-theme-arrows > .nav .nav-link.disabled::before {
border-left-color: var(--sw-anchor-disabled-secondary-color);
}
.sw-theme-arrows > .nav .nav-link.error {
color: var(--sw-anchor-error-secondary-color);
border-color: var(--sw-anchor-error-primary-color);
background-color: var(--sw-anchor-error-primary-color);
cursor: pointer;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link.error {
border-bottom: 1px solid var(--sw-anchor-error-secondary-color);
}
}
.sw-theme-arrows > .nav .nav-link.error::after {
border-left-color: var(--sw-anchor-error-primary-color);
}
.sw-theme-arrows > .nav .nav-link.error::before {
border-left-color: var(--sw-anchor-error-secondary-color);
}
.sw-theme-arrows > .nav .nav-link.warning {
color: var(--sw-anchor-warning-secondary-color);
border-color: var(--sw-anchor-warning-primary-color);
background-color: var(--sw-anchor-warning-primary-color);
cursor: pointer;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link.warning {
border-bottom: 1px solid var(--sw-anchor-warning-secondary-color);
}
}
.sw-theme-arrows > .nav .nav-link.warning::after {
border-left-color: var(--sw-anchor-warning-primary-color);
}
.sw-theme-arrows > .nav .nav-link.warning::before {
border-left-color: var(--sw-anchor-warning-secondary-color);
}
.sw-theme-arrows[dir=rtl] > .nav {
padding-right: 0;
}
.sw-theme-arrows[dir=rtl] > .nav .nav-item:first-child .nav-link {
padding-left: unset;
margin-left: unset;
padding-right: 10px;
margin-right: 0;
}
.sw-theme-arrows[dir=rtl] > .nav .nav-item:last-child .nav-link {
margin-right: unset;
margin-left: 0px;
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link {
margin-right: unset;
margin-left: unset;
padding-left: unset;
padding-right: 50px;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows[dir=rtl] > .nav .nav-link {
margin-left: unset;
}
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link::after, .sw-theme-arrows[dir=rtl] > .nav .nav-link::before {
left: unset;
right: 100%;
border-left-width: 0;
border-right-width: 40px;
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.default::after {
border-right-color: var(--sw-anchor-default-primary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.default::before {
border-right-color: var(--sw-anchor-default-secondary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.active::after {
border-right-color: var(--sw-anchor-active-primary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.active::before {
border-right-color: var(--sw-anchor-active-secondary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.done::after {
border-right-color: var(--sw-anchor-done-primary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.done::before {
border-right-color: var(--sw-anchor-done-secondary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.disabled::after {
border-left-color: unset;
border-right-color: var(--sw-anchor-disabled-primary-color);
}
.sw-theme-arrows[dir=rtl] > .nav .nav-link.disabled::before {
border-left-color: unset;
border-right-color: var(--sw-anchor-disabled-secondary-color);
}