Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Fix UI font families to accept multiple fonts #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qyurila
Copy link

@qyurila qyurila commented Sep 8, 2022

#30 found a bug and the underlying problem, but there had been no PR to fix this so I made one.

This PR makes UI font family config options to accept multiple fonts, by fixing the logic to wrap the value with "" only when it does not have a , (which implies the family of multiple fonts).

@knopp
Copy link
Collaborator

knopp commented Oct 7, 2022

Shouldn't individual families (if multiple) still be escaped?

@j-f1
Copy link
Contributor

j-f1 commented Oct 7, 2022

You generally don’t need quotes in font-family, even if the name has multiple words (per MDN and my experience). As long as the font name doesn’t have numbers or other special characters it will be fine to leave it unquoted, and in those cases it’s easy enough for the user to put the quotes in manually.

@qyurila
Copy link
Author

qyurila commented Oct 7, 2022

You generally don’t need quotes in font-family, even if the name has multiple words (per MDN and my experience).

Actually I didn't know that, I thought they should be quoted manually by user if there are multiple fonts given. Thanks for information!

Given that, would it be better if this if statement (and the below one) were removed?

@qyurila
Copy link
Author

qyurila commented Oct 11, 2022

Got ready to be merged!

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

Successfully merging this pull request may close these issues.

3 participants