Esc

compact_css

procedureextensionexperimentalsince 0.36.1Source
  • macOS: compact_css works on macOS
  • Linux: compact_css works on Linux
  • Windows: compact_css works on Windows
  • Wasm: compact_css is not available on Wasm

Removes CSS block comments and blank/edge whitespace, preserving quoted strings. The result is in temporary storage; comments become spaces to keep tokens separate.

Signature

compact_css :: (text: string) -> string
Example
assert(compact_css("  a { color: red; } /* note */\n") == "a { color: red; }\n");

See also