My C89 CSS minifier was recently broken down into a separate JavaScript/JSON minifier. It's trivial to embed in C, "should" build fine in WASM (that's untested, though), and is pretty small: the whole combined library is about 67kb, or about 34kb for just the JS parts (much of which is docs).
It minifies only spaces, not symbols, and does not offer any options for _not_ minifying (e.g. adding newlines every so often for the sake of tools which treat extremely-long-lined files as binaries) except that by default it retains the first comment in the input if it's the first non-whitespace content (those are typically license/attribution blocks) but it can be told to optionally strip those too.
LLM disclaimer: the 100% hand-written CSS minifier was given to an LLM which, tasked with creating a JS minifier with the same interface, created the new variant in about 20 seconds. That code was later hand-refactored to consolidate parts common to the two minifiers (all of which were hand-written) but the JS-specific pieces are otherwise 100% LLM-generated.
Happy minifying!