Skip to content

:host-context selectors are being optimized incorrectly in level 2 #1062

@alan-agius4

Description

@alan-agius4

Precheck

  • Do a quick search and make sure a bug has not yet been reported;
  • do a quick check if the bug still exists in the latest patch version;
  • finally, be nice and have fun!

Environment

  • clean-css version - 4.2.1:
  • node.js version - 10.12:
  • operating system: Win32

Configuration options

var CleanCSS = require('clean-css');
new CleanCSS({
    compatibility: 'ie9',
    level: 2,
    format: {
        aroundSelectorRelation: false,
    },
    inline: false,
    returnPromise: true,
    sourceMap: this._options.sourceMap,
});

Input CSS

:host-context(selector selector){
	color: red;
}

Actual output CSS

:host-context(selectorselector){color:red}

Expected output CSS

:host-context(selector selector){color:red}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions