Slick: Blue border on click in Chrome

Created on 22 Jul 2015  路  22Comments  路  Source: kenwheeler/slick

I'm getting blue outlines around each slide when clicking on a carousel in Chrome.

outlines

The fix is very easy:

.slick-list {
    outline: none;
}

Or possibly this, if there is risk of this getting overwritten:

.slick-list {
    outline: none !important;
}

I'm not familiar with the organization of this project, so I'll let someone more involved decide where to make this change (or whether it should be changed at all).

Most helpful comment

I obliterated this using:

.slick-slide, .slick-slide *{ outline: none !important; }

All 22 comments

:weary:

It's been noted/raised many times.
Thanks for contributing! :) -- hope it didn't cause you too much trouble.

On a current project I actually needed

.slick-slide {
outline: none !important;
}

to get rid of the blue border.

Seems like it is back. But this fixes it:

.slick-slide:focus { outline: none; }

I had links inside my slides, so this worked for me:

.slick-slide {
  &:focus, a {
    outline: none;
  }
}

(by the way this is LESS, not CSS so it looks slightly different)

Thanks @dhstack :)

I obliterated this using:

.slick-slide, .slick-slide *{ outline: none !important; }

Brilliant, thanks @Jtmichel I was pulling my hair out with this one.

@Jtmichel thanks I fixed.

thanks... it worked for me in another project ...

Easy: .slick-slider * { outline: none; }

please where should i put this code... .slick-slider * { outline: none; } .. ive go the same problem but not in carousel but after closing img lightbox. Blue border copy anchor and image .. i want get rid of that.

@Perezo123 can you send a URL or screenshot to example?

for example here ..
screenshot

The atomic solution is:

.slick-slide, .slick-slide *{ outline: none !important; }

...but if you can send me a URL to this I can take a closer look.

@Perezo123 I navigated to the page but I don't see a slider, just a list of lightboxed items. I tried to call slick in the console but it doesn't seem to think it's a function. Is this the same as what you're seeing?

screen shot 2017-10-25 at 6 29 04 pm

yes it is the same ... but like i said before i had this problem after closing img lightbox ... not with carousel :P i use here fancybox plugin but after closing image i had still that annoying blue outline all over "a" and "img"

.container a { outline: 0; } will do the trick.

thanks this works perfect :P

.slick-slide div { outline: none; }

I'm using angular 8 and ng-bootstrap 5.
You can apply this:

.carousel:focus {
outline: none;
}

Write this to your css file

.slick-slide div {
outline: none;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremymandel picture jeremymandel  路  3Comments

REPTILEHAUS picture REPTILEHAUS  路  3Comments

xitongzou picture xitongzou  路  3Comments

rahi-rajeev picture rahi-rajeev  路  3Comments

hoghamburg picture hoghamburg  路  3Comments