rien7 / obsidian-colorful-tag

Make your tag more beautiful and powerful!
Apache License 2.0
126 stars 3 forks source link

Plugin functionality issue #48

Open hlkbr opened 1 year ago

hlkbr commented 1 year ago

Dear Rien,

I completely dont know why, but all functions (background color, font size, etc) of your plugin are not working in my obsidian. I tried to choose another themes (incl default), switch off another plugins, just nothing happend. Could you kindly give me a hint why this may happen, it seemed that probably I missed something with the preferences, but I have no idea what to try next.

And at the same time I found the idea behind your plugin very useful, and Im really want to have it on my obsidian.

Many thanks in advance

rien7 commented 1 year ago

Use shift+ctrl+I to open console and check if there are any error.

And please show me the output using document.querySelectorAll("[colorful-tag-style]") in console after you add some style for tags.

hlkbr commented 1 year ago

There is no errors in the console.

I noticed that I have a problems only with global settings. If I add some style for particular tag - everything work.

I tried to put document.querySelectorAll("[colorful-tag-style]") to console, result - "NodeList". Is that what you asked? I attached part from html head, related to colorful tag style, may be some information from there may help to find a solution. I put global settings for text size - 30 px, and background color - red (255, 0, 0).

.small-input > .setting-item-control > input {
    width: 60px;
}
.small-button {
    padding-left: 8px;
    padding-right: 8px;
}
.vertical-tab-content {
    overflow-y: overlay;
}
.setting-item:first-child {
    padding-top: 0.75em;
}
.colorful-tag-setting-header > div > div > .setting-item {
    border-bottom: 1px solid var(--background-modifier-border);
}
.colorful-tag-collapse-indicator > svg {
    height: 10px;
    width: 10px;
    margin-right: 8px;
    transform: rotate(90deg);
}
.colorful-tag-collapse-indicator.is-collapsed > svg {
    transform: rotate(0deg);
}
.colorful-tag-setting-header.is-collapsed > .colorful-tag-setting-body {
    display: none;
}
.colorful-tag-popup {
    min-width: 250px;
    min-height: 50px;
    position: absolute;
    transition-property: opacity;
    transition-duration: 0.35s;
    animation-name: fadeIn;
    animation-duration: 0.3s;
}
.colorful-tag-popup.hidden {
    opacity: 0;
}
.colorful-tag-popup-pin {
    margin-left: auto;
}
.colorful-tag-popup-header {
    vertical-align: middle;
    line-height: 24px;
}
.colorful-tag-popup-pin > svg {
    vertical-align: middle;
}
.colorful-tag-popup-pin.pinned > svg {
    transform: rotate(45deg);
    fill: white;
}
.setting-item.colorful-tag-popup-item {
    padding-top: 5px;
    padding-bottom: 5px;
}
.colorful-tag-popup-body {
    background-color: var(--background-primary);
}
.colorful-tag-popup input[type="text"] {
    border: none;
}
.colorful-tag-popup input[type="text"]:focus {
    border: inherit;
}
.colorful-tag-popup-body .setting-item-control > textarea {
    border: none;
    resize: vertical;
}
.colorful-tag-popup-body .setting-item-control > textarea.readonly {
    resize: none;
}
.shadow-text-start {
    vertical-align: bottom;
    font-size: var(--font-smaller);
    color: var(--text-muted);
}
.shadow-text-end {
    vertical-align: bottom;
    font-size: var(--font-smaller);
    color: var(--text-muted);
}
.colorful-tag-handler > svg {
    vertical-align: middle;
}
rien7 commented 1 year ago

Global setting doesn't effect anything if you have no per tag setting.

Global setting just help you set the same properties in per tag setting.

For example:

// Global setting
color: red
border: none

then EVERY per tag will have these two properties by default.

hlkbr commented 1 year ago

Aha, so that means that if I want to make ALL tags in my vault with red background there is no easy way to do that with couple clicks, and I should add red color manually to every tag, correct?

rien7 commented 1 year ago

Yes, I will also consider adding this feature in the next release if you have the need for it

hlkbr commented 1 year ago

Wow, that would be awesome, thank you so much for what you are doing!

eggtoastie commented 1 year ago

I have hundreds of tags and would also find this feature useful! I just spent quite a bit of time turning off my plugins and changing to the default theme, as well as testing on a new vault, to figure out why my tags wouldn't change.