-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected Status Type of the Sub Tasks in CSS #3219
Comments
Thanks for logging this. I will have to experiment with this, but I think the behaviour is doing what the CSS says - and in fact the CSS will likely need to be updated for support of nested tasks. |
As far as I can see from testing, the nested tasks inherit the styles of the outer tasks. The only workaround I can find is to add specific styles for the completed tasks, which will be used in preference to the outer styles... This seems to work with your example: .task-list-item[data-task-status-type="TODO"] .task-due[data-task-due="today"] span,
.task-list-item[data-task-status-type="IN_PROGRESS"] .task-due[data-task-due="today"] span {
background: #556B2F;
border-radius: 10px;
margin: 0px 5px;
padding: 2px 8px 2px 0px;
}
.task-list-item[data-task-status-type="DONE"] .task-due[data-task-due="today"] span,
.task-list-item[data-task-status-type="CANCELLED"] .task-due[data-task-due="today"] span {
background: unset;
border-radius: unset;
margin: unset;
padding: unset;
} |
Hi again @esm7 ... I would greatly welcome any suggestions on the above, if you have time, please.... |
Thanks! It works on my machine! This is a nice temporary fix with my example. |
The problem is that the space operator between
@claremacrae funny how only two days ago I thought that using the direct ancestor operator is very niche. I was not considering the case of nested tasks! |
Oh! I see, thanks a lot! One more thing, I hope you guys could update this tutorial about styling. This will help the others who want to do similar things like me. |
Thanks @esm7 - I had tried adding Yes, of course I will update the documentation - however I expect other examples will also need updating, not just this one. So it will need a chunk of free time to do all the experimenting and editing. |
Perhaps the best approach would be to keep the examples as they are, just add a note about the effect on nested tasks, with an example how to mitigate that.
|
Thanks for the suggestion. I’ll think about it. I think the examples that style particular fields may merit having the span added to avoid them misleadingly highlighting other values. Will see what I can do. |
Please check that this issue hasn't been reported before.
Steps to reproduce
CSS snippets learned from styling guide
Write mark down like this
Today is 2024-12-04
Well I think that none of them should be changed. If the sub tasks are done, they are done.
Expected Behavior
The
Test1
task should be highlight by the way, I just don't know how to make it.Current behaviour
Which Operating Systems are you using?
Obsidian Version
1.77
Tasks Plugin Version
7.14.0
Checks
Possible solution
Just a logical thing, not hard to fix. Thanks a lot!
The text was updated successfully, but these errors were encountered: