Revisiting CSS Fundamentals with Container Queries & :has()

Day 27 of #100DaysOfCode 🚀 Today I revised Section 26 and Section 27 from the course. Didn’t rush through anything, just focused on revisiting concepts and making sure they actually make sense in my head. 📘 Section 26 – CSS: Container Queries & Units This section really shifts how you think about responsive design. Instead of asking “how big is the screen?”, container queries ask: 👉 “how big is the component?” What stood out to me: Styles can respond to a container’s size, not the viewport Makes components more reusable and independent Pairs really well with modern layout systems Container units help size things relative to their container instead of the page It feels like a more natural way to build scalable UI components. 📘 Section 27 – CSS: The superpower of :has() :has() still feels a bit magical every time I revisit it. Key takeaways: It lets you style a parent based on its children or their state Updates the traditional idea of what a pseudo-class can do Enables patterns that earlier needed JavaScript Native browser feature = faster and more future-proof (when supported) Revising these sections reminded me how much CSS has evolved and how important it is to keep updating mental models, not just syntax. Slow, intentional learning today. More revisions coming. 🌱 #100DaysOfCode #CSS #FrontendDevelopment #WebDevelopment #LearningInPublic #DeveloperJourney

To view or add a comment, sign in

Explore content categories