Freewsad
الرئيسيةمقالاتفئات الكتب
تسجل الدخولتسجيل
القائمة
فريوساد - أفضل موقع للتعليم

الرئيسيةسياسة الخصوصيةمعلومات عناتواصل معناالأصناف

حقوق النشر© 2021 - 2025 جميع الحقوق محفوظة.

Accordion Rows in CSS Grid

Accordion Rows in CSS Grid

At 3/31/2024

I’d bet grid-template-columns is used about 10× more than grid-template-rows, but maybe everyone has just been missing out. Eric Meyer chucks a bunch of row lines onto his main site layout grid like this:

grid-template-rows: repeat(7, min-content) 1fr repeat(3, min-content);

That way, if you need to use them they are they for you:

I like this pattern. It feels good to me, having two sets of rows where the individual rows accordion open to accept content when needed, and collapse to zero height when not, with a “blank” row in between the sets that pushes them apart. It’s flexible, and even allows me to add more rows to the sets without having to rewrite all my layout styles.

Direct Link →

حقوق التأليف والنشر

نحن نحترم حقوق الملكية للآخرين ونحرص دائمًا على عدم التعدي على حقوقهم، لذا يحق للمؤلفين ودور النشر المطالبة بإزالة رابط تحميل مقال أو كتاب من الموقع. إذا وجدت مقالاً أو كتاباً خاصاً بك ولم توافق على نشر رابط التحميل أو كان لديك اقتراح أو شكوى راسلنا عبر تواصل معنا, أو عن طريق البريد الإلكتروني في: support@freewsad.com.

المزيد عنا