guopenghui / obsidian-quiet-outline

Improving experience of outline in Obsidian
MIT License
295 stars 17 forks source link

Remove color from reset button #49

Closed huyz closed 1 year ago

huyz commented 2 years ago

I don't really see a reason for the reset button to be colored green and call attention so much. It clashes with the rest of Obsidian. Can it be changed to monochrome?

doomgutt commented 2 years ago

Seconded. I tried to find a way to change the button's color in the styles.css file but it wasn't there.

I appreciate that it's a stylish choice of colour in the context of a neon theme, but I'm using a much more subdued colour scheme and the button is basically the brightest thing on my screen.

Thanks, aside from the loud colours it's a great plugin.

doomgutt commented 2 years ago

Okay, here's a very hacky solution. Go to the folder of your vault, then to .obsidian/plugins/obsidian-quiet-outline (you might need to make hidden folders visible to see the .obsidian folder) and add the following code to the top of the styles.css file.

.quiet-outline {
  --colour-bg: hsla(240, 3%, 6%, 1);
  --colour_1: rgb(71, 124, 115);
  --colour_2: rgb(87, 151, 148);
  --colour_3: rgb(49, 80, 78);
}

.quiet-outline .n-button{
  --n-color: var(--colour_1) !important;
  --n-color-hover: var(--colour_2) !important;
  --n-color-pressed: var(--colour_3) !important;
  --n-color-focus: var(--colour_2) !important;
  --n-color-disabled: var(--colour_1) !important;
  --n-ripple-color: var(--colour_1) !important;
  --n-text-color: var(--colour-bg) !important;
  --n-text-color-hover: var(--colour-bg) !important;
  --n-text-color-pressed: var(--colour-bg) !important;
  --n-text-color-focus: var(--colour-bg) !important;
  --n-text-color-disabled: var(--colour-bg) !important;
  --n-border: 1px solid var(--colour_1) !important;
  --n-border-hover: 1px solid var(--colour_2) !important;
  --n-border-pressed: 1px solid var(--colour_3) !important;
  --n-border-focus: 1px solid var(--colour_2) !important;
  --n-border-disabled: 1px solid var(--colour_1) !important;
}

If you want to change the hover colours, you will also need to make this change (just replace background-color with any of the variables from above as I have done here):

.quiet-outline .n-tree.n-tree--block-line .n-tree-node:not(.n-tree-node--disabled):hover {
  /* background-color: #41b883; */
  background-color: var(--colour-bg);
}

Cheers, I hope the creator will give us some colour options in the future.

guopenghui commented 1 year ago

In next version, I'll try to remove color from that button and make it follow the default setting. But color of other parts like border of button or text area cannot be changed due to naive-ui library, which uses preset js code to control the style rather than css file. Thus it's hard to control styles in this plugin.

guopenghui commented 1 year ago

0.3.14 supported some color settings, hope this will offer some help.