@pnp/spfx-property-controls
Version:
Reusable property pane controls for SharePoint Framework solutions
61 lines (59 loc) • 1.76 kB
TypeScript
/**
* Helper class to format the CSS code.
* Based on code initially developed by: http://jsbeautifier.org/
*
* Usage:
css_beautify(source_text);
css_beautify(source_text, options);
The options are (default in brackets):
indent_size (4) - indentation size,
indent_char (space) - character to indent with,
selector_separator_newline (true) - separate selectors with newline or
not (e.g. "a,\nbr" or "a, br")
end_with_newline (false) - end with a newline
e.g:
css_beautify(css_source_text, {
'indent_size': 1,
'indent_char': '\t',
'selector_separator': ' ',
'end_with_newline': false,
});
*/
type CSSBeautifyOptions = {
indent_size?: number;
indent_char?: string;
selector_separator?: string;
end_with_newline?: boolean;
selector_separator_newline?: boolean;
};
export declare class CSSFormatter {
private ch;
private pos;
private source_text;
private whiteRe;
private indentSize;
private indentString;
private singleIndent;
private indentLevel;
private nestedLevel;
private output;
private print;
private cssBeautifyNestedAtRule;
private cssBeautifyConditionalGroupRule;
private next;
private peek;
private eatString;
private eatWhitespace;
private skipWhitespace;
private eatComment;
private lookBack;
private isCommentOnLine;
private indent;
private outdent;
private lastCharWhitespace;
private newLine;
private singleSpace;
css_beautify(sourceText: string, options: CSSBeautifyOptions): string;
}
export {};
//# sourceMappingURL=CSSFormatter.d.ts.map