Browse Source

Use important option in CssRule if specified

pull/4244/head
Artur Arseniev 4 years ago
parent
commit
7e283b501b
  1. 3
      src/css_composer/model/CssRule.js

3
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)) {

Loading…
Cancel
Save