<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CSS &#8211; Bits of .NET</title>
	<atom:link href="http://blog.ercanopak.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ercanopak.com</link>
	<description>Daily micro-tips for C#, SQL, performance, and scalable backend engineering.</description>
	<lastBuildDate>Mon, 30 Mar 2026 17:50:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>http://blog.ercanopak.com/wp-content/uploads/2018/06/cropped-EO_LOGO_32-32x32.png</url>
	<title>CSS &#8211; Bits of .NET</title>
	<link>http://blog.ercanopak.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>CSS: Use Grid auto-fit and auto-fill for Responsive Layouts Without Media Queries</title>
		<link>http://blog.ercanopak.com/css-use-grid-auto-fit-and-auto-fill-for-responsive-layouts-without-media-queries/</link>
					<comments>http://blog.ercanopak.com/css-use-grid-auto-fit-and-auto-fill-for-responsive-layouts-without-media-queries/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Mon, 30 Mar 2026 17:50:53 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[auto-fill]]></category>
		<category><![CDATA[auto-fit]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS Grid]]></category>
		<category><![CDATA[CSS Tips]]></category>
		<category><![CDATA[Modern CSS]]></category>
		<category><![CDATA[No Media Queries]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[Responsive Layout]]></category>
		<category><![CDATA[Web Design]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-use-grid-auto-fit-and-auto-fill-for-responsive-layouts-without-media-queries/</guid>

					<description><![CDATA[📱 Responsive Grids, Zero Media Queries Media queries for every breakpoint? Tedious. Grid auto-fit/auto-fill creates responsive layouts automatically. Items reflow based on space available. The Magic Formula .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; } /* That's it! Fully responsive without media queries Items wrap automatically based on available space */ 🎯 [&#8230;]]]></description>
										<content:encoded><![CDATA[<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 50px 40px; border-radius: 16px; margin: 40px 0; box-shadow: 0 20px 60px rgba(0,0,0,0.3);">
<h2 style="margin: 0 0 20px 0; font-size: 2.8em; font-weight: 800; line-height: 1.2;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4f1.png" alt="📱" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Responsive Grids, Zero Media Queries</h2>
<p style="font-size: 1.4em; line-height: 1.8; margin: 0; opacity: 0.95;">Media queries for every breakpoint? Tedious. <strong>Grid auto-fit/auto-fill</strong> creates responsive layouts automatically. Items reflow based on space available.</p>
</p></div>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #764ba2; padding-left: 20px;">The Magic Formula</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* That's it! Fully responsive without media queries
   Items wrap automatically based on available space */
</pre>
<div style="background: #f8f9fa; padding: 40px; border-radius: 12px; margin: 40px 0; border: 2px solid #667eea;">
<h4 style="color: #667eea; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3af.png" alt="🎯" class="wp-smiley" style="height: 1em; max-height: 1em;" /> How It Works</h4>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">
repeat(auto-fit, minmax(250px, 1fr))

Breaking it down:
- repeat(): Create columns
- auto-fit: As many columns as fit
- minmax(250px, 1fr): Min 250px, max 1 fraction

Wide screen (1200px):
┌───────┬───────┬───────┬───────┐
│  250  │  250  │  250  │  250  │  (4 columns)
└───────┴───────┴───────┴───────┘

Medium screen (800px):
┌───────┬───────┬───────┐
│  266  │  266  │  266  │  (3 columns)
└───────┴───────┴───────┘

Small screen (500px):
┌───────┬───────┐
│  250  │  250  │  (2 columns)
└───────┴───────┘

Tiny screen (300px):
┌───────┐
│  300  │  (1 column, stretches to fill)
└───────┘

Automatic reflow!
</pre>
</p></div>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #f39c12; padding-left: 20px;">auto-fit vs auto-fill</h3>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin: 40px 0;">
<div style="background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; padding: 30px; border-radius: 12px;">
<h4 style="margin-top: 0; font-size: 1.6em;">auto-fit</h4>
<p style="line-height: 1.9; margin: 15px 0;">Stretches items to fill space</p>
<pre style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 6px; font-size: 0.9em;">
3 items, wide screen:
┌──────────┬──────────┬──────────┐
│   Item   │   Item   │   Item   │
└──────────┴──────────┴──────────┘
Each item expands to fill width
</pre>
</p></div>
<div style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; padding: 30px; border-radius: 12px;">
<h4 style="margin-top: 0; font-size: 1.6em;">auto-fill</h4>
<p style="line-height: 1.9; margin: 15px 0;">Creates ghost columns</p>
<pre style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 6px; font-size: 0.9em;">
3 items, wide screen:
┌─────┬─────┬─────┬─────┬─────┐
│Item │Item │Item │     │     │
└─────┴─────┴─────┴─────┴─────┘
Items stay minimum width
</pre>
</p></div>
</p></div>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
/* Use auto-fit when:
   You want items to stretch and fill space */
.gallery {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Use auto-fill when:
   You want consistent item sizes, allow empty space */
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
</pre>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #27ae60; padding-left: 20px;">Real-World Examples</h3>
<div style="background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); color: white; padding: 35px; border-radius: 12px; margin: 40px 0;">
<h4 style="margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4f8.png" alt="📸" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Image Gallery</h4>
<pre style="background: rgba(0,0,0,0.3); color: #fff; padding: 25px; border-radius: 8px; font-size: 1.05em; line-height: 1.8;">
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

/* Responsive without media queries!
   Desktop: 4-5 columns
   Tablet: 2-3 columns
   Mobile: 1 column */
</pre>
</p></div>
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 35px; border-radius: 12px; margin: 40px 0;">
<h4 style="margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f6cd.png" alt="🛍" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Product Cards</h4>
<pre style="background: rgba(0,0,0,0.3); color: #fff; padding: 25px; border-radius: 8px; font-size: 1.05em; line-height: 1.8;">
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.product-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* auto-fill ensures cards stay ~300px
   Extra space on right if not enough items */
</pre>
</p></div>
<div style="background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); padding: 35px; border-radius: 12px; margin: 40px 0; border-left: 5px solid #28a745;">
<h4 style="color: #155724; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> When to Use</h4>
<ul style="color: #155724; font-size: 1.15em; line-height: 2.2; margin: 20px 0;">
<li><strong>Image galleries:</strong> Photos that should fill space</li>
<li><strong>Product grids:</strong> E-commerce item listings</li>
<li><strong>Card layouts:</strong> Blog posts, team members</li>
<li><strong>Icon grids:</strong> Feature showcases</li>
<li><strong>Dashboard widgets:</strong> Admin panels</li>
</ul></div>
<div style="background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%); border-left: 5px solid #ffc107; padding: 35px; margin: 50px 0; border-radius: 12px;">
<h4 style="color: #856404; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Pro Tips</h4>
<ul style="color: #856404; font-size: 1.15em; line-height: 2.2; margin: 20px 0;">
<li><strong>Adjust min width:</strong> Change 250px based on content needs</li>
<li><strong>Add max width:</strong> <code>minmax(250px, 400px)</code> to prevent too large items</li>
<li><strong>Dense packing:</strong> <code>grid-auto-flow: dense</code> fills gaps</li>
<li><strong>Fallback:</strong> Add media query for very old browsers</li>
</ul></div>
<div style="background: #f8f9fa; padding: 40px; border-radius: 12px; margin: 40px 0; border: 2px solid #667eea;">
<h4 style="color: #667eea; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3af.png" alt="🎯" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Cheat Sheet</h4>
<table style="width: 100%; border-collapse: collapse; margin: 20px 0;">
<tr style="background: #667eea; color: white;">
<th style="padding: 15px; text-align: left;">Pattern</th>
<th style="padding: 15px; text-align: left;">Behavior</th>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #ddd;"><code>auto-fit</code></td>
<td style="padding: 12px; border-bottom: 1px solid #ddd;">Stretch items to fill</td>
</tr>
<tr style="background: #f8f9fa;">
<td style="padding: 12px; border-bottom: 1px solid #ddd;"><code>auto-fill</code></td>
<td style="padding: 12px; border-bottom: 1px solid #ddd;">Keep min size, allow gaps</td>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #ddd;"><code>minmax(250px, 1fr)</code></td>
<td style="padding: 12px; border-bottom: 1px solid #ddd;">Min 250px, max equal fractions</td>
</tr>
<tr style="background: #f8f9fa;">
<td style="padding: 12px;"><code>gap: 1rem</code></td>
<td style="padding: 12px;">Space between items</td>
</tr>
</table></div>
<blockquote style="background: linear-gradient(to right, #e8eaf6, #c5cae9); border-left: 6px solid #5c6bc0; padding: 40px; margin: 50px 0; border-radius: 12px;">
<p style="font-size: 1.5em; line-height: 1.9; margin: 0; color: #1a237e; font-style: italic; font-weight: 500;">&#8220;Removed 200 lines of media query CSS. One line with auto-fit replaced it all. Product grid now works perfectly from 320px to 4K displays. CSS Grid is magic.&#8221;</p>
<footer style="margin-top: 20px; color: #283593; font-size: 1.15em; font-weight: 600;">— Frontend Developer</footer>
</blockquote>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-use-grid-auto-fit-and-auto-fill-for-responsive-layouts-without-media-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Use Container Queries for True Component-Based Responsive Design</title>
		<link>http://blog.ercanopak.com/css-use-container-queries-for-true-component-based-responsive-design/</link>
					<comments>http://blog.ercanopak.com/css-use-container-queries-for-true-component-based-responsive-design/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Sun, 22 Mar 2026 09:04:19 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Component Design]]></category>
		<category><![CDATA[Container Queries]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS Layout]]></category>
		<category><![CDATA[CSS Tips]]></category>
		<category><![CDATA[Design Systems]]></category>
		<category><![CDATA[Modern CSS]]></category>
		<category><![CDATA[Responsive Components]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[Web Design]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-use-container-queries-for-true-component-based-responsive-design/</guid>

					<description><![CDATA[📦 Responsive Components, Not Just Pages Media queries check viewport width. Component in sidebar? Full width? Same breakpoint fails. Container queries check parent width. The Problem with Media Queries ❌ Media Queries /* Card component */ .card { display: flex; } @media (max-width: 768px) { .card { flex-direction: column; /* Stack on mobile */ } [&#8230;]]]></description>
										<content:encoded><![CDATA[<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 50px 40px; border-radius: 16px; margin: 40px 0; box-shadow: 0 20px 60px rgba(0,0,0,0.3);">
<h2 style="margin: 0 0 20px 0; font-size: 2.8em; font-weight: 800; line-height: 1.2;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e6.png" alt="📦" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Responsive Components, Not Just Pages</h2>
<p style="font-size: 1.4em; line-height: 1.8; margin: 0; opacity: 0.95;">Media queries check viewport width. Component in sidebar? Full width? Same breakpoint fails. <strong>Container queries</strong> check parent width.</p>
</p></div>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #764ba2; padding-left: 20px;">The Problem with Media Queries</h3>
<div style="background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%); color: white; padding: 35px; border-radius: 12px; margin: 40px 0;">
<h4 style="margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Media Queries</h4>
<pre style="background: rgba(0,0,0,0.3); color: #fff; padding: 25px; border-radius: 8px; font-size: 1.05em; line-height: 1.8;">
/* Card component */
.card {
  display: flex;
}

@media (max-width: 768px) {
  .card {
    flex-direction: column; /* Stack on mobile */
  }
}

Problem:
- Card in sidebar (300px): Still horizontal! (viewport > 768px)
- Card full width (800px): Stacked! (viewport < 768px)
- Component doesn't know its own width
</pre>
</p></div>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #27ae60; padding-left: 20px;">Container Queries Solution</h3>
<div style="background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); color: white; padding: 35px; border-radius: 12px; margin: 40px 0;">
<h4 style="margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Container Queries</h4>
<pre style="background: rgba(0,0,0,0.3); color: #fff; padding: 25px; border-radius: 8px; font-size: 1.05em; line-height: 1.8;">
/* Define container */
.sidebar,
.main-content {
  container-type: inline-size;
  container-name: card-container;
}

/* Card adapts to parent width */
.card {
  display: flex;
}

@container card-container (max-width: 400px) {
  .card {
    flex-direction: column;
  }
}

Result:
- Card in 300px sidebar: Stacked ✓
- Card in 800px main: Horizontal ✓
- Component responds to ITS container, not viewport
</pre>
</p></div>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #f39c12; padding-left: 20px;">Real Example: Product Card</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
/* Container setup */
.product-grid {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* Card base style */
.product-card {
  display: grid;
  grid-template-areas: 
    "image"
    "title"
    "price"
    "button";
}

/* When container > 300px: Horizontal layout */
@container (min-width: 300px) {
  .product-card {
    grid-template-areas: 
      "image title"
      "image price"
      "image button";
    grid-template-columns: 120px 1fr;
  }
}

/* When container > 500px: Full horizontal */
@container (min-width: 500px) {
  .product-card {
    grid-template-areas: "image title price button";
    grid-template-columns: 150px 1fr auto auto;
    align-items: center;
  }
}
</pre>
<div style="background: #f8f9fa; padding: 40px; border-radius: 12px; margin: 40px 0; border: 2px solid #667eea;">
<h4 style="color: #667eea; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3af.png" alt="🎯" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Container Query Units</h4>
<table style="width: 100%; border-collapse: collapse; margin: 20px 0;">
<tr style="background: #667eea; color: white;">
<th style="padding: 15px; text-align: left;">Unit</th>
<th style="padding: 15px; text-align: left;">Meaning</th>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold;">cqw</td>
<td style="padding: 12px; border-bottom: 1px solid #ddd;">1% of container width</td>
</tr>
<tr style="background: #f8f9fa;">
<td style="padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold;">cqh</td>
<td style="padding: 12px; border-bottom: 1px solid #ddd;">1% of container height</td>
</tr>
<tr>
<td style="padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold;">cqi</td>
<td style="padding: 12px; border-bottom: 1px solid #ddd;">1% of container inline size</td>
</tr>
<tr style="background: #f8f9fa;">
<td style="padding: 12px;">cqb</td>
<td style="padding: 12px;">1% of container block size</td>
</tr>
</table>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
/* Font size scales with container */
.card h2 {
  font-size: clamp(1rem, 5cqw, 2rem);
}

/* Padding relative to container */
.card {
  padding: 2cqi;
}
</pre>
</p></div>
<div style="background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); padding: 35px; border-radius: 12px; margin: 40px 0; border-left: 5px solid #28a745;">
<h4 style="color: #155724; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> When to Use Container Queries</h4>
<ul style="color: #155724; font-size: 1.15em; line-height: 2.2; margin: 20px 0;">
<li><strong>Reusable components:</strong> Card, panel, widget in different contexts</li>
<li><strong>Grid layouts:</strong> Items adapt to available space</li>
<li><strong>Sidebar vs main:</strong> Same component, different widths</li>
<li><strong>Design systems:</strong> Components work anywhere</li>
</ul></div>
<div style="background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%); border-left: 5px solid #ffc107; padding: 35px; margin: 50px 0; border-radius: 12px;">
<h4 style="color: #856404; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Browser Support</h4>
<p style="color: #856404; font-size: 1.15em; margin: 15px 0;"><strong>Current:</strong> 91% (Chrome 105+, Safari 16+, Firefox 110+)</p>
<p style="color: #856404; font-size: 1.15em; margin: 15px 0;"><strong>Fallback:</strong> Use <code>@supports</code> to detect support</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
@supports (container-type: inline-size) {
  /* Container query styles */
}

/* Fallback for older browsers */
@media (max-width: 768px) {
  /* Media query fallback */
}
</pre>
</p></div>
<blockquote style="background: linear-gradient(to right, #e8eaf6, #c5cae9); border-left: 6px solid #5c6bc0; padding: 40px; margin: 50px 0; border-radius: 12px;">
<p style="font-size: 1.5em; line-height: 1.9; margin: 0; color: #1a237e; font-style: italic; font-weight: 500;">"Rebuilt our component library with container queries. Same card component works perfectly in sidebar, grid, full-width. No more variant props for different layouts. True responsive components."</p>
<footer style="margin-top: 20px; color: #283593; font-size: 1.15em; font-weight: 600;">— Design Systems Engineer</footer>
</blockquote>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-use-container-queries-for-true-component-based-responsive-design/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Use clamp() for Responsive Typography Without Media Queries</title>
		<link>http://blog.ercanopak.com/css-use-clamp-for-responsive-typography-without-media-queries/</link>
					<comments>http://blog.ercanopak.com/css-use-clamp-for-responsive-typography-without-media-queries/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Thu, 19 Mar 2026 20:28:18 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[clamp()]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS Functions]]></category>
		<category><![CDATA[CSS Tips]]></category>
		<category><![CDATA[Fluid Design]]></category>
		<category><![CDATA[Modern CSS]]></category>
		<category><![CDATA[No Media Queries]]></category>
		<category><![CDATA[Responsive Typography]]></category>
		<category><![CDATA[Scalable Text]]></category>
		<category><![CDATA[Web Design]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-use-clamp-for-responsive-typography-without-media-queries/</guid>

					<description><![CDATA[📏 Fluid Typography That Just Works Writing 5 media queries for font sizes? clamp() does it in one line. Responsive typography perfected. The Old Way (Painful) h1 { font-size: 24px; } @media (min-width: 640px) { h1 { font-size: 32px; } } @media (min-width: 768px) { h1 { font-size: 40px; } } @media (min-width: 1024px) { [&#8230;]]]></description>
										<content:encoded><![CDATA[<div style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; padding: 50px 40px; border-radius: 16px; margin: 40px 0; box-shadow: 0 20px 60px rgba(0,0,0,0.3);">
<h2 style="margin: 0 0 20px 0; font-size: 2.8em; font-weight: 800; line-height: 1.2;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cf.png" alt="📏" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Fluid Typography That Just Works</h2>
<p style="font-size: 1.4em; line-height: 1.8; margin: 0; opacity: 0.95;">Writing 5 media queries for font sizes? <strong>clamp()</strong> does it in one line. Responsive typography perfected.</p>
</p></div>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #f5576c; padding-left: 20px;">The Old Way (Painful)</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
h1 { font-size: 24px; }

@media (min-width: 640px) { h1 { font-size: 32px; } }
@media (min-width: 768px) { h1 { font-size: 40px; } }
@media (min-width: 1024px) { h1 { font-size: 48px; } }
@media (min-width: 1280px) { h1 { font-size: 56px; } }
</pre>
<h3 style="color: #2c3e50; font-size: 2.2em; margin: 50px 0 30px 0; font-weight: 700; border-left: 5px solid #27ae60; padding-left: 20px;">The New Way (Elegant)</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
h1 {
  font-size: clamp(24px, 5vw, 56px);
}

/* Syntax: clamp(minimum, preferred, maximum) */

/* Font size:
   - Never smaller than 24px (mobile)
   - Scales with viewport (5vw = 5% of viewport width)
   - Never larger than 56px (desktop)
*/
</pre>
<div style="background: #f8f9fa; padding: 40px; border-radius: 12px; margin: 40px 0; border: 2px solid #f093fb;">
<h4 style="color: #f5576c; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3af.png" alt="🎯" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Real-World Examples</h4>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
/* Hero heading */
h1 { font-size: clamp(2rem, 6vw, 5rem); }

/* Body text */
p { font-size: clamp(1rem, 2vw, 1.25rem); }

/* Spacing */
.container { padding: clamp(1rem, 5vw, 3rem); }

/* Width */
.article { max-width: clamp(320px, 90vw, 800px); }
</pre>
</p></div>
<div style="background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); padding: 35px; border-radius: 12px; margin: 40px 0; border-left: 5px solid #28a745;">
<h4 style="color: #155724; margin-top: 0; font-size: 1.7em; font-weight: 700;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9ee.png" alt="🧮" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Calculate Perfect Values</h4>
<p style="color: #155724; font-size: 1.1em; line-height: 1.9; margin: 15px 0;">Use <strong>clamp calculator:</strong> utopia.fyi/type/calculator</p>
<p style="color: #155724; font-size: 1.1em; margin: 10px 0;">Input min/max viewport sizes + desired font sizes → Get perfect clamp() values with fallbacks</p>
</p></div>
<blockquote style="background: linear-gradient(to right, #fce4ec, #f8bbd0); border-left: 6px solid #e91e63; padding: 40px; margin: 50px 0; border-radius: 12px;">
<p style="font-size: 1.5em; line-height: 1.9; margin: 0; color: #880e4f; font-style: italic; font-weight: 500;">&#8220;Deleted 47 media queries, replaced with clamp(). Typography scales perfectly on all devices. Code is 70% smaller and easier to maintain.&#8221;</p>
<footer style="margin-top: 20px; color: #ad1457; font-size: 1.15em; font-weight: 600;">— Frontend Developer</footer>
</blockquote>
<p style="font-size: 1.15em; line-height: 1.9; color: #34495e; margin: 30px 0;"><strong>Browser Support:</strong> 96% (all modern browsers). Fallback: <code>font-size: 2rem; font-size: clamp(1.5rem, 4vw, 3rem);</code></p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-use-clamp-for-responsive-typography-without-media-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Use :has() for Parent Selectors</title>
		<link>http://blog.ercanopak.com/css-use-has-for-parent-selectors/</link>
					<comments>http://blog.ercanopak.com/css-use-has-for-parent-selectors/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Thu, 19 Mar 2026 20:07:21 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[:has()]]></category>
		<category><![CDATA[advanced css]]></category>
		<category><![CDATA[Browser Support]]></category>
		<category><![CDATA[Conditional Styling]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS Tips]]></category>
		<category><![CDATA[CSS4]]></category>
		<category><![CDATA[Modern CSS]]></category>
		<category><![CDATA[Parent Selector]]></category>
		<category><![CDATA[selectors]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-use-has-for-parent-selectors/</guid>

					<description><![CDATA[Need to style parent based on child? Impossible in CSS. Was. /* Style form if it has an error */ form:has(.error) { border: 2px solid red; } /* Style card if image is loading */ .card:has(img[loading]) { opacity: 0.5; } /* Style container if checkbox is checked */ .container:has(input:checked) { background: green; } Browser Support: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Need to style parent based on child? Impossible in CSS. Was.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">/* Style form if it has an error */
form:has(.error) {
  border: 2px solid red;
}

/* Style card if image is loading */
.card:has(img[loading]) {
  opacity: 0.5;
}

/* Style container if checkbox is checked */
.container:has(input:checked) {
  background: green;
}
</pre>
<p><strong>Browser Support:</strong> 88% (all modern browsers, no IE)</p>
<p><strong>Previously:</strong> Required JavaScript. Now pure CSS.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-use-has-for-parent-selectors/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Use @layer to Control Cascade Order Without !important</title>
		<link>http://blog.ercanopak.com/css-use-layer-to-control-cascade-order-without-important/</link>
					<comments>http://blog.ercanopak.com/css-use-layer-to-control-cascade-order-without-important/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Thu, 19 Mar 2026 19:31:10 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[@layer]]></category>
		<category><![CDATA[Cascade Layers]]></category>
		<category><![CDATA[Clean Code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS Architecture]]></category>
		<category><![CDATA[CSS Organization]]></category>
		<category><![CDATA[CSS Tips]]></category>
		<category><![CDATA[Maintainable CSS]]></category>
		<category><![CDATA[Modern CSS]]></category>
		<category><![CDATA[Specificity]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-use-layer-to-control-cascade-order-without-important/</guid>

					<description><![CDATA[🎯 Cascade Control !important is tech debt. @layer organizes CSS priority cleanly. @layer reset, base, components, utilities; @layer reset { * { margin: 0; padding: 0; } } @layer base { body { font-family: sans-serif; } } @layer components { .button { background: blue; } } @layer utilities { .mt-4 { margin-top: 1rem; } } [&#8230;]]]></description>
										<content:encoded><![CDATA[<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px; border-radius: 12px; margin: 25px 0;">
<h2 style="margin-top: 0; font-size: 2.2em;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3af.png" alt="🎯" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Cascade Control</h2>
<p style="font-size: 1.3em; line-height: 1.8;">!important is tech debt. @layer organizes CSS priority cleanly.</p>
</p></div>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
@layer reset, base, components, utilities;

@layer reset {
  * { margin: 0; padding: 0; }
}

@layer base {
  body { font-family: sans-serif; }
}

@layer components {
  .button { background: blue; }
}

@layer utilities {
  .mt-4 { margin-top: 1rem; }
}

/* Utilities always win, no !important needed */
</pre>
<p><strong>Benefit:</strong> Utility classes beat components. Components beat base. Predictable, maintainable.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-use-layer-to-control-cascade-order-without-important/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Creating the Ultimate Glassmorphism Look (Modern UI)</title>
		<link>http://blog.ercanopak.com/css-creating-the-ultimate-glassmorphism-look-modern-ui/</link>
					<comments>http://blog.ercanopak.com/css-creating-the-ultimate-glassmorphism-look-modern-ui/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Sun, 01 Mar 2026 10:55:34 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[Glassmorphism]]></category>
		<category><![CDATA[Modern Web]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[Visual Effects]]></category>
		<category><![CDATA[Web Design]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-creating-the-ultimate-glassmorphism-look-modern-ui/</guid>

					<description><![CDATA[The &#8216;Frosted Glass&#8217; effect is everywhere in iOS and Windows. Here is the code to do it right. .glass-panel { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 15px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); } Note: backdrop-filter is the magic property that blurs everything [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The &#8216;Frosted Glass&#8217; effect is everywhere in iOS and Windows. Here is the code to do it right.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}</pre>
<p><strong>Note:</strong> <code>backdrop-filter</code> is the magic property that blurs everything <em>behind</em> the element.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-creating-the-ultimate-glassmorphism-look-modern-ui/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Container Queries &#8211; The End of Media Queries?</title>
		<link>http://blog.ercanopak.com/css-container-queries-the-end-of-media-queries/</link>
					<comments>http://blog.ercanopak.com/css-container-queries-the-end-of-media-queries/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Sun, 01 Mar 2026 10:47:14 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Container Queries]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[Modern Web]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[Web Design]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-container-queries-the-end-of-media-queries/</guid>

					<description><![CDATA[Media queries react to the viewport. Container queries react to the parent element&#8217;s size. This is a revolution for component-based design. .card-container { container-type: inline-size; } @container (min-width: 400px) { .card { display: flex; flex-direction: row; } } Why? Now your card component can be placed in a sidebar or a main feed and it [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Media queries react to the <em>viewport</em>. Container queries react to the <em>parent element&#8217;s size</em>. This is a revolution for component-based design.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
.card-container { container-type: inline-size; }
@container (min-width: 400px) {
  .card { display: flex; flex-direction: row; }
}</pre>
<p><strong>Why?</strong> Now your card component can be placed in a sidebar or a main feed and it will style itself correctly based on where it sits, not how big the screen is.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-container-queries-the-end-of-media-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Mastering &#8216;Subgrid&#8217; for Perfect Multi-Card Alignment</title>
		<link>http://blog.ercanopak.com/css-mastering-subgrid-for-perfect-multi-card-alignment/</link>
					<comments>http://blog.ercanopak.com/css-mastering-subgrid-for-perfect-multi-card-alignment/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Sun, 01 Mar 2026 10:37:48 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[Modern Web]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[subgrid]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[Web Design]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-mastering-subgrid-for-perfect-multi-card-alignment/</guid>

					<description><![CDATA[Ever had a row of cards where the headers didn&#8217;t align because of text length? Subgrid solves the biggest headache in CSS Grid. .container { display: grid; grid-template-rows: repeat(3, auto); } .card { display: grid; grid-template-rows: subgrid; grid-row: span 3; } This tells the card to inherit the row sizing of its parent, ensuring all [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Ever had a row of cards where the headers didn&#8217;t align because of text length? <strong>Subgrid</strong> solves the biggest headache in CSS Grid.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
.container { display: grid; grid-template-rows: repeat(3, auto); }
.card { 
  display: grid; 
  grid-template-rows: subgrid; 
  grid-row: span 3; 
}</pre>
<p>This tells the card to inherit the row sizing of its parent, ensuring all headers, bodies, and footers align perfectly across the entire row.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-mastering-subgrid-for-perfect-multi-card-alignment/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Professional Branding with Custom Scrollbars</title>
		<link>http://blog.ercanopak.com/css-professional-branding-with-custom-scrollbars/</link>
					<comments>http://blog.ercanopak.com/css-professional-branding-with-custom-scrollbars/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Sat, 28 Feb 2026 12:01:15 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Branding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Frontend Hacks]]></category>
		<category><![CDATA[Modern Web]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web Development]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-professional-branding-with-custom-scrollbars/</guid>

					<description><![CDATA[Default scrollbars often look ugly and clash with your design. Customize them with pure CSS. ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { background: #f1f1f1; } ::-webkit-scrollbar-thumb { background: #3498db; border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { background: #2980b9; } Why? It&#8217;s a small detail that makes your web app feel &#8216;finished&#8217; and high-end.]]></description>
										<content:encoded><![CDATA[<p>Default scrollbars often look ugly and clash with your design. Customize them with pure CSS.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb {
  background: #3498db;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #2980b9; }</pre>
<p><strong>Why?</strong> It&#8217;s a small detail that makes your web app feel &#8216;finished&#8217; and high-end.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-professional-branding-with-custom-scrollbars/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: Solving the &#8216;Jumping Content&#8217; Problem with aspect-ratio</title>
		<link>http://blog.ercanopak.com/css-solving-the-jumping-content-problem-with-aspect-ratio/</link>
					<comments>http://blog.ercanopak.com/css-solving-the-jumping-content-problem-with-aspect-ratio/#respond</comments>
		
		<dc:creator><![CDATA[ErcanOPAK]]></dc:creator>
		<pubDate>Sat, 28 Feb 2026 11:56:00 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[cls]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[Modern Web]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[UI/UX]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Performance]]></category>
		<guid isPermaLink="false">http://blog.ercanopak.com/css-solving-the-jumping-content-problem-with-aspect-ratio/</guid>

					<description><![CDATA[Before an image loads, the browser doesn&#8217;t know its height, causing the layout to &#8216;jump&#8217; (Cumulative Layout Shift &#8211; CLS). This is bad for SEO. .video-container { width: 100%; aspect-ratio: 16 / 9; background: #eee; /* Placeholder */ } The Result: The browser reserves the space before the content arrives, resulting in a smooth, professional [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Before an image loads, the browser doesn&#8217;t know its height, causing the layout to &#8216;jump&#8217; (Cumulative Layout Shift &#8211; CLS). This is bad for SEO.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="css">
.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #eee; /* Placeholder */
}</pre>
<p><strong>The Result:</strong> The browser reserves the space <em>before</em> the content arrives, resulting in a smooth, professional loading experience.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://blog.ercanopak.com/css-solving-the-jumping-content-problem-with-aspect-ratio/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
