mgmeyers / obsidian-kanban

Create markdown-backed Kanban boards in Obsidian.
https://publish.obsidian.md/kanban/
GNU General Public License v3.0
3.22k stars 189 forks source link

[Feature]: Colour kanban cards based on tag used #651

Open ryadaj opened 2 years ago

ryadaj commented 2 years ago

Many moons ago, @sailKite hooked me up with a snippet to colour kanban cards based on tags used. It'd be cool if this feature were embedded into the plug-in using a friendly interface such as that which you recently launched with your tag colours update. Some pics follow and here is a link to the conversation in Discord

This would be a wonderful feature to incorporate for those who are more visually oriented. It has accessibility benefits for those who need them, but for those who may view this as a "nice-to-have" it could really facilitate improved productivity and organization, i.e., a certain colour assigned to a certain urgency level for project management OR certain colours assigned to certain characters for story-boarding.

Edit: I also think that this could be used as a temporary alternative to horizontal swim-lanes until that feature is added, since cards for project X could be visually separated from those of project Y, for example.

/* --- Kanban With Background Color Based On Tag --- */
/* use this to style the card background and text */
.has-tag-someTag,
.has-tag-someTag .kanban-plugin__item-title-wrapper {
    background-color: red !important;
    color: black;
}

/* use this to style the tag bubble at the bottom of the card */
a[href="#someTag"].kanban-plugin__item-tag {
    background-color: yellow;
    color: green !important;
    font-weight: bold;
}
Screen_Shot_2022-05-12_at_21 38 37 Screen_Shot_2022-05-12_at_21 38 30
ElphaTech commented 1 year ago

Hope this gets added!

Mahkloompah commented 1 year ago

That would be super helpful. Currently I have a Kanban board for content creation and it would be nice to color code according to #video or #blog cards. Of course it can be helpful for other stuff too to get an easier overview.

dequi commented 11 months ago

How would you handle more then one tag tough? Lets say you have colors for project tags and for urgency tags...what would be the card color? A separate card property would work better.