@roadtrip/css
Version:
CSS framework for Roadtrip Design System
228 lines (188 loc) • 5.2 kB
CSS
/*
* Progress indicator horizontal
*
* Index
* - Progress indicator horizontal
* - Progress indicator horizontal item
* - Progress indicator horizontal link
* - Progress indicator horizontal icon
* - Progress indicator horizontal title
* - Progress indicator horizontal completed
*
*/
/* PROGRESS INDICATOR HORIZONTAL
-------------------- */
.progress-indicator-horizontal {
display: flex;
padding-left: 0;
margin: 0;
font-family: var(--road-font);
line-height: 1.5;
list-style: none;
}
.progress-indicator-horizontal.progress-indicator-horizontal-header {
background-color: var(--road-header-surface);
}
/* STEPPER ITEM
-------------------- */
.progress-indicator-horizontal-item {
display: flex;
flex: 1;
flex-direction: column;
text-align: center;
}
.progress-indicator-horizontal-item:last-child {
margin-top: 0.125rem;
}
/**
* Line between items
*/
.progress-indicator-horizontal-item:not(:last-child)::after {
position: relative;
top: 0.8rem;
left: calc(50% + 12px);
order: -1;
width: calc(100% - 24px);
height: 2px;
content: "";
background: var(--road-surface-disabled);
}
.in-progress.progress-indicator-horizontal-item:not(:last-child)::after {
position: relative;
top: 0.8rem;
left: calc(50% + 12px);
order: -1;
width: calc(100% - 24px);
height: 2px;
content: "";
background: var(--road-surface-disabled);
}
.in-progress.progress-indicator-horizontal-item:not(:last-child)::before {
position: relative;
top: 0.93rem;
left: calc(50% + 12px);
order: -1;
width: calc(50% - 24px);
height: 2px;
content: "";
background: var(--road-primary);
}
.progress-indicator-horizontal-header .progress-indicator-horizontal-item:not(:last-child)::after {
position: relative;
top: 0.8rem;
left: calc(50% + 12px);
order: -1;
width: calc(100% - 24px);
height: 2px;
content: "";
background: var(--road-header-surface-disabled);
}
/**
* Disabled click for current and next steps
*/
.progress-indicator-horizontal-item:not(.completed) .progress-indicator-horizontal-link {
cursor: not-allowed;
}
/* STEPPER LINK
-------------------- */
.progress-indicator-horizontal-link {
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
}
/* STEPPER ICON
-------------------- */
.progress-indicator-horizontal-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.5rem;
height: 1.5rem;
font-size: var(--road-font-size-12);
font-weight: 700;
color: var(--road-on-surface-disabled);
background: var(--road-surface-disabled);
border-radius: 50%;
fill: currentColor;
}
.progress-indicator-horizontal-header .progress-indicator-horizontal-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.5rem;
height: 1.5rem;
font-size: var(--road-font-size-12);
font-weight: 700;
color: var(--road-on-header-surface-disabled);
background: var(--road-header-surface-disabled);
border-radius: 50%;
fill: currentColor;
}
/* STEPPER TITLE
-------------------- */
.progress-indicator-horizontal-title {
display: block;
margin-top: 0.25rem;
font-size: var(--road-body-small);
font-weight: 700;
color: var(--road-on-surface-disabled);
}
.progress-indicator-horizontal-title span{
display: block;
font-size: var(--road-body-small);
font-weight: 400;
color: var(--road-on-surface-disabled);
}
.progress-indicator-horizontal-header .progress-indicator-horizontal-title {
display: block;
margin-top: 0.25rem;
font-size: var(--road-body-small);
font-weight: 700;
color: var(--road-on-header-surface-disabled);
}
.progress-indicator-horizontal-header .progress-indicator-horizontal-title span{
display: block;
font-size: var(--road-body-small);
font-weight: 400;
color: var(--road-on-header-surface-disabled);
}
/* STEP COMPLETED
-------------------- */
.completed:not(:last-child)::after {
background: var(--road-primary);
}
.progress-indicator-horizontal-header .completed:not(:last-child)::after {
background: var(--road-header-badge);
}
.completed .progress-indicator-horizontal-icon,
.current .progress-indicator-horizontal-icon {
color: var(--road-on-primary);
background: var(--road-primary);
border: 0;
}
.completed .progress-indicator-horizontal-icon {
color: var(--road-primary);
background: var(--road-surface);
border: 2px solid var(--road-primary);
}
.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-icon {
color: var(--road-header-badge);
background: none;
border: 2px solid var(--road-header-badge);
}
.progress-indicator-horizontal-header .current .progress-indicator-horizontal-icon {
color: var(--road-on-header-badge);
background: var(--road-header-badge);
}
.current .progress-indicator-horizontal-title {
font-weight: 700;
color: var(--road-on-surface);
}
.completed .progress-indicator-horizontal-title {
color: var(--road-on-surface);
}
.progress-indicator-horizontal-header .current .progress-indicator-horizontal-title,
.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-title {
color: var(--road-on-header-surface);
}