Bootstrap: active btn-link does not look like a link

Created on 18 May 2017  路  6Comments  路  Source: twbs/bootstrap

Hello,

if you click on a Element with the class "btn btn-link" the btn gets an button border when active.

button-border

Perhaps here should be something to prevent this (and stick to the description):
<!-- Deemphasize a button by making it look like a link while maintaining button behavior -->

css v4

Most helpful comment

@cr101, it's obvious. Goto https://v4-alpha.getbootstrap.com/components/buttons/#examples and click on "Link" button.

All 6 comments

@bembelimen Bug reports must include a live demo of the problem. Per the contributing guidelines, please create a reduced test case via JS Bin or CodePen and report back with your link, Bootstrap version, and specific browser and OS details.

@cr101, it's obvious. Goto https://v4-alpha.getbootstrap.com/components/buttons/#examples and click on "Link" button.

you can fix it, by removing the "btn" class, but so you have the default user agent border width

Small update, Can't reproduce on Safari, but issue is present on Chrome.
EDIT: I think this has to do more with how Chrome treats buttons rather than bootstrap itself.

I do see a style being applied to it on

.btn.focus, .btn:focus {
    outline: 0;
    -webkit-box-shadow: 0 0 0 2px rgba(2,117,216,.25);
    box-shadow: 0 0 0 2px rgba(2,117,216,.25);
}

And similarly on the other types of buttons

.btn-danger:focus {
    -webkit-box-shadow: 0 0 0 2px rgba(217,83,79,.5);
    box-shadow: 0 0 0 2px rgba(217,83,79,.5);
}

So I don't know if that's necessarily a chrome thing.

When looking at it in Safari, clicking it does not look like it triggers the :focus state. You can inspect it and manually trigger it through the styles inspector, and you see similar behavior with the blue outline.

Fixed. Good catch.

Was this page helpful?
0 / 5 - 0 ratings