Building a search engine in CSS
summary
A search engine is implemented entirely in CSS with minimal HTML and a one-liner JavaScript that copies the input value into the value attribute so CSS selectors can match typed queries. Results come from pre-generated n‑grams (including accent variants and single‑character typo tolerances) and 150 result slots, producing about 8MB of CSS (5MB minified). Highlighting uses merged fonts with glyphs placed in the private use area and ordering uses Flexbox order; everything is built as static CSS rules.
AI-written summary · about
chapters (11)
- 0:00Intro
- 1:02A search engine
- 4:23Main strength of CSS
- 4:56Core principles
- 6:15Does not work...
- 7:22Adding an oninput handler
- 9:37Searching and Indexing
- 12:25Matching everything
- 13:35Ordering results
- 13:54Highlight
- 14:39Custom font








