web-feature: CSS.escape()

baseline logo Widely available

The CSS.escape() static method escapes a string so that it can be used in a valid CSS selector.