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
Revisiting CSS Fundamentals with Container Queries & :has()
More Relevant Posts
-
𝐂𝐒𝐒 𝐓𝐈𝐏 — :𝐇𝐀𝐒() 𝐈𝐍 𝐂𝐒𝐒 :has() is one of the most powerful modern CSS selectors. It allows you to style a parent element based on its child or a specific condition — without using JavaScript. This means cleaner code, better control, and smarter UI interactions. ✅ Why use :has()? - Target parent elements easily - Create advanced hover effects - Improve UI logic using only CSS - Reduce JavaScript dependency 💡 Example use cases: - Highlight a card when a child is hovered - Change layout based on content - Style forms when inputs are focused or valid If you are writing modern CSS, learning :has() is definitely worth it. 💬 Have you started using :has() in your projects? #css #frontend #webdevelopment #csstips #frontenddeveloper #webdesign #moderncss #codingtips #devcommunity #uiux
To view or add a comment, sign in
-
-
🚀 Built an Interactive CSS Positioning Playground Understanding CSS positioning is one of the most confusing parts for beginners, especially concepts like: ▶️ absolute vs relative ▶️ containing block ▶️ stacking context ▶️ z-index behavior ▶️ left/right & top/bottom conflicts So I decided to build something that makes it visual and interactive. Introducing Css-PositionLab , an interactive CSS Positioning Playground built using: ⚡ Vite ⚛️ React + TypeScript 🎨 Tailwind CSS Live 🔗 : https://lnkd.in/g6JZR7Ec Github 🔗: https://lnkd.in/gg5kfMxA 🔍 What it does: ✅ Visual Parent–Child positioning simulation ✅ Real-time adjustment of position properties ✅ Anchor-based control (left/right & top/bottom) ✅ Stacking context & z-index testing ✅ Live CSS code generation ✅ Visual origin indicator (0,0 reference) Instead of just reading documentation, learners can experiment and see how positioning actually behaves. This project helped me explore: ▶️ UI-driven learning experiences ▶️State-driven layout visualization ▶️CSS stacking context behavior ▶️Multi-element interactive control architecture ▶️Clean component structuring in React #React #TypeScript #Vite #TailwindCSS #FrontendDevelopment #WebDevelopment #CSS #OpenSource #LearningByBuilding
To view or add a comment, sign in
-
-
#Day11 of #100DaysOfMERNLearning A Small but Important UI Lesson Today I didn’t learn a new component — instead, I explored why UI sometimes breaks even when the code looks correct, especially when using Bootstrap and Tailwind CSS together. 1. Discovered how utility classes can conflict 2. Learned that CSS file order matters more than expected 3. Understood why some styles get overridden silently 4. Realized mixing frameworks without understanding specificity can cause bugs This learning changed how I look at CSS frameworks — problems aren’t always about wrong code, sometimes they’re about how tools work under the hood. Small research today, but a big step toward writing cleaner and more predictable UI #MERNStack #FrontendDevelopment #Bootstrap #TailwindCSS #CSS #WebDevelopment #LearningJourney Skill Shikshya
To view or add a comment, sign in
-
🎥 From code to UI — turning HTML & CSS into a real project In this video, I’ve shown the complete HTML & CSS code behind my Instagram Login Page Clone, and at the end, the final UI output. This practice helped me understand: • Structuring HTML properly • Styling forms with CSS • Alignments, spacing & UI flow • Writing clean and readable code Currently in my training phase, building projects consistently to strengthen fundamentals and become job-ready. Learning by doing 🚀 #HTML #CSS #FrontendDevelopment #WebDevelopment #DeveloperJourney #LearningByDoing
To view or add a comment, sign in
-
🚀 CSS has evolved are you keeping up? What once required verbose syntax and workarounds is now cleaner, smarter, and more expressive. ✨ Then → Now • Grouped selectors → :where() • vw / vh → lvw / lvh (more stable viewport units) • text-wrap: wrap → text-wrap: balance • transform: rotate() → rotate • Layout hacks → intent-based layout properties Modern CSS isn’t just about writing less code. It’s about better readability, maintainability, and performance. If you’re still writing CSS the old way, now’s a great time to upgrade your toolkit. 💡 What’s your favorite modern CSS improvement so far? 👇 #CSS #WebDevelopment #Frontend #ModernCSS #Fullstackdevelopment #UIDesign #design
To view or add a comment, sign in
-
-
🚀 Day 5/100 – Login Page Design (HTML & CSS) Here’s a quick demo of the Login Page I designed using only HTML & CSS. 💻 In this project, I focused on: ✔ Clean and structured form layout ✔ Proper input alignment & spacing ✔ Modern button styling with hover effects ✔ Simple and responsive UI This screen recording shows the practical implementation of my frontend fundamentals — no frameworks, just pure HTML & CSS practice. I’m grateful to Code Of School for providing the right learning environment and continuous support. Special thanks to my mentors Ritendra Gour and Avinash Gour for their valuable guidance and motivation throughout this journey. 🙌 Consistency + Guidance = Growth 🚀 #Day5 #100DaysOfCode #WebDevelopment #HTML #CSS #FrontendDeveloper #CodeOfSchool #LearningJourney #MERNStackLearner #BuildInPublic
To view or add a comment, sign in
-
I remember the first time I learned about CSS sprites — it felt like a frontend "aha" moment 🤔 Back then, loading a page meant making tons of tiny image requests: icons, buttons, arrows… each one slowing things down just a bit. Sprites flipped that idea 💡 Instead of loading many images, you load one big image and use CSS to show only the part you need. One request. Multiple icons. Faster pages. That’s it. What I like about CSS sprites isn’t just the technique — it’s the mindset behind it: 👉 Think about performance early. 👉 Reduce unnecessary work for the browser. 👉 Small optimizations add up. Sure, today we mostly use SVGs and modern bundlers — but concepts like sprites remind us that great frontend engineering is often about understanding the fundamentals. Have you ever used CSS sprites in a real project? Or are you fully team SVG now? 🙂 #css #frontend #webperformance #webdev #softwareengineering
To view or add a comment, sign in
-
-
🚀 Mastering CSS Selectors: From Basics to Advanced Combinators Understanding CSS isn’t just about colors and layouts — it’s about relationships. Today’s learning focused on CSS Selectors, especially how elements connect in the DOM tree 👨👩👧👦 🔹 Basic Selectors Universal (*) Element (h1) Class (.class) ID (#id) 🔹 Advanced Selectors (Combinators) Descendant (div p) Direct Child (div > p) Adjacent Sibling (+) General Sibling (~) 🔹 Powerful Add-ons Attribute selectors (input[type="text"]) Pseudo-classes (:hover, :focus, :checked, :nth-child()) 💡 The Grandparent → Parent → Child analogy made it much easier to visualize how CSS targets elements based on structure, not just names. This knowledge helps in: ✅ Writing cleaner CSS ✅ Avoiding unnecessary classes ✅ Building smarter UI interactions using only CSS Learning one selector at a time, but thinking like a frontend engineer 💻✨ #CSS #WebDevelopment #Frontend #LearningJourney #DOM
To view or add a comment, sign in
-
-
Had a great session in our Web Dev Cohort today. We stopped just guessing how to style pages and started learning the actual rules that make CSS work. Here’s what we covered: Atomic CSS (The logic behind Tailwind): We learned how using small, single-purpose classes makes building websites much faster and keeps the code clean. The Specificity Algorithm: Ever get frustrated when your CSS doesn't change anything? We learned the "math" the browser uses to decide which style wins. It’s all about a simple points system: Inline styles > IDs > Classes > Elements. When to use !important: We talked about why this is a "last resort." It can fix a problem quickly, but it can also make your code very hard to manage later if you use it too much. Understanding these basics makes debugging so much easier. Instead of fighting with the code, you finally understand why it’s doing what it’s doing! Are you a fan of using utility classes like Tailwind, or do you prefer writing your own CSS from scratch? Let’s chat below! 👇 Hitesh Choudhary Piyush Garg Chai Aur Code #WebDev #CSS #Coding #Learning #Tailwind #Frontend #WebDesign
To view or add a comment, sign in
-
-
🎨𝗖𝗦𝗦 𝗦𝗽𝗲𝗰𝗶𝗳𝗶𝗰𝗶𝘁𝘆 𝗛𝗶𝗲𝗿𝗮𝗿𝗰𝗵𝘆 Ever wonder why your CSS isn't applying, even though you’re sure you wrote the right code? 🤯 𝗜𝘁’𝘀 𝘂𝘀𝘂𝗮𝗹𝗹𝘆 𝗻𝗼𝘁 𝗮 𝗯𝘂𝗴 — it’s Specificity. Think of CSS Specificity as a weight system. The browser looks at all the rules hitting an element and chooses the "heaviest" one to render. If you’ve ever fought with a stubborn button color, you’ve felt the pain of the hierarchy. Here is the breakdown of who wins the fight: 🏆 The CSS Power Rankings (Lowest to Highest) 1️⃣ 𝗘𝗹𝗲𝗺𝗲𝗻𝘁 & 𝗣𝘀𝗲𝘂𝗱𝗼-𝗲𝗹𝗲𝗺𝗲𝗻𝘁𝘀 (div, p, ::before) The lightweights. Great for general styling, but easily overridden. 2️⃣ 𝗖𝗹𝗮𝘀𝘀𝗲𝘀, 𝗔𝘁𝘁𝗿𝗶𝗯𝘂𝘁𝗲𝘀, & 𝗣𝘀𝗲𝘂𝗱𝗼-𝗰𝗹𝗮𝘀𝘀𝗲𝘀 (.menu, [type="text"], :hover) The bread and butter of scalable CSS. Most of your styling should live here. 3️⃣ 𝗜𝗗 𝗦𝗲𝗹𝗲𝗰𝘁𝗼𝗿𝘀 (#header) The heavy hitters. These are very specific and can make your CSS hard to maintain if overused. 4️⃣ 𝗜𝗻𝗹𝗶𝗻𝗲 𝗦𝘁𝘆𝗹𝗲𝘀 (style="color: red;") The "I need this changed right now" move. These live directly in your HTML and will beat almost any external CSS rule. 5️⃣ !𝗶𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁 The nuclear option. ☢️ It overrides everything else. Use it as a last resort (like fixing third-party library conflicts), because it breaks the natural "cascade" of CSS. 💡 Pro-Tip for Clean Code: If you find yourself using !important or deep ID chains constantly, it’s a sign to refactor. Aim for a low-specificity architecture (like BEM) to keep your stylesheets predictable and easy to manage. #CSS #WebDevelopment #Frontend #CodingTips #SoftwareEngineering #WebDesign #Programming
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development