Skip to content
tezvyn:

CSS & Design Systems

Tailwind, CSS, accessibility, design tokens

72 bites

Test yourself: Top 30 CSS & Design Systems interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in. No easy set yet. This is the full CSS & Design Systems quiz.

Easy everything in CSS & Design Systems, page 2

What is the viewport meta tag and what does width=device-width, initial-scale=1.0 do?
easy2 min 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 Grid: difference between 1fr and auto column sizing?
easy2 min read

CSS Grid: difference between 1fr and auto column sizing?

Tests fractional vs intrinsic sizing. 1fr divides leftover space; auto shrinks to content. Note that 1fr minimums default to auto, causing overflow with unbreakable content, unlike auto tracks. Red flag: claiming they are identical or auto always fills space.

Explain em, rem, px and why rem is preferred for font sizing
easy2 min read

Explain em, rem, px and why rem is preferred for font sizing

This tests CSS unit semantics and accessibility. px is absolute; em compounds against its parent; rem is root-relative and predictable. rem respects user browser font settings without nesting issues.

How do you declare a custom font and apply it to headings?
easy2 min read

How do you declare a custom font and apply it to headings?

This tests @font-face usage for custom web fonts. A good answer declares a font-family name and src URL inside @font-face, then applies that family to heading selectors.

Set paragraph text blue and background light grey, compare HEX, RGB, HSL
easy2 min read

Set paragraph text blue and background light grey, compare HEX, RGB, HSL

Set color and background-color; HEX is compact, RGB is explicit, HSL is intuitive for lightness/hue.

How do class and ID selectors differ in specificity and use case?
easy2 min read

How do class and ID selectors differ in specificity and use case?

IDs are 1-0-0 and meant for unique elements; classes are 0-1-0 and reusable.

What color wins when an ID and class rule conflict?
easy2 min read

What color wins when an ID and class rule conflict?

Red wins; an ID scores 1-0-0 while a class scores 0-1-0, so the ID rule beats the class rule.

Explain the CSS box model: content-box vs border-box
easy2 min read

Explain the CSS box model: content-box vs border-box

Tests if you understand how width maps to rendered size. Good answers contrast content-box (350px + 10px border = 370px) with border-box (stays 350px) and note that four width:25% items break under content-box. Red flag: saying border-box includes margin.

easy2 min read

The `inert` Attribute: Making UI Sections Unreachable

The inert attribute makes a part of the DOM non-interactive and inaccessible. It's like a glass pane over a UI section: you can see it, but can't click, focus, or use a screen reader on it. Use it for off-screen menus or inactive dialogs.

Fix Ragged Text Lines with `text-wrap: balance`
easy2 min read

Fix Ragged Text Lines with `text-wrap: balance`

Fix awkward text wrapping in headings. text-wrap: balance tells the browser to make each line roughly the same length, improving readability. Use it for short text blocks like titles, but know it's limited to a few lines due to performance costs.

CSS Nesting: Grouping Related Styles
easy2 min read

CSS Nesting: Grouping Related Styles

CSS nesting groups related styles like folders for files. Instead of repeating parent selectors, you write child rules inside the parent. This is great for component-based styling, but over-nesting creates specificity headaches that are hard to override.

Design System Adoption: A Product, Not a Project
easy2 min read

Design System Adoption: A Product, Not a Project

Treat your design system like a product with users (your teams), not a one-off project. This is crucial when launching a new system to ensure teams actually use it. The biggest footgun is assuming 'if you build it, they will come.'

Design System Office Hours: Your Team's Live Support Channel
easy2 min read

Design System Office Hours: Your Team's Live Support Channel

Design System Office Hours are a live support channel for your users. They're great for answering questions, unblocking teams, and gathering feedback as adoption grows. The main footgun is inconsistent promotion, which leads to empty, ineffective sessions.

Contribution Guidelines: The Rulebook for Your Design System
easy2 min read

Contribution Guidelines: The Rulebook for Your Design System

Contribution guidelines are the rulebook for evolving a shared design system, defining who can add what and how. They're essential when multiple teams need to contribute without chaos.

easy2 min read

Pre-commit Hooks: Your Code's Quality Gatekeeper

Think of a pre-commit hook as a bouncer for your codebase. It's a script that runs before Git finalizes a commit, checking your changes against project rules. Use it to automatically lint code, run formatters, or check for secrets before they enter history.

easy2 min read

Doc Site Generators: Content-First Websites

A doc site generator turns your Markdown files into a complete, searchable website. Use it for project docs or blogs to focus on writing, not web dev. The footgun is thinking they're only for docs; many are powerful static site generators.

easy2 min read

Component Scaffolding: Automate Boilerplate, Enforce Consistency

Component scaffolding automates creating files from templates, ensuring new components start with the correct structure. Instead of copy-pasting, run a command to generate the component, its styles, and tests.

Build Accessible Animations with `prefers-reduced-motion`
easy2 min read

Build Accessible Animations with `prefers-reduced-motion`

prefers-reduced-motion lets you respect a user's system-wide request to minimize animations. Use this CSS media query to replace potentially jarring effects like zooms or parallax with simpler fades, preventing discomfort for users with vestibular disorders.

Semantic HTML: Describe Meaning, Not Just Looks
easy2 min read

Semantic HTML: Describe Meaning, Not Just Looks

Semantic HTML uses tags that describe the content's role (e.g., <article>), not just its appearance. This helps screen readers and search engines understand your page, improving accessibility and SEO. The footgun is using <div> for everything.

CustomEvent: Sending Custom Data with Events
easy2 min read

CustomEvent: Sending Custom Data with Events

CustomEvent lets components communicate without direct coupling by firing custom-named events. It's like a private broadcast system for your app. Use it for a child component to signal a parent, passing data in the detail property. Don't forget detail!

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles