mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-06-12 20:22:24 +03:00
274 lines
4.8 KiB
SCSS
274 lines
4.8 KiB
SCSS
.g-gantt-chart {
|
|
position: relative;
|
|
overflow: auto;
|
|
-webkit-touch-callout: none;
|
|
-webkit-user-select: none;
|
|
-khtml-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
padding-bottom: 34px;
|
|
border: 1px solid $border-color;
|
|
box-sizing: border-box;
|
|
background: $background;
|
|
flex: 1;
|
|
|
|
& >>> * {
|
|
font-family: Roboto, Verdana;
|
|
}
|
|
}
|
|
|
|
.g-gantt-timeaxis,
|
|
.g-gantt-timeaxis__days,
|
|
.g-gantt-timeaxis__day,
|
|
.g-gantt-timeaxis__day > div {
|
|
display: flex;
|
|
}
|
|
|
|
.g-gantt-timeaxis {
|
|
position: sticky;
|
|
top: 0;
|
|
background: $timeaxis-background;
|
|
z-index: 4;
|
|
box-shadow: 0px 1px 3px 2px rgba(50, 50, 50, 0.5);
|
|
}
|
|
|
|
.g-gantt-timeaxis__empty-space {
|
|
min-height: 100%;
|
|
background: $secondary;
|
|
z-index: 5;
|
|
left: 0;
|
|
position: sticky;
|
|
}
|
|
|
|
.g-gantt-timeaxis__days {
|
|
position: relative;
|
|
height: 100%;
|
|
}
|
|
|
|
.g-gantt-timeaxis__day {
|
|
height: 100%;
|
|
flex-direction: column;
|
|
color: $text;
|
|
|
|
&:nth-child(even) {
|
|
background: $secondary;
|
|
}
|
|
|
|
&:nth-child(odd) {
|
|
background: $primary;
|
|
}
|
|
|
|
& > div:nth-child(1) {
|
|
/* day text */
|
|
justify-content: space-around;
|
|
font-weight: bold;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
.g-gantt-timeaxis__days {
|
|
align-items: flex-end;
|
|
justify-content: space-between;
|
|
background: $ternary;
|
|
color: $text;
|
|
}
|
|
|
|
.g-gantt-timeaxis__hour {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
flex-direction: column;
|
|
opacity: 0.5;
|
|
color: $text;
|
|
|
|
&:nth-child(even) {
|
|
background: $secondary;
|
|
}
|
|
|
|
&:nth-child(odd) {
|
|
background: $primary;
|
|
}
|
|
}
|
|
|
|
.g-gantt-timeaxis__hour-pin {
|
|
width: 1px;
|
|
height: 5px;
|
|
background: $text;
|
|
}
|
|
|
|
.g-gantt-timeaxis__marker {
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
height: 5px;
|
|
width: 3px;
|
|
background: $marker-background;
|
|
}
|
|
|
|
.g-gantt-rows-container {
|
|
position: relative;
|
|
}
|
|
|
|
.g-gantt-grid {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.g-gantt-grid__line {
|
|
height: 100%;
|
|
border: 1px solid transparent;
|
|
border-left: 1px solid $border-color;
|
|
box-sizing: border-box;
|
|
display: inline-block;
|
|
}
|
|
|
|
.g-gantt-grid-line-last {
|
|
border-right: 1px solid $border-color;
|
|
}
|
|
|
|
.g-gantt-grid-line-highlighted {
|
|
background: $highlighted;
|
|
}
|
|
|
|
.g-gantt-row {
|
|
display: flex;
|
|
width: 100%;
|
|
height: 40px;
|
|
transition: background-color 0.2s;
|
|
position: relative;
|
|
}
|
|
|
|
.g-gantt-row-highlighted {
|
|
background-color: $hover-highlight;
|
|
}
|
|
|
|
.g-gantt-row__label {
|
|
display: flex;
|
|
align-items: center;
|
|
background: $ternary;
|
|
color: $text;
|
|
font-size: 0.9em;
|
|
z-index: 3;
|
|
font-weight: bold;
|
|
left: 0;
|
|
position: sticky;
|
|
padding: 0 10px;
|
|
box-sizing: border-box;
|
|
border-top: 1px solid $row-label-border-color;
|
|
border-bottom: 1px solid $row-label-border-color;
|
|
|
|
& > * {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
.g-gantt-row__bars-container {
|
|
position: relative;
|
|
border-top: 1px solid $border-color;
|
|
border-bottom: 1px solid $border-color;
|
|
flex: 1;
|
|
}
|
|
|
|
.g-gantt-bar {
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 30px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
color: white;
|
|
width: 300px;
|
|
height: 34px;
|
|
border-radius: 15px;
|
|
background: #79869c;
|
|
overflow: hidden;
|
|
cursor: move;
|
|
}
|
|
|
|
.g-gantt-bar-immobile {
|
|
cursor: unset;
|
|
}
|
|
|
|
.g-gantt-bar__label {
|
|
width: 100%;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
padding: 0 4px 0 4px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
img {
|
|
pointer-events: none;
|
|
}
|
|
|
|
& > * {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
.g-gantt-bar-resizable .g-gantt-bar__label {
|
|
padding: 0 14px 0 14px; /* 14px is the width of the handle */
|
|
}
|
|
|
|
.g-gantt-bar__handle-left,
|
|
.g-gantt-bar__handle-right {
|
|
position: absolute;
|
|
width: 10px;
|
|
height: 100%;
|
|
background: white;
|
|
opacity: 0.7;
|
|
border-radius: 40px;
|
|
}
|
|
|
|
.g-gantt-bar__handle-left {
|
|
left: 0;
|
|
cursor: w-resize;
|
|
}
|
|
|
|
.g-gantt-bar__handle-right {
|
|
right: 0;
|
|
cursor: e-resize;
|
|
}
|
|
|
|
.g-gantt-bar__tooltip {
|
|
position: absolute;
|
|
background: $tooltip-background;
|
|
color: $tooltip-color;
|
|
z-index: 3;
|
|
font-size: 0.7em;
|
|
padding: 3px;
|
|
border-radius: 3px;
|
|
transition: opacity 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
&:before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 10%;
|
|
width: 0;
|
|
height: 0;
|
|
border: 10px solid transparent;
|
|
border-bottom-color: $tooltip-background;
|
|
border-top: 0;
|
|
margin-left: -5px;
|
|
margin-top: -5px;
|
|
}
|
|
|
|
& > .color-indicator {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 100%;
|
|
margin-right: 4px;
|
|
}
|
|
}
|