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

Marketing: Enable body content utilities to have their font-weight overwritten #1392

Merged
merged 2 commits into from
May 11, 2021

Conversation

tobiasahlin
Copy link
Contributor

This PR removes !important from the font-weight declarations for .f0-mktg - .f6-mktg, so that they can be overridden with e.g. .text-bold.

Since the marketing typography is included after the primer core utility classes, adding !important when setting a property in the marketing bundle will make it impossible to override that value with a primer core utility class. In some instances this is acceptable, or possibly even a feature (to enforce consistency), but it's at least clear that for body content we need to be able to change the font-weight.

@changeset-bot
Copy link

changeset-bot bot commented May 11, 2021

🦋 Changeset detected

Latest commit: 0fea11a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Patch

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

Copy link
Contributor

@simurai simurai left a comment

Choose a reason for hiding this comment

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

As a general rule, all utilities use !important and should only style a single CSS property. So these marketing typography "utilities" feel more like being "components" that can be overridden with the text-bold utility.

Maybe in the future we could move them into the "Components" category? Call it "Marketing typography" or similar.

@simurai simurai merged commit 9ef606d into main May 11, 2021
@simurai simurai deleted the tobiasahlin/patch-fX-mktg-specificity branch May 11, 2021 23:49
@primer-css primer-css mentioned this pull request May 11, 2021
@tobiasahlin
Copy link
Contributor Author

@simurai I think that makes sense 🙏 I'll open a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants