damiankorcz / Prism-Theme

A Comprehensive, Highly-Customisable and Elegant Light/Dark Theme for Obsidian.md
https://www.buymeacoffee.com/DamianKorcz
MIT License
376 stars 13 forks source link

Link hover uses accent color #95

Closed ShahriarKh closed 1 year ago

ShahriarKh commented 1 year ago

Hovered link color should follow the selected color for the links, not the accent color.

To Reproduce

  1. Select a color for internal/external links, like orange
  2. Select an accent color, like green
  3. Hover over a link. The link should become dark orange (a darker version of link color) but becomes green (accent color) instead.
damiankorcz commented 1 year ago

Hi @ShahriarKh, This should now be resolved in 3.0.4. Also, refer to the Important message in the changelog in case it applies to you. https://github.com/damiankorcz/Prism-Theme/releases/tag/3.0.4

ShahriarKh commented 1 year ago

Hi @damiankorcz Yes, this is fixed. Thanks! By the way, I noticed that the color naming system has changed. I have a custom snippet to overwrite the current colors, and after updating it stopped working. I replaced the variables and it's ok now, but it seems that the previous colors --red100, --green500 are no longer used in the code (and can be deleted? 🤔). Also, why there are two types of variables in the code? I think it's better to have:

--color-text-something: hsl(some hsl);

instead of

--color-text-something-hsl: some hsl;
--color-text-something: hsl(--color-text-something-hsl);
damiankorcz commented 1 year ago

Hi @ShahriarKh, Yes! I've changed the initial colour format to use comma separated HSL values because that gives me the ability to create HSL or HSLA variants of the same colour. Something you can't do if the colour is already in hsl(). This change was necessary because when I provide preset colour options in Style Settings, each option can only pass one variable.

Passing comma separated HSL values lets me, for example, get the HSL colour for an Internal Link and at the same time make a HSLA value which reduces the alpha of the same colour for the hover state.

So, if you have used the previous format found in colour scheme files for your variables, the naming changed to the following: --red100 -> --color-red-base-hsl for HSL comma separated values OR --color-red-base for a HSL variable --red200 -> --color-red-tint-hsl for HSL comma separated values OR --color-red-tint for a HSL variable --red300 -> --color-red-text-hsl for HSL comma separated values OR --color-red-text for a HSL variable

(Applicable for all colours. Just replace red in each variable for the colour you want)

damiankorcz commented 1 year ago

Also, when using hsl-values option in Style Settings for custom colours they are provided as comma separated values in one variable. So, this was also done for consistency's sake and saves me from adding additional code for every single case this happens.

ShahriarKh commented 1 year ago

Great. Now I understand the reason behind it!