-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add Modern Font Stacks #498
Conversation
Run & review this pull request in StackBlitz Codeflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall the PR looks great! i've got a couple open questions to consider:
- are these fonts better as an optional import rather than being part of the default bundle?
- is the typography documentation section overwhelming now with all the typography example blocks? we could consider using the
<details>
element OR make a switcher that lets people choose a font prop from a dropdown, which updates an example or all the typography examples - how can we give @danklammer and Modern Font Stacks more cred for the values?
i'll pose it to the group in discord and see how folks feel about it
thanks for this, i'm excited about it 🙂
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? |
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. |
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! |
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? |
Alright, I think that's everything except if you want them split into a separate import. Do you want to keep |
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 I'll give this a review now 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! i made 1 little suggestion which i think i can just inject/accept and this is g2g. appreciate the work!
--font-sans: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif; | ||
--font-serif: ui-serif,serif; | ||
--font-mono: Dank Mono,Operator Mono,Inconsolata,Fira Mono,ui-monospace,SF Mono,Monaco,Droid Sans Mono,Source Code Pro,monospace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, 1 more comment, as changing these names means i need to make a breaking change release. alternatively, we could keep these same names or just keep the original props, that way it's a minor version bump and no one's apps break.
which is better?
- keep the previous props in additional to the new ones
- create vars that map the old names to the most relevant new ones
- keep the previous props and make the new ones an additional/optional import
i'll toss this into the discord too, see what folks think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think option 1 or 2 is best. I kinda prefer 2 but I appreciate the hesitation to have breaking changes so I'd not complain at either. In my opinion these are small enough that I don't think we need to hide them behind a flag, and I love the idea of having the prototyping power of these well thought out props easily available. Also most people who care about the css weight should probably be using jit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My vote is to map the old props to the new ones and remove them in the next major version. Maybe add a deprecation notice to the doc site?
I think we should consider the overall approach for introducing new props in the library:
|
When the added props are entirely new for the current release, they should be imported separately. I fully agree with this.
|
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding those props that map the old naming to the new one!
I've made 2 small change requests, and given those look good to you too, I think this PR will be ready to merge!
Co-authored-by: Adam Argyle <argyle@google.com>
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 |
I've made a new issue to hold this task, I'll try and make sure it's part of OPv2 👍🏻
Seems like a fair small note to add to the docs. Use a |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hazzah! thanks for all this and stickin it out!!
No problem! Thanks for your support and time! |
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!