open-props icon indicating copy to clipboard operation
open-props copied to clipboard

Add Modern Font Stacks

Open Jothsa opened this issue 1 year ago • 4 comments

Let me know if there's anything else I need to do. I think it might be nice to have an explanation of the benefits of using these props over an external font, but I'm not sure where it would fit. Thanks!

Jothsa avatar May 01 '24 14:05 Jothsa

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Look at all that tucked into nice little props 👍🏻
I do wonder if we need to break these modern font stacks into their own import?

Screenshot 2024-05-02 at 2 31 26 PM

Screenshot 2024-05-02 at 2 32 01 PM Screenshot 2024-05-02 at 2 32 08 PM

wonder if we should put ^ these behind a summary details so they don't take up so much space? was cool when there were a few, but now there's a lot.

argyleink avatar May 02 '24 21:05 argyleink

Good point about giving them more credit. I think it would also be nice to have some information explaining why people would want to use these over an external font. Maybe that explanation and better credit could be in a paragraph after the "Font Families" heading?

Jothsa avatar May 03 '24 00:05 Jothsa

I've got finals this week and next week so I won't be able to do much here until after that

Jothsa avatar May 08 '24 13:05 Jothsa

I've got finals this week and next week so I won't be able to do much here until after that

hope finals went well! let us know if you need help closing this out. it's a sweet addition.

argyleink avatar Jun 04 '24 01:06 argyleink

They did (still waiting for some results though 😶)! Thanks! So sorry for the delay— life’s been coming at me and my ADHD has had me hyperfixating on another project (built with open-props) lol. I’ll get back to this pr soon!

Jothsa avatar Jun 04 '24 01:06 Jothsa

I think these fonts would work best as a separate import. However, I think that the font-weights, sizes, etc should remain in the default bundle. Do you think it would be confusing to have the font-families separate from the other font props? Should the font family props be in a separate import, should all the font related props be in a separate import, or should they remain in the main bundle?

Jothsa avatar Jun 05 '24 17:06 Jothsa

Alright, I think that's everything except if you want them split into a separate import. Do you want to keep --font-system-ui? It's from modern font stacks, but I think it's unnecessary. It is set to system-ui, sans-serif

Jothsa avatar Jun 05 '24 18:06 Jothsa

Alright, I think that's everything except if you want them split into a separate import. Do you want to keep --font-system-ui? It's from modern font stacks, but I think it's unnecessary. It is set to system-ui, sans-serif

rad ty! i'm just returning from conferencing and ready to review this. I do think it's a good idea to include that prop as it's often missed by folks and ChromeOS for example doesn't yet support system-ui while it does sans-serif. healthy fallback habit. Thanks for asking!

I'll give this a review now 👍🏻

argyleink avatar Jun 10 '24 21:06 argyleink

I think we should consider the overall approach for introducing new props in the library:

  • Should we add them to the main import, as we did with Static Sizes and Drawn Borders? (While they are great, I'm still not convinced they should be in the main bundle.)
  • Or should we keep everything as separate imports from now on?

mobalti avatar Jun 12 '24 09:06 mobalti

I think we should consider the overall approach for introducing new props in the library:

  • Should we add them to the main import, as we did with Static Sizes and Drawn Borders? (While they are great, I'm still not convinced they should be in the main bundle.)
  • Or should we keep everything as separate imports from now on?

When the added props are entirely new for the current release, they should be imported separately. I fully agree with this. However, as those in this PR are touching existing stuff, it must be in the main. Otherwise, it would be breaking. And then, as proposed, fix this in the next version. I suggest proceeding with the current plan. For completeness, that is:

  • map the old props to the new
  • add all into the main import
  • add deprecation notice in docs (as needed?)
  • move everything into its self-contained import in the next version.

SanderElias avatar Jun 19 '24 05:06 SanderElias

I've added the old values and mapped them to the new ones. Will postcss-jit-props be able to handle that correctly? Do you think a deprecation notice is needed?

Jothsa avatar Jun 19 '24 14:06 Jothsa

The variables should be good to go. I have 2 quick questions. Do you think we need a deprecation notice for the old values? Do you think we should note that --monospace-code is different in open-props than in modern font stacks? I think it's ok to quietly remove the old font values. I also think it's ok to not add the note, but thought I'd run it by you. Thanks for all the help!

Jothsa avatar Jul 02 '24 16:07 Jothsa

Do you think we need a deprecation notice for the old values?

I've made a new issue to hold this task, I'll try and make sure it's part of OPv2 👍🏻


Do you think we should note that --monospace-code is different in open-props than in modern font stacks?

Seems like a fair small note to add to the docs. Use a blockquote like this? Screenshot 2024-07-02 at 9 30 58 AM

argyleink avatar Jul 02 '24 16:07 argyleink

Done

Jothsa avatar Jul 02 '24 16:07 Jothsa

No problem! Thanks for your support and time!

Jothsa avatar Jul 02 '24 16:07 Jothsa