-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add font-weight-medium to marketing styles, and use it in the type scale #1497
Conversation
🦋 Changeset detectedLatest commit: 99828a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…thub.com/primer/css into tobiasahlin/add-medium-to-mktg-typescale
@trosage @tobiasahlin -- I'm just comparing these across figma. There are a few discrepancies so i want to make sure I'm up to speed on any other changes we may have made prior to this convo beforehand. |
@ajashams All of the numbers in this implementation are just semantic and are used to map a certain number/weight to a font file 🙏 so the numbers differ from Figma but none of the actual used font weights in the type scale should differ in the end! |
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.
Should the class and variables names be pre/suffixed with mktg
?
So that it's clearer that this is only available in marketing and not in core?
@simurai I've been battling with this choice internally 😅 adding For what it's worth, these utilities also don't use .width-auto {}
.height-auto {}
// Make an object fill its parent
.object-fit-cover {}
// Handling z-index
.z-1 {}
.z-2 {}
.z-3 {}
// Negative z-index
.z-n1 {}
.z-n2 {} |
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.
when we have two flavors of a similar component
more akin to when we extended
Ahh, I see. Using mktg
is more for something unique or an alternative. But feels weird when just extending core stuff. Ok, yeah.. that sounds reasonable to me. 👍
Bumped the |
The
medium
weight of a font usually maps to500
, but this weight is taken in Primer bysemibold
. In order to add the ability to usemedium
weights on marketing pages, this PR addsmedium
at weight450
andextrabold
at800
, and adds a.text-medium
utility to use this font-weight. It also changes the marketing type scale to usemedium
rather thansemibold
for allfX-mktg
utilities.This produces the full weight scale as follows: