MCPcopy
hub / github.com/less/less.js / genCSS

Method genCSS

packages/less/lib/less/tree/declaration.js:63–75  ·  view source on GitHub ↗

* @param {EvalContext} context * @param {CSSOutput} output

(context, output)

Source from the content-addressed store, hash-verified

61 * @param {CSSOutput} output
62 */
63 genCSS(context, output) {
64 output.add(/** @type {string} */ (this.name) + (context.compress ? ':' : ': '), this.fileInfo(), this.getIndex());
65 try {
66 /** @type {Node} */ (this.value).genCSS(context, output);
67 }
68 catch (e) {
69 const err = /** @type {{ index?: number, filename?: string }} */ (e);
70 err.index = this._index;
71 err.filename = this._fileInfo && this._fileInfo.filename;
72 throw e;
73 }
74 output.add(this.important + ((this.inline || (context.lastRule && context.compress)) ? '' : ';'), this._fileInfo, this._index);
75 }
76
77 /** @param {EvalContext} context */
78 eval(context) {

Callers 1

evalNameFunction · 0.45

Calls 3

addMethod · 0.80
fileInfoMethod · 0.80
getIndexMethod · 0.80

Tested by

no test coverage detected