FRONTEND_1 Telegram 4044
🚀 Быстрое улучшение Lighthouse: content-visibility

Хотите ускорить рендер длинных страниц без костылей? Используйте CSS-свойство:


.card {
content-visibility: auto;
}


Что делает:

- Браузер не рендерит невидимые элементы (за пределами вьюпорта);
- Сохраняет размер блока для скролла;
- Экономит ресурсы → First Paint быстрее, Lighthouse выше.

Где применять:

- Списки (товары, посты);
- Длинные страницы;
- Виджеты ниже фолда.

⚠️ Осторожно: не ставьте на элементы с динамическим контентом, где важно мгновенное измерение размеров.

Можно добавить contain-intrinsic-size → убрать "скачок" при появлении.


.card {
content-visibility: auto;
contain-intrinsic-size: 300px;
}


2 строки — и сайт ощущается быстрее

👉 @frontend_1
👍6



tgoop.com/frontend_1/4044
Create:
Last Update:

🚀 Быстрое улучшение Lighthouse: content-visibility

Хотите ускорить рендер длинных страниц без костылей? Используйте CSS-свойство:


.card {
content-visibility: auto;
}


Что делает:

- Браузер не рендерит невидимые элементы (за пределами вьюпорта);
- Сохраняет размер блока для скролла;
- Экономит ресурсы → First Paint быстрее, Lighthouse выше.

Где применять:

- Списки (товары, посты);
- Длинные страницы;
- Виджеты ниже фолда.

⚠️ Осторожно: не ставьте на элементы с динамическим контентом, где важно мгновенное измерение размеров.

Можно добавить contain-intrinsic-size → убрать "скачок" при появлении.


.card {
content-visibility: auto;
contain-intrinsic-size: 300px;
}


2 строки — и сайт ощущается быстрее

👉 @frontend_1

BY Frontend разработчик




Share with your friend now:
tgoop.com/frontend_1/4044

View MORE
Open in Telegram


Telegram News

Date: |

Earlier, crypto enthusiasts had created a self-described “meme app” dubbed “gm” app wherein users would greet each other with “gm” or “good morning” messages. However, in September 2021, the gm app was down after a hacker reportedly gained access to the user data. End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. On June 7, Perekopsky met with Brazilian President Jair Bolsonaro, an avid user of the platform. According to the firm's VP, the main subject of the meeting was "freedom of expression." As five out of seven counts were serious, Hui sentenced Ng to six years and six months in jail. A few years ago, you had to use a special bot to run a poll on Telegram. Now you can easily do that yourself in two clicks. Hit the Menu icon and select “Create Poll.” Write your question and add up to 10 options. Running polls is a powerful strategy for getting feedback from your audience. If you’re considering the possibility of modifying your channel in any way, be sure to ask your subscribers’ opinions first.
from us


Telegram Frontend разработчик
FROM American