Spectre: Remove outline of clicked and focused `button` and `a`

Created on 28 Feb 2018  路  2Comments  路  Source: picturepan2/spectre

Whenever I click something I get a "light-red" box around that element (mostly a and button).

Screenshots:
image

I have tried putting this into my scss file, but it does not work:

*:visited {outline:none !important}
*:link {outline:none !important}
*:focus {outline:none !important}
*:disabled {outline:none !important}
*:hover {outline:none !important}
*:active {outline:none !important}
button {
    &:visited, &:link,  &:focus, &:disabled, &:hover, &:active {
           outline:none !important
    }
}
a {
    &:visited, &:link,  &:focus, &:disabled, &:hover, &:active {
            outline:none !important
    }
}

Most helpful comment

That's because the border is actually a box-shadow; a box-shadow: unset in your custom stylesheet should remove the "border" (I only tried it with Firefox's Developer Tools).

All 2 comments

That's because the border is actually a box-shadow; a box-shadow: unset in your custom stylesheet should remove the "border" (I only tried it with Firefox's Developer Tools).

thanks for your quick response, writing it this way did work:

button {
        box-shadow: unset;
    &:visited, &:link,  &:focus, &:disabled, &:hover, &:active {
                box-shadow: unset;
    }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomcam picture tomcam  路  3Comments

tomcam picture tomcam  路  4Comments

kwstaskara picture kwstaskara  路  3Comments

alighasemzadeh picture alighasemzadeh  路  3Comments

picturepan2 picture picturepan2  路  3Comments