You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `{ format: { breakWith: 'lf' } }` option to configure what line
break looks like, allows `'crlf'` or `'lf'`, defaults to current system
one so former on Windows and latter on Unix.
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,7 @@ clean-css 4.2 will introduce the following changes / features:
122
122
* new `transition` property optimizer;
123
123
* preserves any CSS content between `/* clean-css ignore:start */` and `/* clean-css ignore:end */` comments;
124
124
* allows filtering based on selector in `transform` callback, see [example](#how-to-apply-arbitrary-transformations-to-css-properties);
125
+
* adds configurable line breaks via `format: { breakWith: 'lf' }` option;
125
126
126
127
## Constructor options
127
128
@@ -264,6 +265,7 @@ new CleanCSS({
264
265
beforeBlockEnds:false, // controls if a line break comes before a block ends; defaults to `false`
265
266
betweenSelectors:false// controls if a line break comes between selectors; defaults to `false`
266
267
},
268
+
breakWith:'\n', // controls the new line character, can be `'\r\n'` or `'\n'` (aliased as `'windows'` and `'unix'` or `'crlf'` and `'lf'`); defaults to system one, so former on Windows and latter on Unix
267
269
indentBy:0, // controls number of characters to indent with; defaults to `0`
268
270
indentWith:'space', // controls a character to indent with, can be `'space'` or `'tab'`; defaults to `'space'`
0 commit comments