-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implement Core Typography #98589
Implement Core Typography #98589
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Thanks, @yashwin! Lgtm! |
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.
LGTM!
Creating a local copy of something that is only half-implemented in core can very easily lead to inconsistencies that will diverge more and more as time goes. Reading pfunGA-4Ch-p2 , I'm not sure I see a consensus from the folks who worked on the original core specs to go ahead with this approach (@jameskoster @jasmussen ). Let's make sure we're aligned before committing to this approach (also cc @Automattic/team-calypso ) |
e04d432
to
bb96cd5
Compare
Thank you for raising this point! You can see the thread: p1737113968596349-slack-C0896RP2P28. I have also asked for their review on this PR 🙂 |
Thank you for sharing the link — this conversation happening across p2, slack and GH was quite hard to follow and I had missed it initially. I also think we should make sure we have a strategy for how, in the future, we're going to converge and unify the local copy being added today, with the code sitting upstream. Are we even going to be able to import variables/mixins from Core? Are we going to get tokens via theming? Are we going to apply the typography via the Knowing the future strategy will also inform what's the best way to implement a local copy. |
Marco shares some good concerns, which I also share and have voiced on the thread. However ultimately I'll defer to Jay on what's the best practice. |
For me the important thing in the short term is to utilise a single set of tokens for typographical appearance, and avoid anything custom or hard-coded. The scss vars/mixins recently added to the system seem like the best candidate for us to rally around, with a view to holistically expanding/refining later as required. In terms of how we do it, Marco will know much better than me. |
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 also agree with @ciampo's concerns.
Duplicating core typography styles can lead to additional maintenance work and potential inconsistencies as the codebases diverge.
Have we considered a way to actually reuse them instead of duplicating them?
Also, we need to think about a plan on potential changes that might be necessary in the future. Specifically, we might need to push changes upstream at some point, so it only makes sense to stay as close to core as possible and reuse everything.
Thanks for the review, @tyxla!
Could you please elaborate on what you mean by "reuse" here? FWIW, we are using the core mixins and variables here Edit: We are exploring if there is a way to import directly from wp-base-styles |
Yes, something like that is what I'd prefer. Even if they're the same as core, redeclaring them essentially duplicates them and incurs additional maintenance costs. |
Thanks everyone for the feedback! We can reuse the mixins from Core. Read more: pfunGA-4Ch-p2#comment-7828 So, I'm closing this PR as we will create a new PR. |
Proposed Changes
This PR creates heading and body text mixins on Calypso that match with Core Typography.
Edit
We are using the core mixins and variables here
Why are these changes being made?
To align the user experience more closely with Core, we are implementing Core typography within Calypso. This would allow A4A and Dotcom to adopt consistent typography moving forward.
Testing Instructions
Pre-merge Checklist