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

fix(button): set default button heights #1719

Merged

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Feb 1, 2019

Closes #1691

This PR sets default button heights to avoid collapsing when button content is not rendered

@netlify
Copy link

netlify bot commented Feb 1, 2019

Deploy preview for the-carbon-components ready!

Built with commit 78d8dbf

https://deploy-preview-1719--the-carbon-components.netlify.com

@@ -81,7 +81,7 @@
flex-shrink: 0;
font-size: $button-font-size;
font-weight: $button-font-weight;
height: auto;
height: rem(48px);
Copy link
Contributor

@jendowns jendowns Feb 1, 2019

Choose a reason for hiding this comment

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

@@ -305,7 +305,7 @@

.#{$prefix}--btn--sm {
@include letter-spacing;
height: auto;
height: rem(32px);
Copy link
Contributor

@jendowns jendowns Feb 1, 2019

Choose a reason for hiding this comment

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

Just pointing out that this is a bit different than how height is applied to small buttons in the non-experimental theme:
https://github.com/IBM/carbon-components/blob/98bae993a38f43dc45e6a23b5302f882926a0ab1/src/components/button/_button.scss#L163

Copy link
Member Author

Choose a reason for hiding this comment

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

the output is identical (2rem) as our base font size is 16px, unless I am mistaken. Please correct me if that's not the case

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, it's the same. Just pointing it out for consistency 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I figured I would use the rem conversion function to be consistent with the rest of the experimental styles

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

Thank you for jumping in @emyarod! One question - I thought the original issue pointed out a wrong token of $button-height in experimental mode. Did you find otherwise?

@emyarod
Copy link
Member Author

emyarod commented Feb 1, 2019

you're right @asudoh I overlooked that var and hardcoded its value instead. Should be fixed now

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 - Thanks @emyarod!

@carbon-bot
Copy link
Contributor

🎉 This PR is included in version 9.70.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@emyarod emyarod deleted the 1691-set-default-button-height branch February 7, 2019 20:37
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.

6 participants