ESC

Type to search the knowledge base.

CSS

Guides in CSS. Written like documentation — short paragraphs, real examples, interview-relevant depth.

Cascade & Specificity

beginner

How CSS decides the winner — origin, importance, layers, specificity, and order — in human terms.

beginner

Flexbox Fundamentals

beginner

Flex container vs items, main vs cross axis, grow/shrink/basis, alignment, wrapping, and the bugs that show up in real layouts.

beginner

CSS Box Model

beginner

Content, padding, border, margin, box-sizing, and how the math actually works for layout and overflow.

beginner

box-sizing border-box

beginner

Why border-box makes width include padding and border, the global reset pattern, and the layout bugs content-box still causes.

beginner

Display Block Inline Flex Grid

beginner

How display changes layout participation — block vs inline vs inline-block, and when flex/grid formatting contexts take over.

beginner

Flexbox Alignment Deep Dive

intermediate

justify-content, align-items, align-self, align-content — main vs cross axis, wrapping lines, and absolute positioning inside flex.

intermediate

Flex Grow Shrink Basis

intermediate

How flex items resolve size — flex-basis first, then grow into free space and shrink on deficit, plus min-width:auto overflow fixes.

intermediate

CSS Grid Fundamentals

beginner

Two-dimensional layout with tracks, gaps, placement, fr units, and when grid beats flex for page scaffolding.

beginner

Grid Template Areas

intermediate

Name grid regions with grid-template-areas — ascii layouts, grid-area placement, responsive rearrangements without absolute positioning.

intermediate

Auto-fit vs Auto-fill

intermediate

auto-fit collapses empty tracks; auto-fill keeps them. Use both with minmax for responsive card grids without media-query soup.

intermediate

minmax and fr Units

intermediate

Grid track sizing with fr free space and minmax() floors/ceilings — equal columns, fluid sidebars, and overflow-safe patterns.

intermediate

Position: static, relative, absolute, fixed, sticky

beginner

Containing blocks, stacking, sticky constraints, and when position is the right tool vs flex/grid.

beginner

Stacking Contexts and z-index

intermediate

Why z-index:9999 fails — stacking contexts from opacity, transform, position, and isolation, and how to debug overlay fights.

intermediate

CSS Specificity Deep Dive

beginner

Count IDs, classes, and elements correctly — :is/:where/:not, inline styles, !important, and how layers change who actually wins.

beginner

Cascade Layers @layer

intermediate

Use @layer to order reset, base, components, and utilities so specificity wars lose — layer priority, unlayered CSS, and !important.

intermediate

CSS Custom Properties

beginner

CSS variables that cascade and inherit — define tokens, theme at runtime, fall back safely, and avoid the invalid-at-computed-value trap.

beginner

Theming with Custom Properties

intermediate

Build light/dark and brand themes with CSS variables — token layers, data-theme switches, component contracts, and FOUC avoidance.

intermediate

Media Queries Modern Approach

beginner

Modern @media — mobile-first ranges, range syntax, preference queries, and when container queries replace viewport breakpoints.

beginner

Container Queries

intermediate

Style components from their container size with @container — name containment, units like cqi, and when media queries still win.

intermediate

Fluid Typography with clamp

intermediate

Use clamp(min, preferred, max) for fluid type and spacing — viewport units, the linear equation pattern, and accessibility floors.

intermediate

Responsive Images CSS

intermediate

CSS techniques for responsive images — max-width, object-fit, art-direction hooks, and how CSS pairs with srcset and sizes.

intermediate

object-fit and aspect-ratio

beginner

Crop and scale media with object-fit, lock boxes with aspect-ratio, and stop layout shift when images load.

beginner

CSS Transitions

beginner

Animate property changes with transition — timing, delay, which properties to animate, and how transitions differ from keyframe animations.

beginner

CSS Animations @keyframes

intermediate

Define @keyframes, control duration, easing, iteration, and fill-mode — when to animate, what to animate, and reduced-motion defaults.

intermediate

transform and opacity Performance

intermediate

Why transform and opacity animate smoothly — compositor layers, paint vs layout, and when filters and will-change reverse the win.

intermediate

will-change Pitfalls

advanced

will-change hints the browser to prepare layers — use sparingly, set only before animation, and remove after to avoid memory bloat.

advanced

Pseudo-classes Hover Focus Focus-visible

beginner

Interactive pseudo-classes — :hover, :focus, :focus-visible, :active, :focus-within — with keyboard-safe patterns and touch caveats.

beginner

Pseudo-elements Before After

beginner

::before and ::after generate children for decoration — required content/display, accessibility limits, and practical UI patterns.

beginner

:is :where :has

intermediate

Selector engines that cut repetition — :is and :where for lists, specificity traps, and :has for parent/sibling state without JS.

intermediate

CSS Selectors Attribute and Sibling

beginner

Attribute selectors, combinators, and sibling selectors — match states and structure without extra classes when the DOM already has the signal.

beginner

Overflow Scroll and Scroll Snap

intermediate

overflow, scroll containers, and scroll-snap for carousels and section snaps — touch behavior, accessibility, and nested scroll traps.

intermediate

Sticky Headers and Sidebars

intermediate

position: sticky for headers and side rails — containing blocks, overflow traps, top offsets, and stacking with page chrome.

intermediate

CSS Logical Properties

intermediate

margin-inline, padding-block, inset-inline-start — write layouts that flip with writing-mode and direction instead of hard-coded left/right.

intermediate

Writing Modes and Direction

advanced

direction, writing-mode, and text-orientation — vertical text, RTL layout, and why logical properties beat left/right hardcoding.

advanced

CSS Grid vs Flexbox When to Use

beginner

One-dimensional flex vs two-dimensional grid — decision rules for navs, card grids, page shells, and nested layouts.

beginner

Gap vs Margin in Layouts

beginner

Prefer gap in flex/grid for inter-item spacing — no collapse surprises, no last-child hacks, and when margin is still the right tool.

beginner

Centering Everything in CSS

beginner

Center with flex, grid, margin auto, and inset — horizontal, vertical, and both — plus the absolute-position and text-align traps.

beginner

Multi-column Layout

intermediate

CSS multi-column (columns, column-gap, break-inside) for article flows — not card grids — and how to avoid awkward splits.

intermediate

CSS Filters and Backdrop Filter

intermediate

filter vs backdrop-filter — blur, saturate, and glass effects, stacking costs, and accessibility pitfalls for frosted UI.

intermediate

blend-mode Basics

advanced

mix-blend-mode vs background-blend-mode — how pixels combine, isolation, and the stacking/readability traps in product UI.

advanced

CSS Masks and Clip Path

advanced

clip-path for shapes and mask-image for alpha/luminance cutouts — differences, animation notes, and accessibility caveats.

advanced

Print Stylesheets

intermediate

Design @media print — hide chrome, expand links, control page breaks, and force ink-friendly colors for usable paper and PDF output.

intermediate

prefers-reduced-motion

beginner

Honor prefers-reduced-motion — cut decorative animation, keep essential feedback, and wire CSS and JS motion to one preference.

beginner

prefers-color-scheme

beginner

Respect light/dark OS preferences with prefers-color-scheme, token overrides, color-scheme, and manual theme toggles that stay in sync.

beginner

color-mix and Relative Color

advanced

Build tints, shades, and alpha variants with color-mix() and relative color syntax — tokens that stay in sync without preprocessors.

advanced

CSS Nesting

intermediate

Native CSS nesting — & parent selector, nested rules and media queries, specificity behavior, and when not to nest five levels deep.

intermediate

@supports Feature Queries

intermediate

Progressively enhance with @supports — detect properties, selectors, and font tech, and structure fallbacks that still look intentional.

intermediate

CSS Reset vs Normalize vs Layer

intermediate

Reset wipes UA styles, normalize preserves useful defaults consistently, layers order both — pick a base strategy without fighting components.

intermediate

BEM Naming Methodology

beginner

Block, Element, Modifier naming for CSS — how it limits specificity wars, what to name, and when utility or CSS modules beat strict BEM.

beginner

Utility-First CSS Tradeoffs

intermediate

Utility-first (Tailwind-style) pros and cons — speed, consistency, HTML noise, design-token discipline, and when components still win.

intermediate

CSS Architecture ITCSS Overview

advanced

ITCSS inverted triangle — settings through utilities — how layer order reduces specificity wars in large stylesheets.

advanced

Subgrid

advanced

grid-template-rows/columns: subgrid — inherit parent tracks so nested cards and forms share one alignment system.

advanced

scroll-driven Animations Intro

advanced

CSS scroll-driven animations — animation-timeline with scroll() and view(), progress-linked effects, support caveats, and reduced motion.

advanced

View Transitions API CSS Angle

advanced

CSS view transitions — ::view-transition pseudo-tree, view-transition-name, default crossfades, and reduced-motion-safe page morphs.

advanced

Accent Color and Form Controls

beginner

Use accent-color to theme native checkboxes, radios, ranges, and progress — what it paints, what it skips, and when to custom-style instead.

beginner

outline vs border for Focus

beginner

Keep focus visible with outline or box-shadow — why border shifts layout, :focus-visible patterns, and never outline: none alone.

beginner