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

Add common marketing utilities to primer/marketing #1254

Merged
merged 12 commits into from
Mar 26, 2021

Conversation

tobiasahlin
Copy link
Contributor

@tobiasahlin tobiasahlin commented Mar 24, 2021

This PR adds a few common utilities to primer/marketing:

  • The negative margin spacing scale is extended to also generate scale steps 7-12 for top and bottom margins (mt-n7, mb-8, etc), rather than stopping at 6
  • hover-grow-mktg animation utility class, as well as an easing variable ($ease-mktg)
  • margin auto class (m-auto), for centering elements with position: absolute, and mt-auto for sticking things to the bottom for flex columns within a flex row or a fixed height element
  • z-index utility classes (z-1, z-2, z-3, z-n1, z-n2)
  • width-auto and height-auto, for resetting width/height of an image, after its width and height have been set in HTML
  • object-fit-cover for making an object cover its container https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

/cc @primer/ds-core

@vercel
Copy link

vercel bot commented Mar 24, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-css/BR1qBNY76uRMa6ipyZvK1751wNFq
✅ Preview: https://primer-css-git-tobiasahlin-add-common-utilities-primer.vercel.app

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.

We're just about to release 16.0.0. Maybe tomorrow. So let's schedule this for 16.1.0.

Changes look good. Some of these might be handy as non-marketing utilities.. like the z-index and auto margin. I think we wanted to add them for a while already.

Base automatically changed from master to main March 26, 2021 00:50
@changeset-bot
Copy link

changeset-bot bot commented Mar 26, 2021

🦋 Changeset detected

Latest commit: 5d2f0be

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 Minor

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

@vercel vercel bot temporarily deployed to Preview March 26, 2021 01:40 Inactive
@tobiasahlin
Copy link
Contributor Author

So let's schedule this for 16.1.0

That sounds great ✨

Some of these might be handy as non-marketing utilities.. like the z-index and auto margin. I think we wanted to add them for a while already.

Happy to move them out from the marketing bundle if that's the case 🙏

@vercel vercel bot temporarily deployed to Preview March 26, 2021 15:57 Inactive
@jonrohan jonrohan merged commit a80b892 into main Mar 26, 2021
@jonrohan jonrohan deleted the tobiasahlin/add-common-utilities branch March 26, 2021 16:07
@github-actions github-actions bot mentioned this pull request Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants