Fix task list if it has tasks with a long unbreakable title
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kolaente 2020-07-07 21:38:38 +02:00
parent aa06459d27
commit 792a80ab44
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 46 additions and 20 deletions

View File

@ -1,6 +1,12 @@
<template> <template>
<div class="fancycheckbox" :class="{'is-disabled': disabled}"> <div class="fancycheckbox" :class="{'is-disabled': disabled}">
<input @change="updateData" type="checkbox" :id="checkBoxId" :checked="checked" style="display: none;" :disabled="disabled"> <input
@change="updateData"
type="checkbox"
:id="checkBoxId"
:checked="checked"
style="display: none;"
:disabled="disabled"/>
<label :for="checkBoxId" class="check"> <label :for="checkBoxId" class="check">
<svg width="18px" height="18px" viewBox="0 0 18 18"> <svg width="18px" height="18px" viewBox="0 0 18 18">
<path d="M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"></path> <path d="M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"></path>

View File

@ -18,7 +18,7 @@
} }
.task { .task {
display: block; display: flex;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
border-bottom: 1px solid darken(#fff, 10%); border-bottom: 1px solid darken(#fff, 10%);
transition: background-color $transition; transition: background-color $transition;
@ -28,7 +28,7 @@
} }
span:not(.tag) { span:not(.tag) {
width: calc(100% - 40px); width: 100%;
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
@ -39,10 +39,11 @@
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
width: 94%; max-width: calc(#{$desktop} - 27px - 2rem); // The max width of the outer container minus the padding
width: calc(100% - 2rem); // The max width of the outer container minus the padding
@media screen and (max-width: $tablet) { @media screen and (max-width: $desktop) {
width: 89%; max-width: calc(100vw - 27px - 2rem - 1.5rem - 3rem); // 1.5rem is the padding of the tasks container, 3rem is the padding of .app-container
} }
.overdue { .overdue {
@ -57,6 +58,10 @@
} }
} }
.fancycheckbox span {
display: none;
}
.tag { .tag {
margin: 0 0.5em; margin: 0 0.5em;
} }
@ -109,6 +114,20 @@
} }
} }
.is-menu-enabled .tasks .task span:not(.tag) {
.tasktext, &.tasktext {
@media screen and (max-width: $desktop) {
max-width: calc(100vw - 27px - 2rem - 1.5rem - 3rem - #{$navbar-width}); // 1.5rem is the padding of the tasks container, 3rem is the padding of .app-container
}
// Duplicated rule to have it work properly in at least some browsers
// This should be fine as the ui doesn't work in rare edge cases to begin with
@media screen and (max-width: calc(#{$desktop} + #{$navbar-width})) {
max-width: calc(100vw - 27px - 2rem - 1.5rem - 3rem - #{$navbar-width}); // 1.5rem is the padding of the tasks container, 3rem is the padding of .app-container
}
}
}
.taskedit { .taskedit {
min-height: calc(100% - 1rem); min-height: calc(100% - 1rem);
margin-top: 1rem; margin-top: 1rem;

View File

@ -116,7 +116,7 @@
bottom: 0; bottom: 0;
top: $navbar-height; top: $navbar-height;
overflow-x: auto; overflow-x: auto;
width: 17vw; width: $navbar-width;
padding: 0 0 1em; padding: 0 0 1em;
left: -147vw; left: -147vw;

View File

@ -50,3 +50,4 @@ $user-dropdown-width-mobile: 4rem;
$hamburger-menu-icon-spacing: 1rem; $hamburger-menu-icon-spacing: 1rem;
$hamburger-menu-icon-width: 28px; $hamburger-menu-icon-width: 28px;
$navbar-height: 4rem; $navbar-height: 4rem;
$navbar-width: 17vw;