update css, new formatting options

This commit is contained in:
Martin Aeschlimann 2022-04-01 18:07:52 +02:00
parent 290a62d727
commit 2c5c9636a2
No known key found for this signature in database
GPG key ID: 2609A01E695523E3
5 changed files with 32 additions and 11 deletions

View file

@ -13,6 +13,12 @@ export interface CSSFormatConfiguration {
newlineBetweenRules?: boolean;
/** ensure space around selector separators: '>', '+', '~' (e.g. "a>b" -> "a > b"): Default: false */
spaceAroundSelectorSeparator?: boolean;
/** put braces on the same line as rules (`collapse`), or put braces on own line, Allman / ANSI style (`expand`). Default `collapse` */
braceStyle?: 'collapse' | 'expand';
/** whether existing line breaks before elements should be preserved. Default: true */
preserveNewLines?: boolean;
/** maximum number of line breaks to be preserved in one chunk. Default: unlimited */
maxPreserveNewLines?: number;
}
export interface Options {
@ -208,7 +214,10 @@ const optionsDefault: Required<Options> = {
format: {
newlineBetweenSelectors: true,
newlineBetweenRules: true,
spaceAroundSelectorSeparator: false
spaceAroundSelectorSeparator: false,
braceStyle: 'collapse',
maxPreserveNewLines: undefined,
preserveNewLines: true
}
};