CSS Container Queries Playground - Online Test @container
Experiment with CSS container queries in a live editor. Resize the container and see styles change based on its width/height. Learn modern responsive.
UD5 Toolkit
Track metrics and gain insights with real-time dashboards.
Enterprise-grade protection for your data pipeline.
One-click deployments to production environments.
@container at-rule, you can apply styles conditionally when a container meets certain size conditions (like minimum width). This enables truly component-based responsive designâthe same component adapts whether it's in a narrow sidebar or a wide main content area.
container-type property. The most common value is container-type: inline-size; which allows querying the container's inline (width) dimension. You can also assign a container-name for targeted queries. Example: .card-wrapper { container-type: inline-size; container-name: cards; } Then use @container cards (min-width: 500px) { ... }.
@media) respond to the viewport (browser window) sizeâthey're page-level. Container Queries (@container) respond to a specific parent element's sizeâthey're component-level. This means a card component can adapt its layout based on its own container's width, regardless of the viewport size. Container queries enable truly reusable, self-contained responsive components.
@supports or progressive enhancement approaches. Check caniuse.com for the latest data.
min-width, max-width, min-height, max-height, and logical properties like min-inline-size. Combine conditions with and, or, and not. You can also use container query length units: cqw (1% of container width), cqh (1% of container height), cqi, cqb, cqmin, and cqmax. These work like viewport units but are relative to the container.
container-name values to different elements and target them specifically in your @container rules. For example: @container sidebar (max-width: 300px) { ... } will only match a container named "sidebar". If you omit the nameâ@container (min-width: 600px) { ... }âit matches the nearest ancestor container of any name.
container-type set (this playground's container already has container-type: inline-size). 2) Check your selector targets elements inside the container. 3) Ensure your @container syntax is correctâuse parentheses around conditions. 4) If using a named container, verify the name matches. Click "Apply CSS" after editing to ensure changes take effect. The status indicator shows green when the style is live.
Experiment with CSS container queries in a live editor. Resize the container and see styles change based on its width/height. Learn modern responsive.
Dynamically blend two colors using the CSS colorâmix() function in different color spaces. Copy the exact CSS snippet. No JS required.
Build the same layout with both Grid and Flexbox side by side. See the code differences and visual results.
Preview any website inside emulated device viewports (iPhone, iPad, various resolutions). No screenshot, live interaction in an iframe. Local tool.
Enter a URL and drag a slider to change the viewport width smoothly. See exactly where your layout breaks. No iframe limits.
Add grid items beyond defined tracks and see how implicit rows/columns expand. Set sizes interactively. Master the grid.
Grid of all 148 named CSS colors. Hover to see detail, click to copy the name or hex. Essential frontend reference.
A replica of the famous Flexbox Froggy game: solve alignment puzzles by writing CSS. Progress saved locally. Fun frontend learning.
Paste a list of hex colors and generate CSS custom properties for them. Create your design token file instantly.
Set a custom accent color for checkboxes, radios, range, and progress. See the browserâs rendering. Copy the CSS.
Style an `<input type='range'>` with custom track and thumb. Crossâbrowser CSS. Preview and copy the code.
Fetch a website's CSS and extract :root custom properties (ââcolor) to reveal its design token palette. For learning and inspiration.
Enter a component name and generate a complete RTL test file with render, screen, and common assertions. Fast testing setup.
Design a light and dark theme by picking colors for backgrounds, text, and links. Get the CSS for both themes. Local.
Paste a stylesheet and extract every unique color (hex, rgb, hsl) into a palette. Swatches displayed. Copy as JSON.
Type a CSS color name like 'tomato' or 'mediumseagreen' and instantly get its hex code and preview. Complete named colors list.
Enter a palette of colors and see a grid showing whether each foreground/background pair passes AA or AAA contrast. Must for designers.
A complete, searchable list of all 140+ named HTML/CSS colors with their hex codes and color previews. Click to copy code. Essential web reference.
Pick a color in the DisplayâP3 space and get the CSS color() function. See the difference from sRGB. For modern design.
Match gap size around doors/windows to the correct type of weather stripping (foam, V-strip, door sweep). Save energy.
Create a pure HTML/CSS accordion using <details> elements. Add custom styling and get the clean code. No JavaScript required.
Paste body text and test different font/background combos. See an actual passage rendered, not just a ratio. True feel for legibility.
Use <input type='color'> and see its change events and value in hex. Understand the native color picker. Quick demo.
Test the upcoming contrastâcolor() CSS function. Get white or black automatically for a given background. See it live.
Use the lightâdark() CSS function to change colors based on color scheme. Build a simple dark mode toggle with one property.
Pick a base color and generate a full palette of 10 shades (50 to 900) like Tailwind CSS. Copy as hex or hsl.
Test if your display supports HDR colors by rendering a gradient in Rec.2020 space. See what you're missing. Canvas based.
Enter a list of names and spin a wheel to pick a random winner. Remove picked names to avoid duplicates. Perfect for classrooms or contests.
See the Pantone Colors of the Year and popular palettes from past years. Get hex codes. Design inspiration.
Scramble letters of any word or sentence to create anagrams. Great for brain teasers and vocabulary games. Simple, fun, and client-side.