Link: Focus border doesn't wrap properly for links that span multiple lines
Bug Report
- Package version(s): (0.78.2~latest)
- Browser and OS versions: (Chrome, IE 10+, Edge, FF)
Describe the issue:
The focus border of the link can't wrap all text of the link if the text of the Link displays more than 1 line.
Actual behavior:
The focus border wraps part of the link text.

Expected behavior:
The focus border wraps all the link text.
If applicable, please provide a codepen repro:
http://codepen.io/luhu/pen/JbaOBL
- Inside the preview, press 'tab' to focus the link.
- See the focus border wraps part of the link text.
The focus-border() mixin uses absolute positioning for the border. The problem is that links are display: inline by default, so the positioning doesn't work.
It works if the link is display: inline-block: http://codepen.io/mikewheaton/pen/xRajRy
However, using the mixin to change the display value is likely to result in some layout issues, and it would require JS to make sure we only change elements that are display: inline. To leave the layout intact we may need to measure inline elements and set the width of the focus border.
inline multiple link unexpected behavior
I also realized there may be some case that we just want to show an inline link, and would like to add some additional information here:
- Actual behavior:
the focus border warps part of the link text:

- Expected behavior:
This is the default behavior of
<a>
Very good point. I think the best solution here is to not use the focus-border() mixin for the Link component. Instead, we can use the standard outline property to get this result:
@mikewheaton do you have a PR for this?
@dzearing I've assigned this to myself, should have a PR in tomorrow. 😊
Sounds good, thanks!