UNPKG

@porsche-design-system/components-react

Version:

Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.

12 lines (9 loc) 375 B
'use strict'; const minifyCss = (css) => { // TODO: could remove whitespace in selectors following // - before/after + combinator, e.g. ` + ` -> should not be removed within calc() return css .replace(/\s\s+|\.\\(?=:)|[\n\\]+(?!\+)| (?={)|;(?=\s+})|(:|media)\s(?=.*;?)/g, '$1') .replace(/\s?(,|>|~)\s/g, '$1'); }; exports.minifyCss = minifyCss;