Course / دورة
CSS frameworks: Tailwind and Bootstrapأطر CSS: Tailwind وBootstrap
Two ways to stop writing the same CSS twice — and how to choose
طريقتان لتكفّ عن كتابة CSS نفسها مرتين — وكيف تختار
intermediate 23 lessons 7 chapters 12 hours
Before you start / قبل أن تبدأ: CSS
0 / 23 lessons completed / دروس مكتملة
What you will be able to do / ماذا ستستطيع أن تفعل
- Build a page with utilities instead of writing new CSS for every element تبني صفحة بالأدوات المساعدة بدل كتابة CSS جديدة لكل عنصر
- Assemble the components a real site needs: navbars, cards, modals, forms تركّب مكوّنات الموقع الحقيقي: أشرطة تنقل وبطاقات ونوافذ ونماذج
- Customise a framework to your own brand rather than accepting its defaults تخصص الإطار ليطابق هويتك بدل قبول إعداداته الافتراضية
- Judge when a framework is the wrong tool تحكم متى يكون الإطار الأداة الخاطئة
1 The ideaالفكرة 3
-
1
What a CSS framework is, and what you give up / ما هو إطار CSS وما الذي تتنازل عنه
A framework is somebody else's CSS, already written and already tested. That buys you speed and costs you control — and the two frameworks in this course make opposite trades.
الإطار هو CSS كتبها غيرك واختبرها. وهذا يشتري لك سرعة ويكلّفك تحكمًا — والإطاران في هذه الدورة يقايضان بشكل متعاكس.
-
2
Getting them running: CDN and the build step / تشغيلهما: الـCDN وخطوة البناء
One of these frameworks works from a single line in your head. The other really wants a build step, and the honest reason why is worth understanding before you fight it.
أحد هذين الإطارين يعمل من سطر واحد في رأسك. والآخر يريد خطوة بناء فعلًا، والسبب الصادق يستحق الفهم قبل أن تصارعه.
-
3
The utility idea, and the component idea / فكرة الأدوات وفكرة المكوّنات
Before any class names, the two models. One names things you recognise; the other names properties you already know. Every later lesson is these two ideas applied to one topic.
قبل أي أسماء أصناف، النموذجان. أحدهما يسمّي أشياء تعرفها؛ والآخر يسمّي خصائص تعرفها أصلًا. وكل درس لاحق هو هاتان الفكرتان مطبَّقتين على موضوع واحد.
2 Utilitiesالأدوات المساعدة 5
-
4
Spacing: the scale that stops the guessing / التباعد: المقياس الذي يوقف التخمين
Padding and margin are where a page silently goes wrong — 13px here, 15px there. Both frameworks answer with the same idea: a fixed scale of steps, and you may only pick a step.
الحشو والهامش هما حيث تختلّ الصفحة بصمت — 13 بكسل هنا و15 هناك. ويجيب الإطاران بالفكرة نفسها: مقياس ثابت من الدرجات، ولا يجوز لك إلا اختيار درجة.
-
5
Colour: palettes you cannot get wrong / اللون: لوحات لا تستطيع أن تخطئ فيها
Both frameworks ship a palette with numbered shades. Picking from it is faster than choosing a hex value, and it makes contrast something you can reason about instead of guess at.
يشحن الإطاران لوحة ألوان بدرجات مرقّمة. والاختيار منها أسرع من انتقاء قيمة ست عشرية، ويجعل التباين شيئًا تستطيع التفكير فيه بدل تخمينه.
-
6
Typography: size, weight and line length / الطباعة: الحجم والوزن وطول السطر
Text is most of every page. Both frameworks give you a type scale and a set of weights — and one of them has a plugin that styles a whole article for you in a single class.
النص هو معظم كل صفحة. ويعطيك الإطاران مقياسًا للخط ومجموعة أوزان — ولأحدهما إضافة تنسّق مقالًا كاملًا في صنف واحد.
-
7
Sizing: widths, heights and containers / التحجيم: العروض والارتفاعات والحاويات
How wide is a thing? Both frameworks answer with a mix of fractions, fixed steps and a container that centres your page — and the container is the first class most people learn.
كم عرض الشيء؟ يجيب الإطاران بمزيج من الكسور والدرجات الثابتة وحاوية تتوسّط صفحتك — والحاوية أول صنف يتعلمه معظم الناس.
-
8
Borders, corners and shadows / الحدود والزوايا والظلال
The three things that turn a rectangle into something that looks designed. Both frameworks scale all three, and the useful skill is knowing when to use one instead of another.
الأشياء الثلاثة التي تحوّل مستطيلًا إلى شيء يبدو مصمَّمًا. ويقيس الإطاران الثلاثة، والمهارة النافعة معرفة متى تستخدم واحدًا بدل آخر.
3 Layout and statesالتخطيط والحالات 4
-
9
Flex layout, in class names / تخطيط flex بأسماء الأصناف
You already know flexbox. This lesson is a translation table — every property you learned has a class in both frameworks, and the thinking is unchanged.
أنت تعرف flexbox أصلًا. وهذا الدرس جدول ترجمة — فلكل خاصية تعلمتها صنف في الإطارين، والتفكير كما هو.
-
10
Grid layout: rows and columns / تخطيط الشبكة: صفوف وأعمدة
Flex arranges things in one direction. When you need both at once, the two frameworks part company completely: Bootstrap has a twelve-column system, Tailwind hands you CSS grid.
يرتّب flex الأشياء في اتجاه واحد. وحين تحتاج الاتجاهين معًا يفترق الإطاران تمامًا: فلـBootstrap نظام من اثني عشر عمودًا، وTailwind يسلّمك شبكة CSS.
-
11
Responsive: prefixes instead of media queries / التجاوب: بادئات بدل استعلامات الوسائط
This is the thing frameworks do best. A media query becomes a prefix on a class, and a layout that changes at three screen sizes fits on one line.
وهذا أفضل ما تفعله الأطر. فاستعلام الوسائط يصير بادئة على صنف، والتخطيط الذي يتغير عند ثلاثة أحجام شاشة يتّسع في سطر واحد.
-
12
States: hover, focus, disabled / الحالات: التحويم والتركيز والتعطيل
A page that never reacts feels broken. The same prefix idea as breakpoints applies to states — and one of them is not optional, because people navigate with a keyboard.
الصفحة التي لا تتفاعل أبدًا تبدو معطلة. وفكرة البادئة نفسها من نقاط التوقف تنطبق على الحالات — وواحدة منها ليست اختيارية، لأن الناس يتنقلون بلوحة المفاتيح.
4 Componentsالمكوّنات 5
-
13
Buttons: the component you will copy most / الأزرار: المكوّن الذي ستنسخه أكثر
One class in Bootstrap, eight in Tailwind, and the interesting part is neither — it is which element you used and whether it is a button at all.
صنف واحد في Bootstrap وثمانية في Tailwind، والجزء المثير ليس أيهما — بل أي عنصر استخدمت وهل هو زر أصلًا.
-
14
Forms: inputs, labels and errors / النماذج: الحقول والتسميات والأخطاء
Bootstrap styles form controls for you; Tailwind does not touch them until you say so. Both leave the two things that actually matter — the label and the error — entirely up to you.
ينسّق Bootstrap عناصر النموذج عنك؛ وTailwind لا يمسّها حتى تقول. وكلاهما يترك الشيئين المهمين فعلًا — التسمية والخطأ — لك تمامًا.
-
15
Cards and panels / البطاقات واللوحات
The most reused shape on the web: a box with a heading, some text and something to click. Bootstrap has one built; Tailwind expects you to build it once and reuse it.
أكثر شكل يُعاد استخدامه على الويب: صندوق فيه عنوان ونص وشيء تنقره. ولـBootstrap واحد مبني؛ ويتوقع Tailwind أن تبنيه مرة وتعيد استخدامه.
-
16
Navigation bars / أشرطة التنقل
Every site has one, and it is the first place a framework saves you real time — and the first place a framework component quietly needs JavaScript.
لكل موقع واحد، وهو أول موضع يوفّر فيه الإطار وقتًا حقيقيًا — وأول موضع يحتاج فيه مكوّن الإطار JavaScript بهدوء.
-
17
Modals and dropdowns: where JavaScript arrives / النوافذ والقوائم المنسدلة: حيث تصل JavaScript
Everything so far was CSS. Anything that opens and closes needs code — and a dialog that is merely visible, rather than properly opened, is the most common accessibility failure on the web.
كل ما سبق كان CSS. وكل ما يُفتح ويُغلق يحتاج شيفرة — والنافذة المرئية فحسب، لا المفتوحة كما ينبغي، أشيع إخفاق في إتاحة الوصول على الويب.
5 Making it yoursتخصيصها 3
-
18
Extracting repetition / استخراج التكرار
The strongest objection to utility classes: the same eight classes on forty buttons. There is a good answer, a tempting bad answer, and knowing which is which is the point of this lesson.
أقوى اعتراض على أصناف الأدوات: الأصناف الثمانية نفسها على أربعين زرًا. وثمة جواب جيد وجواب سيئ مغرٍ، ومعرفة أيهما أيّ هي مقصد هذا الدرس.
-
19
Customising: making it yours / التخصيص: جعله لك
A default framework page looks like a framework page. Both let you change that at the root, and doing it there rather than overriding case by case is the difference between a theme and a patch.
صفحة الإطار الافتراضية تبدو صفحة إطار. ويتيح الاثنان تغيير ذلك من الجذر، وفعله هناك بدل التجاوز حالةً حالة هو الفرق بين سمة ورقعة.
-
20
Dark mode / الوضع الداكن
One prefix in Tailwind, one attribute in Bootstrap, and a set of design decisions that neither of them makes for you — because a dark theme is not a light one inverted.
بادئة واحدة في Tailwind وسمة واحدة في Bootstrap، ومجموعة قرارات تصميم لا يتخذها أي منهما عنك — لأن السمة الداكنة ليست الفاتحة مقلوبة.
6 Choosing wellحسن الاختيار 2
-
21
When not to use a framework / متى لا تستخدم إطارًا
Twenty lessons of what these tools do well. This one is the other half of the judgement, because reaching for a framework by reflex is how small projects end up heavy.
عشرون درسًا فيما تحسنه هذه الأدوات. وهذا هو النصف الآخر من الحكم، لأن اللجوء إلى إطار بالانعكاس هو كيف تنتهي المشاريع الصغيرة ثقيلة.
-
22
Choosing between them / الاختيار بينهما
You have now built the same things twice. This lesson is the decision, made from what you actually experienced rather than from what either project says about itself.
لقد بنيت الآن الأشياء نفسها مرتين. وهذا الدرس هو القرار، متخذًا مما جربته فعلًا لا مما يقوله كل مشروع عن نفسه.