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 3

HTML Slots: Making Web Components Customizable
easy2 min read

HTML Slots: Making Web Components Customizable

The <slot> element is a placeholder inside a Web Component, letting you inject your own markup. It makes components flexible, like a card with customizable header and body sections. The footgun: content without a slot attribute goes to the default slot.

The HTML <template> Element: Inert, Reusable Markup
easy2 min read

The HTML <template> Element: Inert, Reusable Markup

Think of <template> as a blueprint for HTML. It holds markup that's invisible and inactive until you need it, perfect for creating reusable chunks like list items that you can stamp out with JavaScript.

Custom Elements: Create Your Own HTML Tags
easy2 min read

Custom Elements: Create Your Own HTML Tags

Think of Custom Elements as creating your own Lego bricks for the web, defining new HTML tags with custom logic. Use them to build reusable components like a <product-card>. Be wary of extending built-in elements, as Safari does not support this.

easy2 min read

W3C Design Tokens: A Standard Format for UI Decisions

A standard design token format is a universal translator for your UI's style, defining colors and spacing in a JSON structure any tool can read. It lets design tools and codebases pull from one source of truth.

Component Library: Your UI's LEGO Box
easy2 min read

Component Library: Your UI's LEGO Box

A component library is a box of pre-built UI LEGOs. Instead of building a button from scratch, you grab the official one, ensuring consistency and speed. It's essential for scaling design across teams.

easy2 min read

Design Systems: Stop Reinventing UI Components

A design system is a shared library of reusable UI components and rules, acting as a single source of truth for designers and developers. It ensures a consistent look across apps without rebuilding common elements.

easy2 min read

Autoprefixer: Stop Memorizing CSS Vendor Prefixes

Autoprefixer lets you write modern CSS and automatically adds vendor prefixes like -webkit- during your build. It's a standard part of frontend toolchains, ensuring styles work across browsers.

CSS Minification: Smaller Files, Faster Sites
easy1 min read

CSS Minification: Smaller Files, Faster Sites

CSS minification vacuum-packs your stylesheets, removing whitespace, comments, and unused code to shrink file size. This automated build step improves performance by reducing network transfer size.

easy2 min read

Sass Nesting: Write CSS That Mirrors Your HTML

Sass nesting lets you structure your styles like your HTML, avoiding repetitive selectors. Use it for components with clear parent-child relationships, like a navbar's list items. The footgun is over-nesting, which creates bloated, overly-specific CSS.

easy2 min read

Sass Variables: Compile-Time Constants for CSS

Think of Sass variables as compile-time constants for your styles. You define a value once (e.g., $brand-color) and reuse it, ensuring consistency. They're perfect for theming colors and fonts.

easy2 min read

Utility-First CSS: Style Directly in Your Markup

Utility-first CSS styles elements with many small, single-purpose classes directly in your HTML. It's used for rapid prototyping and component-based systems. The footgun is creating verbose, repetitive markup by not extracting common patterns into components.

CSS Custom Properties: Variables for Your Stylesheet
easy2 min read

CSS Custom Properties: Variables for Your Stylesheet

CSS Custom Properties are variables for your stylesheet. Define a value like --primary-color once on :root and reuse it with var(), making global theme changes easy. The main footgun: they only work for property values, not names or selectors.

easy2 min read

OOCSS: Reusable Styles for Maintainable CSS

Treat CSS styles like building blocks. Object-Oriented CSS (OOCSS) separates an element's visual 'skin' (colors, borders) from its 'structure' (width, height). This lets you create reusable classes, reducing duplication for faster, maintainable stylesheets.

pointer-events: Making Elements Click-Through
easy2 min read

pointer-events: Making Elements Click-Through

The pointer-events property makes elements invisible to clicks and hovers, letting events pass through to what's underneath. Use it for decorative overlays on clickable content or to temporarily disable buttons.

CSS 2D Transforms: Move, Rotate, and Scale Elements
easy2 min read

CSS 2D Transforms: Move, Rotate, and Scale Elements

CSS transforms let you move, rotate, scale, and skew elements without affecting the document's layout flow. Use it for UI animations like hover effects or modal pop-ups.

CSS Transitions: Animating State Changes
easy2 min read

CSS Transitions: Animating State Changes

CSS transitions turn abrupt style changes into smooth animations. Instead of a button's color snapping on hover, it fades gracefully. Use this for visual feedback on state changes like :hover or when adding classes with JavaScript.

Flexible Images: More Than Just `max-width`
easy2 min read

Flexible Images: More Than Just `max-width`

Flexible images adapt to the device by providing different resolutions or crops. Use srcset for high-DPI screens and <picture> for art direction. The footgun is relying only on CSS max-width; this forces mobile users to download unnecessarily large…

easy2 min read

Fluid Layouts: Adapting Content to Any Screen

A fluid layout makes content flow to fill its container, preventing horizontal scrollbars. It's key for responsive sites that work on any device and for accessibility. The footgun: without constraints, content can become unreadably wide or awkwardly cramped.

The Viewport Meta Tag: Your First Responsive Step
easy2 min read

The Viewport Meta Tag: Your First Responsive Step

The viewport meta tag tells mobile browsers not to fake a desktop screen. It sets the page width to the device's width, enabling responsive design. It's essential for any modern site. The footgun: disabling user zoom (user-scalable=no) harms accessibility.

easy2 min read

The @media Rule: CSS for Different Screens

The @media rule is like an if-statement for your CSS, applying styles only when conditions like screen size are met. It's the core of responsive design, creating different layouts for mobile, tablet, and desktop.

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