tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

498 bites

CSS & Design Systems30 sec read

Using CSS Grid, how do repeat, auto-fit, and minmax create responsive columns?

Tests intrinsic sizing and responsive tracks without media queries. A strong answer gives repeat(auto-fit, minmax(250px, 1fr)), noting repeat generates tracks, auto-fit collapses empties, and minmax sets a floor with fractional growth.

CSS & Design Systems31 sec read

Implement fluid typography from 16px to 24px across 400px–1200px in one declaration?

This tests clamp() fluency for viewport-relative type scaling without media queries. A strong answer states clamp(16px, calc(16px + 8 * (100vw - 400px) / 800), 24px) and explains the slope math. A red flag is multiple media queries or calc() without clamp().

CSS & Design Systems30 sec read

What are CSS container queries and what problem do they solve?

This tests component-level responsive awareness. A strong answer states container queries style elements based on their container size, letting components adapt regardless of viewport. Red flag: believing media queries alone solve component context adaptation.

CSS & Design Systems30 sec read

Explain advantages of rem and em over px in responsive design

This tests cascading font scaling and accessibility. Strong answers mention user zoom, root-level rem control, component em scaling, and avoiding px fragmentation. Red flag: claiming px handles all user preferences automatically.

CSS & Design Systems30 sec read

How would you use srcset and sizes for responsive image performance?

This tests responsive image selection in the browser. A strong answer covers srcset with w or x descriptors, sizes for layout width hints, and the browser picking before CSS loads. Red flag: suggesting JS detection or CSS backgrounds instead.

CSS & Design Systems30 sec read

Build a responsive 3-column layout with Flexbox and Grid

Tests whether you pick right tool for responsive layouts. Good answers use flex-wrap and flex-basis for Flexbox, repeat() or grid-template-areas for Grid, in min-width 768px query. Red flag: desktop-first max-width queries or claiming Grid replaces Flexbox.

CSS & Design Systems30 sec read

Make an image scale fluidly without exceeding its original size

Tests intrinsic sizing awareness. Good answer: max-width: 100% scales the image down with its container but never stretches it beyond intrinsic size; add height: auto to preserve aspect ratio. Red flag: width: 100% or omitting height, causing distortion.

CSS & Design Systems30 sec read

Explain the mobile-first approach and how it differs from desktop-first

WHAT IT TESTS: whether you tie progressive enhancement to min-width. ANSWER OUTLINE: mobile-first starts small, layers up with min-width; desktop-first starts large, overrides down with max-width.

CSS & Design Systems30 sec read

What is the viewport meta tag and what does width=device-width, initial-scale=1.0 do?

This tests mobile viewport behavior and CSS pixels. The tag instructs browsers how to size the viewport; width=device-width sets width to screen CSS pixels; initial-scale=1.0 sets a 1:1 zoom ratio. A red flag is confusing viewport width with physical pixels.

CSS & Design Systems30 sec read

How can CSS aspect-ratio and modern layout properties prevent CLS?

WHAT IT TESTS: Your grasp of reserving render space before media loads. ANSWER OUTLINE: Set width/height attributes, use CSS aspect-ratio for responsive scaling, and reserve container space with min-height.

CSS & Design Systems30 sec read

How do min-content, max-content, and fit-content work in CSS Grid?

It tests intrinsic track sizing. A strong answer defines min-content as the smallest no-overflow width, max-content as widest no-wrap width, and fit-content as clamped max-content; then shows labels hugging longest word.

CSS & Design Systems30 sec read

What problem does subgrid solve? Give a concrete example.

This tests whether you know nested grids create track contexts breaking cross-level alignment. A strong answer explains subgrid inherits parent tracks, using a card whose internals align to a global page grid.

CSS & Design Systems31 sec read

Implement a fixed-width sidebar with Flexbox and CSS Grid

This tests Flexbox as one-dimensional versus Grid as 2-dimensional. A strong answer covers Flexbox with flex: 1 on main and flex: none on sidebar, and Grid with grid-template-columns: 250px 1fr. Red flag: claiming Grid is always superior or ignoring overflow.

CSS & Design Systems30 sec read

Explicit vs implicit grid: how do you control implicit tracks?

WHAT IT TESTS: Grid track generation beyond explicit bounds. ANSWER OUTLINE: Explicit tracks use grid-template; implicit tracks appear on overflow. Control via grid-auto-rows/columns and grid-auto-flow.

CSS & Design Systems30 sec read

Create a responsive card grid without media queries

This tests CSS Grid intrinsic sizing. Answer: grid-template-columns with repeat(auto-fit, minmax(min, 1fr)), leveraging repeat, minmax, and auto-fit for fluid wrapping. Red flag: defaulting to Flexbox or media queries instead of intrinsic grid behavior.

CSS & Design Systems30 sec read

Explain flex-grow, flex-shrink, flex-basis and their interaction

Tests deep understanding of flexbox sizing beyond keywords. A strong answer defines grow and shrink as ratios for distributing leftover or overflow space, basis as the starting size, and explains the two-step calculation.

CSS & Design Systems30 sec read

How does color-scheme interact with user-agent stylesheets and prefers-color-scheme?

This tests the boundary between author CSS and browser chrome. color-scheme lets the UA recolor native UI like scrollbars and form controls automatically, while prefers-color-scheme styles custom components.

CSS & Design Systems30 sec read

How do you create gradient text in CSS?

WHAT IT TESTS: Mastery of background-clip and CSS box model. ANSWER OUTLINE: Set a gradient background-image, use background-clip: text to clip to glyphs, and color: transparent to reveal it.

CSS & Design Systems30 sec read

How do CSS Custom Properties manage a design system color palette?

WHAT IT TESTS: Tokenization and cascade scoping. ANSWER OUTLINE: Define --color-primary on :root, use var() for buttons and headings, mention fallbacks. RED FLAG: Confusing CSS variables with SASS or using only local scopes.

CSS & Design Systems30 sec read

What is font-display and how do swap and block differ?

This tests knowledge of the font display timeline. Swap shows fallback immediately then swaps in custom font, while block hides text for a short block period before fallback. A red flag is claiming swap prevents layout shift or that block is superior.