From 7e283b501b2ac9c83186a6193baf2cdb21bbdf76 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 5 Apr 2022 12:09:18 +0200 Subject: [PATCH] Use important option in CssRule if specified --- src/css_composer/model/CssRule.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/css_composer/model/CssRule.js b/src/css_composer/model/CssRule.js index d5534bc96..2beb24c40 100644 --- a/src/css_composer/model/CssRule.js +++ b/src/css_composer/model/CssRule.js @@ -141,8 +141,9 @@ export default class CssRule extends Model.extend(Styleable) { */ getDeclaration(opts = {}) { let result = ''; + const { important } = this.attributes; const selectors = this.selectorsToString(opts); - const style = this.styleToString(opts); + const style = this.styleToString({ important, ...opts }); const singleAtRule = this.get('singleAtRule'); if ((selectors || singleAtRule) && (style || opts.allowEmpty)) {