question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Buttons in an inline button group doesn't align text correctly

See original GitHub issue

Which package is this issue related to?

ffe-buttons

Describe your issue (screenshots welcome!)

When wrapping buttons in an inline button group styled anchor tags doesn’t get vertically aligned text. The problem is only visible if some other button in the button group has text which is wrapped to two lines. image The first and the last buttons are actually anchor tags. See supplied HTML.

I don’t know if the same is true for other buttons than secondary, but I would assume it’s at least true for all ffe-buttons.

Note that this issue specifically applies to inline button groups. Non-inline groups works as intended.

What is the expected behavior?

Text should be aligned the same whether it’s an anchor or a button that’s styled…

What is the actual behavior?

…but it’s not 😛

Steps to reproduce

<div class="ffe-button-group ffe-button-group--inline">
    <a class="ffe-button ffe-button--secondary ffe-button--condensed" href="/some-url">
        <span class="ffe-button__label">Endre</span>
        <div aria-hidden="true" aria-label="Vennligst vent" class="ffe-button__spinner"></div>
    </a>
    <button class="ffe-button ffe-button--secondary ffe-button--condensed">
        <span class="ffe-button__label">Stopp</span>
        <div aria-hidden="true" aria-label="Vennligst vent" class="ffe-button__spinner"></div>
    </button>
    <button class="ffe-button ffe-button--secondary ffe-button--condensed">
        <span class="ffe-button__label">Slett</span>
        <div aria-hidden="true" aria-label="Vennligst vent" class="ffe-button__spinner"></div>
    </button>
    <a class="ffe-button ffe-button--secondary ffe-button--condensed" href="/some-other-url">
        <span class="ffe-button__label">Flytt til aksjesparekonto</span>
        <div aria-hidden="true" aria-label="Vennligst vent" class="ffe-button__spinner"></div>
    </a>
</div>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
selbekkcommented, May 3, 2018

Definitely a bug - but button text should not wrap!

0reactions
selbekkcommented, Jun 4, 2018

Aha! Sorry, I must have misread the overview page then. Carry on!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are the buttons not aligned? - html - Stack Overflow
The default vertical alignment of inline elements is "baseline," which means the baseline of the element will be the same as the baseline...
Read more >
Why are these buttons getting misaligned - HTML & CSS
I have 3 buttons. I would like them to display in a horizontal line, centered in the parent div. I cannot for the...
Read more >
Wrong vertical align in button links #30837 - twbs/bootstrap
I saw that the button links doesn't obey to vertical-align style. It keep being to top, not in the middle. Here is visible...
Read more >
Overriding Default Button Styles | CSS-Tricks
Another challenge is getting people to use them correctly ; /* Buttons styles start */ button · display ; inline-block · border ·...
Read more >
Your Guide to Bulletproof Email Buttons that Work - Litmus
Nothing is more frustrating than sending out an email with a broken button. Learn everything you need to know about bulletproof buttons in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found