Skip to content

rem vs em vs px: Choosing CSS Units

By qc_admin

How px, em and rem actually differ: px is fixed, em compounds from the parent font-size, and rem stays anchored to the root. When to use each.

Percent-Encoding and Reserved Characters in URLs

By qc_admin

The RFC 3986 character sets that decide what to percent-encode: unreserved, gen-delims, sub-delims, and how the rules differ per URL component.

OKLCH and Modern CSS Colour

By qc_admin

Why OKLCH describes colour by lightness, chroma and hue in a perceptually uniform space, and how that makes readable palettes and predictable tints.

HTML Entities: A Quick Reference and How They Work

By qc_admin

HTML entities are text codes that stand in for reserved or awkward characters. What they are, when you must use them, and a reference of the common ones.

HEX, RGB and HSL Colour, Explained

By qc_admin

How HEX, RGB and HSL describe the same colours in different notations, how to convert between them, and why HSL is easier to reason about by hand.

Escaping Strings in JSON, HTML, and URLs

By qc_admin

Each context has its own escaping rules, and mixing them causes bugs and security holes. How JSON, HTML, and URL escaping differ, with worked examples.

CSS Viewport Units: vw, vh, vmin, vmax

By qc_admin

What vw, vh, vmin and vmax measure, why 100vh caused mobile scrolling bugs, and how svh, lvh and dvh fix the moving-browser-bar problem.

UUID v4 vs v7: What Changed and Why

By qc_admin

How UUIDs are structured, why v4 is fully random, how v7 embeds a millisecond timestamp for index locality, and the privacy tradeoff of a time-ordered ID.

URL Encoding: When It’s Needed and When It Breaks

By qc_admin

How percent-encoding works, reserved vs unreserved characters, encodeURIComponent vs encodeURI, %20 vs +, and the double-encoding bugs that break URLs.

Reading a Diff Properly

By qc_admin

How to read a unified diff: the @@ hunk header, + and – lines, context lines, line-level vs word-level diffs, and when to ignore whitespace.