Skip to content
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

Allow more text colouring #27

Closed
qdgiang opened this issue Oct 31, 2022 · 6 comments
Closed

Allow more text colouring #27

qdgiang opened this issue Oct 31, 2022 · 6 comments

Comments

@qdgiang
Copy link

qdgiang commented Oct 31, 2022

Would be great if we are able to colour the bold, italic, quoted… text like Things theme combined with the Style settings plugin. Texts will be much clearer and also take advantage of the full colour palette.

@AnubisNekhet
Copy link
Member

@mbeckrich this should be doable but it'll need a dedicated decorations.scss file I think
Using catppuccin accents for decorations which can be selected independently means that we'll need to add individual selector classes for both bold and italic elements

@mbeckrich
Copy link
Collaborator

@qdgiang01 Will implement.

@AnubisNekhet Sounds good, going to get started on it rn but have appointments all afternoon so might not get done until tomorrow-ish.

@mbeckrich
Copy link
Collaborator

This is what I'm looking at right now for the full palette theme @AnubisNekhet. Open to any changes, put this on development for the time being. Will tackle the Style Settings/accent themes when I get home.

image

@AnubisNekhet
Copy link
Member

Sounds good 👍

@mbeckrich
Copy link
Collaborator

A first go at this has just been pushed to main. I'll leave this issue open for the time being in case anyone has feedback. Didn't have time tonight, but I will integrate the font color choices with Style Settings soon.

@mbeckrich
Copy link
Collaborator

mbeckrich commented Nov 2, 2022

As of 24020e3, people with the Style Settings plugin should be able to swap out the default theme's colors for headings, italics, bold, strikethrough, and blockquote with their preferred colors from the palette.

For anyone who wants to make their own modifications (e.g. change default colors themselves, mess with opacity, etc.), I thought I would be able to do something in Style Settings like:

id: ctp-bold
type: variable-select
default: var(--ctp-sapphire)
strong,
cm-strong {
--bold-color: rgb(var(--ctp-bold);
}

But this method only works once the user selects a color. The --ctp-sapphire variable doesn't seem to go anywhere until then and if you do pick the color and then hit the plugin's default button, the color resets to grey and not the default from the yaml. If this is common knowledge, my bad, but the type: class-select in Anubis's contribution works how I would have expected type: variable-select to work, so this threw me for a loop. Anyway, I found I needed to add a fallback variable as the real default (the user-selected color seems to persist through opening/closing the app and enabling/disabling the plugin, but not sure if that will always be the case):

/*_typography.scss*/
strong,
.cm-strong {
  --bold-color: rgb(var(--ctp-bold, var(--ctp-sapphire)));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants