akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.76k stars 2.11k forks source link

[FONT] Ensure text remains visible during webfont load #2100

Closed mmgil closed 2 years ago

mmgil commented 3 years ago

Guidelines for posting a new issue

In PageSpeed insights i receive the following message: Ensure text remains visible during webfont load.

How to FIX this situation?

Ricardo-Bonin commented 2 years ago

I have the same problem!! Captura de tela de 2021-11-29 14-38-01 !

Ricardo-Bonin commented 2 years ago

I add the font-display: swap in font-face of all slick-theme documents in node_modules and solved it by running in localhost

akiran commented 2 years ago

@mmgil @Ricardo-Bonin You can override the css from slick-carousel by adding custom CSS in your projects

react-slick doesn't maintain CSS. You have to get it from slick-carousel and customize it. So closing this issue

nitvirus commented 2 years ago

facing same issue, please advise a way forwad, if CSS is not maintained, please remove the font dependency

dharanchit commented 2 years ago

Anything on this? How do i resolve this?

Ricardo-Bonin commented 2 years ago

Do not. I tried everything and I couldn't solve it here!

dharanchit commented 2 years ago

@Ricardo-Bonin any way around this?

Ricardo-Bonin commented 2 years ago

The solution would be for them to add the font-display: swap; to @font-face straight in the default css! I made the suggestion but they didn't accept it!

mrdkzm commented 1 year ago

You should override to your slider button fonts with css.

.slick-next:before, .slick-prev:before{ font-family: (Your project font or anything what you want) !important; font-display: swap; }