Skip to content
tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

1155 bites

Test yourself: Top 30 Frontend Dev interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Everything in Frontend Dev, page 56

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.

Intrinsic Web Design: Components That Style Themselves
advanced2 min read

Intrinsic Web Design: Components That Style Themselves

Intrinsic Web Design lets components style themselves based on their container, not the whole page. Instead of just viewport media queries, use container queries to make a component adapt to a wide content area or a narrow sidebar, making it truly reusable.

advanced2 min read

Media Queries: CSS That Adapts to the User's Device

Instead of one-size-fits-all CSS, media queries let your styles react to the user's device. They are used to change layouts for different screen widths, orientations, or display resolutions. The footgun is only testing for width, ignoring other factors.

CSS clamp(): Fluid Sizing in One Line
advanced2 min read

CSS clamp(): Fluid Sizing in One Line

The CSS clamp() function sets a value that scales between a minimum and maximum, like a thermostat for CSS properties. It's ideal for fluid typography, letting font-size grow with the viewport but not beyond set limits.

CSS object-fit: Control How Images Fill a Box
intermediate2 min read

CSS object-fit: Control How Images Fill a Box

object-fit tells an image how to behave inside a container with a different aspect ratio, preventing distortion. Use it for responsive hero images or product grids. The default is fill, which stretches the image; you almost always want cover or contain.

srcset and sizes: Responsive Images in HTML
intermediate2 min read

srcset and sizes: Responsive Images in HTML

Give the browser a menu of images with srcset and tell it how much screen space the image will take with sizes. The browser then picks the most efficient option for the user's device. The footgun is forgetting sizes, which makes the browser assume 100vw.

intermediate2 min read

The <picture> Element: Art Direction for Images

The <picture> element provides art-direction for images, letting the browser pick the best source file. It's used to serve different images for various screen sizes, resolutions, or formats, improving performance and user experience.

Viewport Units: Sizing Against the Browser Window
intermediate2 min read

Viewport Units: Sizing Against the Browser Window

Viewport units (vw/vh) size elements relative to the browser window, not their parent container. 1vw is 1% of the viewport's width. Use them for full-screen hero sections or typography that scales with the browser. A common footgun: 100vw causes overflow.

Relative CSS Units: rem vs. em
intermediate2 min read

Relative CSS Units: rem vs. em

Relative CSS units like rem and em tie element sizes to font size for scalable UIs. rem is relative to the root font size, providing consistency. em is relative to the parent, causing sizes to compound. The footgun is accidentally nesting em units.

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.

CSS Container Queries: Style Components, Not Just Pages
advanced2 min read

CSS Container Queries: Style Components, Not Just Pages

Container queries let components respond to their own size, not the viewport's. Use them for cards or sidebars that must adapt to different layouts. The footgun: you must first declare a parent as a "containment context" with container-type for it to work.

CSS Subgrid: Aligning Nested Grids
advanced2 min read

CSS Subgrid: Aligning Nested Grids

CSS Subgrid lets a nested grid borrow its parent's column or row tracks, solving the classic problem of aligning items inside components. This ensures elements within multiple cards, for example, line up perfectly.

CSS Grid: auto-fit vs. auto-fill
advanced2 min read

CSS Grid: auto-fit vs. auto-fill

Create responsive grids without media queries. auto-fill creates as many columns as fit, leaving empty ones. auto-fit collapses empty columns, letting content stretch to fill the space. The footgun is using auto-fill when you want items to grow.

CSS aspect-ratio: Maintain Shape in Responsive Layouts
intermediate2 min read

CSS aspect-ratio: Maintain Shape in Responsive Layouts

The aspect-ratio property sets a box's width-to-height ratio, making it maintain its shape as its container resizes. It's ideal for responsive video embeds or uniform grid items. The footgun: it has no effect if both width and height are fixed values.

CSS minmax(): Flexible Sizing for Grid Tracks
intermediate2 min read

CSS minmax(): Flexible Sizing for Grid Tracks

The minmax() function gives a grid track a minimum and maximum size, like a rubber band that stretches but won't snap. Use it in CSS Grid to create columns that grow with the viewport but never shrink below a readable width.

CSS Logical Properties: Layout That Speaks Every Language
intermediate2 min read

CSS Logical Properties: Layout That Speaks Every Language

Think 'start/end' not 'left/right'. CSS Logical Properties adapt your layout to the user's writing direction, from English to Arabic. Use padding-inline-start instead of padding-left for robust, internationalized sites.

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