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

Button/hidden text #122

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Button/hidden text #122

wants to merge 6 commits into from

Conversation

JefMari
Copy link
Contributor

@JefMari JefMari commented Oct 29, 2015

1

Resolves #52

@srph
Copy link
Contributor

srph commented Oct 29, 2015

Haha, let's wait for Lemon's approval

@srph
Copy link
Contributor

srph commented Nov 2, 2015

  • IMO, the 3 dots should be set through css content.
  • Vertically center the 3 dots
  • Also, I think it's better if we had a new button instead of a modifier because it's clearly not (.more-btn or something).

stressed out atm. also i have something to discuss in #52

@srph
Copy link
Contributor

srph commented Nov 2, 2015

Mind checking #126? Might be nice to have 'em for this feature.

@JefMari
Copy link
Contributor Author

JefMari commented Nov 2, 2015

Heads up!

Im having some difficulties in making the dots vertically centered because when i use 'vetical-align:middle', it doesnt behave the way i want. thus, i ended up using 'display:flex;' to make it vertically centered.

image

But i see that we dont want to use 'flexbox'. so if you have a suggestion which is better, ill give it a shot! 👍

Just like in #hidden-text-button of primer.css, i add a variant '.-inline' to make it appear inline since it 'display:block' by default. i also add 'top:-3px' when appear inline to make it more ok to view.

image

<section className="doc-bottom-space-large">
<h3 className="doc-heading">Hide text button</h3>
<p>Using <code>.more-btn</code>, it will hide text with an indication of a toggle button appearance. add <code>.-inline</code> to make it inline.</p>
<button className="more-btn"></button>
Copy link
Contributor

Choose a reason for hiding this comment

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

self close? <button />

@srph
Copy link
Contributor

srph commented Nov 2, 2015

Thanks.

  • To vertically center the text, make sure the height and line-height have the same values. This is a cheap trick to do the task.
  • It should be using display: inline-block so it works with text.
  • To align it with the sibling text, make sure the height is around the same as the font-size. Check label / badge.

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