~/talk

Building a search engine in CSS

Talkat dotCSS 2017 · on Thursday, 2017-11-30· [css, creative-coding]
slides:none on file

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

  1. 0:00Intro
  2. 1:02A search engine
  3. 4:23Main strength of CSS
  4. 4:56Core principles
  5. 6:15Does not work...
  6. 7:22Adding an oninput handler
  7. 9:37Searching and Indexing
  8. 12:25Matching everything
  9. 13:35Ordering results
  10. 13:54Highlight
  11. 14:39Custom font
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.