diff options
author | Tim Krief <tim@timkrief.com> | 2020-07-21 15:32:50 +0300 |
---|---|---|
committer | Raimund Schlüßler <raimund.schluessler@mailbox.org> | 2020-07-23 21:22:28 +0300 |
commit | 2d6377bfe6f8a9408e7be2d81aad8a6c803e56eb (patch) | |
tree | b10afb90546c1bbaf8c74cb325ea19538721d7be /css | |
parent | d3d3555f5e87c7ae88446a6aa3df99361a36cf0e (diff) |
Fixed tasks with hidden subtasks styling
Added a subtasksHidden class when all class are hidden in a task-item and fixed the style for tasks with hidden subtasks.
Signed-off-by: Tim Krief <tim@timkrief.com>
Diffstat (limited to 'css')
-rw-r--r-- | css/src/style.scss | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/css/src/style.scss b/css/src/style.scss index f67bda9a..021ae757 100644 --- a/css/src/style.scss +++ b/css/src/style.scss @@ -437,18 +437,19 @@ $priority_colors: ($red_overdue, $red_overdue, $red_overdue, $red_overdue, $yell */ @mixin remove-last-squared-corners($sublevels-left: 8) { - &:empty { + &::before, + &>ol:empty::before { display: none !important; } @if $sublevels-left > 0 { - &>.task-item:last-child>.subtasks-container>ol { + &>ol>.task-item:last-child>.subtasks-container{ @include remove-last-squared-corners($sublevels-left - 1); } } } - .grouped-tasks>ol, - .sortable-ghost>.subtasks-container>ol { + .grouped-tasks, + .sortable-ghost>.subtasks-container { @include remove-last-squared-corners; } @@ -487,35 +488,30 @@ $priority_colors: ($red_overdue, $red_overdue, $red_overdue, $red_overdue, $yell } } - .subtasks-container>ol, - .subtasks-container>.add-task { - &:not(:empty) { + &.subtasksHidden>.subtasks-container { + margin-left: 44px; + } + &:not(.subtasksHidden)>.subtasks-container{ + &>ol:not(:empty), + &>.add-task + ol, + &>.add-task { margin-left: 44px; - - &>.task-item:first-child>.task-body{ - border-top-left-radius: 0; - } - } - - &::before { - content: ''; - display: block; - height: 1px; - border: 0 solid var(--color-main-background); - border-width: var(--border-radius) 0; - margin: calc(-1 * var(--border-radius)) 0; - background-color: var(--color-background-darker); - position: relative; - z-index: -1; } } - .subtasks-container>.add-task { - border-top: 1px solid var(--color-background-darker); - } - - .subtasks-container>.add-task + ol { - margin-left: 44px; + &.subtasksHidden>.subtasks-container::before, + &.subtasksHidden>.subtasks-container>.add-task::after, + &:not(.subtasksHidden)>.subtasks-container>.add-task::before, + &>.subtasks-container>ol::before { + content: ''; + display: block; + height: 1px; + border: 0 solid var(--color-main-background); + border-width: var(--border-radius) 0; + margin: calc(-1 * var(--border-radius)) 0; + background-color: var(--color-background-darker); + position: relative; + z-index: -1; } // Apply colors to checkboxes for each non-zero priority level |