Μετάβαση στο κύριο περιεχόμενο
← 🎨 CSS as a design system·Ενότητα B9 · Μάθημα 12
ΕργασίαQuick recap. Write CSS that uses all 4 B7-B9 modern features. Use @layer base, components. In base, set body color via light-dark(black, white). In components: .card { container-type: inline-size; padding: 12px; border: 1px solid #ccc; } and .card:has(img) { background: lemonchiffon; }. Add @container (min-width: 200px) { .card h3 { font-size: 20px; } }.

Recap: Animation, architecture, capstones

50 XP5 min
Θεωρία

Quick recap — Modules B7-B9

Modern CSS that didn't exist five years ago. The 4 features that signal "this stylesheet was written in 2026":

  1. `@container` — style based on the parent's width, not the viewport's.
  2. `:has()` — the "parent selector" that finally landed. .card:has(img) styles only the cards with an image.
  3. `light-dark()` — one declaration, two themes, no JS theme toggle wiring.
  4. `@layer` architecture — explicit cascade ordering. @layer base, components, utilities and you're done with specificity wars.

If any feels random, redo B6-08 / B8-04 / B5-09 / B8-01 then come back.

🔒

Εγγράψου για να αρχίσεις να προγραμματίζεις

Η θεωρία είναι ανοιχτή για όλους. Ο επεξεργαστής, η ζωντανή προεπισκόπηση και ο έλεγχος ξεκλειδώνουν με 7-ήμερη δωρεάν δοκιμή — απαιτείται κάρτα.

Εγγραφή — δωρεάν δοκιμή →

Τα πρώτα 10 μαθήματα κάθε διαδρομής είναι δωρεάν. Δεν χρειάζεται κάρτα.

← Προηγούμενο✓ Ενότητα ολοκληρώθηκε

Μια συμβουλή Python ή web την ημέρα — με email

Σύντομο, γραμμένο στο χέρι, χωρίς spam. Διαγραφή με ένα κλικ.