Buttons in an inline button group doesn't align text correctly
See original GitHub issueWhich 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. 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-button
s.
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:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Definitely a bug - but button text should not wrap!
Aha! Sorry, I must have misread the overview page then. Carry on!