Telegram Group & Telegram Channel
🎯 Современный способ центрирования с place-items

Центрировать элемент — базовая задача, но многие до сих пор пишут лишнее:

Старый способ с Flexbox:


display: flex;
justify-content: center;
align-items: center;


Новый минималистичный способ с Grid:


display: grid;
place-items: center;


📌 place-items — это сокращение для align-items + justify-items. Работает только с CSS Grid, но зато:

* Меньше кода
* Более читаемо
* Идеально для одиночных элементов в контейнере

💡 Подходит для модалок, карточек, лоадеров и др.

⚙️ Поддержка: все современные браузеры (даже IE11 частично поддерживает place-items как -ms-grid)

Пробуй — и забудь про лишние строки!

👉 @frontend_1



tg-me.com/frontend_1/3977
Create:
Last Update:

🎯 Современный способ центрирования с place-items

Центрировать элемент — базовая задача, но многие до сих пор пишут лишнее:

Старый способ с Flexbox:


display: flex;
justify-content: center;
align-items: center;


Новый минималистичный способ с Grid:


display: grid;
place-items: center;


📌 place-items — это сокращение для align-items + justify-items. Работает только с CSS Grid, но зато:

* Меньше кода
* Более читаемо
* Идеально для одиночных элементов в контейнере

💡 Подходит для модалок, карточек, лоадеров и др.

⚙️ Поддержка: все современные браузеры (даже IE11 частично поддерживает place-items как -ms-grid)

Пробуй — и забудь про лишние строки!

👉 @frontend_1

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




Share with your friend now:
tg-me.com/frontend_1/3977

View MORE
Open in Telegram


Frontend разработчик Telegram | DID YOU KNOW?

Date: |

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

Frontend разработчик from us


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