Fix Gantt layout overflowsing on mobile

This commit is contained in:
kolaente 2021-07-26 11:25:55 +02:00
parent fd5d331eca
commit 34849d80b7
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -2,236 +2,255 @@ $gantt-border: 1px solid $grey-200;
$gantt-vertical-border-color: $grey-100; $gantt-vertical-border-color: $grey-100;
.gantt-chart-container { .gantt-chart-container {
padding-bottom: 1rem; padding-bottom: 1rem;
} }
.gantt-chart { .gantt-chart {
overflow-x: auto; overflow-x: auto;
border-top: 1px solid $grey-200; border-top: 1px solid $grey-200;
.dates { .dates {
display: flex; display: flex;
text-align: center; text-align: center;
.months { .months {
display: flex; display: flex;
.month { .month {
padding: 0.5rem 0 0; padding: 0.5rem 0 0;
border-right: $gantt-border; border-right: $gantt-border;
font-family: $vikunja-font; font-family: $vikunja-font;
font-weight: bold; font-weight: bold;
&:last-child { &:last-child {
border-right: none; border-right: none;
} }
.days { .days {
display: flex; display: flex;
.day { .day {
padding: 0.5rem 0; padding: 0.5rem 0;
font-weight: normal; font-weight: normal;
&.today { &.today {
background: $primary; background: $primary;
color: $white; color: $white;
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
font-weight: bold; font-weight: bold;
} }
.theday { .theday {
padding: 0 .5rem; padding: 0 .5rem;
width: 100%; width: 100%;
display: block; display: block;
} }
.weekday { .weekday {
font-size: 0.8rem; font-size: 0.8rem;
} }
} }
} }
} }
} }
} }
.tasks { .tasks {
max-width: unset !important; max-width: unset !important;
margin: 0; margin: 0;
border-top: $gantt-border; border-top: $gantt-border;
.row { .row {
height: 45px; height: 45px;
.task { .task {
display: inline-block; display: inline-block;
border: 2px solid $primary; border: 2px solid $primary;
font-size: 0.85rem; font-size: 0.85rem;
margin: 0.5rem; margin: 0.5rem;
border-radius: 6px; border-radius: 6px;
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
cursor: grab; cursor: grab;
position: relative; position: relative;
height: 31px !important; height: 31px !important;
-webkit-touch-callout: none; // iOS Safari -webkit-touch-callout: none; // iOS Safari
-webkit-user-select: none; // Safari -webkit-user-select: none; // Safari
-khtml-user-select: none; // Konqueror HTML -khtml-user-select: none; // Konqueror HTML
-moz-user-select: none; // Firefox -moz-user-select: none; // Firefox
-ms-user-select: none; // Internet Explorer/Edge -ms-user-select: none; // Internet Explorer/Edge
user-select: none; // Non-prefixed version, currently supported by Chrome and Opera user-select: none; // Non-prefixed version, currently supported by Chrome and Opera
&.is-current-edit { &.is-current-edit {
border-color: $orange !important; border-color: $orange !important;
} }
&.has-light-text { &.has-light-text {
color: $light; color: $light;
&.done span:after { &.done span:after {
border-top: 1px solid $light; border-top: 1px solid $light;
} }
.edit-toggle { .edit-toggle {
color: $light; color: $light;
} }
} }
&.has-dark-text { &.has-dark-text {
color: $text; color: $text;
&.done span:after { &.done span:after {
border-top: 1px solid $dark; border-top: 1px solid $dark;
} }
.edit-toggle { .edit-toggle {
color: $text; color: $text;
} }
} }
&.done span { &.done span {
position: relative; position: relative;
&:after { &:after {
content: ''; content: '';
position: absolute; position: absolute;
right: 0; right: 0;
left: 0; left: 0;
top: 57%; top: 57%;
} }
} }
span:not(.high-priority) { span:not(.high-priority) {
max-width: calc(100% - 20px); max-width: calc(100% - 20px);
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
&.has-high-priority { &.has-high-priority {
max-width: calc(100% - 90px); max-width: calc(100% - 90px);
} }
&.has-not-so-high-priority { &.has-not-so-high-priority {
max-width: calc(100% - 70px); max-width: calc(100% - 70px);
} }
&.has-super-high-priority { &.has-super-high-priority {
max-width: calc(100% - 111px); max-width: calc(100% - 111px);
} }
&.icon { &.icon {
width: 10px; width: 10px;
text-align: center; text-align: center;
} }
} }
.high-priority { .high-priority {
margin: 0 0 0 .5rem; margin: 0 0 0 .5rem;
vertical-align: bottom; vertical-align: bottom;
} }
.edit-toggle { .edit-toggle {
float: right; float: right;
cursor: pointer; cursor: pointer;
margin-right: 4px; margin-right: 4px;
} }
&.nodate { &.nodate {
border: 2px dashed $grey-300; border: 2px dashed $grey-300;
background: $grey-100; background: $grey-100;
} }
&:active { &:active {
cursor: grabbing; cursor: grabbing;
} }
} }
} }
} }
.taskedit { .taskedit {
position: fixed; position: fixed;
min-height: 0; min-height: 0;
top: 10vh; top: 10vh;
right: 10vw; right: 10vw;
z-index: 5; z-index: 5;
.card-content { .card-content {
max-height: 60vh; max-height: 60vh;
overflow-y: auto; overflow-y: auto;
} }
} }
.add-new-task { .add-new-task {
padding: 1rem .7rem .4rem .7rem; padding: 1rem .7rem .4rem .7rem;
display: flex; display: flex;
max-width: 450px; max-width: 450px;
.input { .input {
margin-right: .7rem; margin-right: .7rem;
font-size: .8rem; font-size: .8rem;
} }
.button { .button {
font-size: .68rem; font-size: .68rem;
} }
} }
} }
.gantt-options { .gantt-options {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.range-picker { @media screen and (max-width: $tablet) {
display: flex; flex-direction: column;
margin-bottom: 1rem; }
.field { .range-picker {
margin: 0 0 0 .5rem; display: flex;
max-width: 100px; margin-bottom: 1rem;
width: 50%;
&, .input { @media screen and (max-width: $tablet) {
font-size: .8rem; flex-direction: column;
} width: 100%;
}
.select { .field {
height: auto; margin-bottom: 0;
} width: 33%;
select { &:not(:last-child) {
height: auto; padding-right: .5rem;
font-size: 0.75rem; }
}
.label { @media screen and (max-width: $tablet) {
font-size: .9rem; width: 100%;
padding-left: .4rem; max-width: 100%;
} margin-top: .5rem;
} padding-right: 0 !important;
} }
&, .input {
font-size: .8rem;
}
.select, .select select {
height: auto;
width: 100%;
font-size: .8rem;
}
.label {
font-size: .9rem;
padding-left: .4rem;
}
}
}
} }
.vdr.active::before { .vdr.active::before {
display: none; display: none;
} }