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

Refresh polish ✨ #1041

Merged
merged 26 commits into from
Mar 3, 2020
Merged

Refresh polish ✨ #1041

merged 26 commits into from
Mar 3, 2020

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Feb 28, 2020

This PR adds a bit more ✨ polish to the refreshed components. Like..

  • Add disabled state to .form-control
  • Add inner box-shadow to .form-control
  • Add different avatar sizes
  • Polish buttons (mostly refactoring + transitions)
  • Polish labels (Label and IssueLabel are now the same) Stickersheet
  • Adjust sizes (e.g. 34px 👉 32px) Size stickersheet
  • Some more refactoring and cleanup

API changes

  • New $size scale
  • New .avatar-[1-8] sizes.
  • New .Label--large modifier
  • New .Label--inline modifier. This can be used in places where adding a label shouldn't increase the height of the container element or line-height, for example inside a <p> element.
  • New $box-shadow-inset variable. Used for the inner shadow of inputs
  • Rename $focus-shadow 👉 $box-shadow-focus

/cc @primer/ds-core

@simurai simurai added this to 🚧 Work in Progress in 📦 Primer CSS release tracking via automation Feb 28, 2020
@vercel
Copy link

vercel bot commented Feb 28, 2020

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

🔍 Inspect: https://zeit.co/primer/primer-css/jiw1axj9m
✅ Preview: https://primer-css-git-next-polish.primer.now.sh

@vercel vercel bot temporarily deployed to Preview February 28, 2020 12:36 Inactive
@simurai
Copy link
Contributor Author

simurai commented Feb 28, 2020

The pressed state is still a bit hard to see. So now the background is also a bit darker:

With darker border With darker background
buttons buttons-after

Also added a subtle transition when moving with the mouse away from a button. 👉 Preview

@vercel vercel bot temporarily deployed to Preview February 28, 2020 15:03 Inactive
@vercel vercel bot temporarily deployed to Preview February 28, 2020 15:20 Inactive
@vercel vercel bot temporarily deployed to Preview March 2, 2020 08:08 Inactive
@simurai
Copy link
Contributor Author

simurai commented Mar 2, 2020

Played around with the different heights and added a new size scale to make sure all the heights match.

$size-0:    0;
$size-1: 16px;
$size-2: 20px;
$size-3: 24px;
$size-4: 28px;
$size-5: 32px;
$size-6: 40px;
$size-7: 48px;
$size-8: 64px;

Screen Shot 2020-03-02 at 5 17 21 PM

👀 Preview

The current approach uses 0 top/bottom padding, but instead a large line-height to set the exact height of the component. This also allows child components to be added, like .Counter without increasing the height of the parent component. It seems fine as long as there is no text that needs to wrap onto multiple lines. 🤷‍♂

An alternative would be to add some padding back and use min-height. But I haven't tested if that causes weird vertical alignments when adding child components. 🤔

@vercel vercel bot temporarily deployed to Preview March 2, 2020 08:26 Inactive
@simurai simurai marked this pull request as ready for review March 2, 2020 08:55
@simurai simurai moved this from 🚧 Work in Progress to 🔍 Ready to release in 📦 Primer CSS release tracking Mar 2, 2020
@simurai
Copy link
Contributor Author

simurai commented Mar 2, 2020

If someone wants to review this PR, I got carried away a bit and there are quite a lot of changes that move things around. 😇 But there should be no breaking change to dotcom.

@vercel vercel bot temporarily deployed to Preview March 2, 2020 09:14 Inactive
Copy link
Contributor

@auareyou auareyou left a comment

Choose a reason for hiding this comment

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

Looks fantastic!

📦 Primer CSS release tracking automation moved this from 🔍 Ready to release to ✅ Approved for release Mar 2, 2020
@vercel vercel bot temporarily deployed to Preview March 2, 2020 13:02 Inactive
@vercel vercel bot temporarily deployed to Preview March 2, 2020 14:36 Inactive
@vercel vercel bot temporarily deployed to Preview March 3, 2020 02:47 Inactive
@simurai simurai merged commit 736361f into next Mar 3, 2020
📦 Primer CSS release tracking automation moved this from ✅ Approved for release to 💜 Done Mar 3, 2020
@simurai simurai deleted the next-polish branch March 3, 2020 03:12
@simurai simurai mentioned this pull request Jul 2, 2020
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants