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

Refactor CSS.FontFamilyName.t: Add Union Types for Unquoted Generic Families #544

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mikaeljan
Copy link

This PR updates the type definition for CSS.Types.FontFamilyName.t to allow using unquoted generic font family names directly in the code. Currently, only a string is accepted, forcing generic names like "monospace" to be quoted, which isn’t ideal for specifying static defaults.

Copy link

vercel bot commented Mar 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
styled-ppx ⬜️ Ignored (Inspect) Visit Preview Mar 7, 2025 2:49pm

Copy link
Owner

@davesnx davesnx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for doing this

| `Emoji => [%expr `emoji]
| `Math => [%expr `math]
| `Fangsong => [%expr `fangsong]
| `_apple_system => [%expr `custom("-apple-system")];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apple-system isn't custom isn't it?

I believe is the old system-ui, but it shouldn't have the quotes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, I thought it was a font-name

| `emoji
| `math
| `fangsong
| `custom of string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you thought about another name rather than "custom"?
quoted or string comes to mind and feels cleaner. This is rather a nitpick

Copy link
Author

@mikaeljan mikaeljan Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

named or specific came to mind but will stick to quoted - 6058cc5

@mikaeljan mikaeljan requested a review from davesnx March 7, 2025 10:59
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

Successfully merging this pull request may close these issues.

2 participants