Skip to content

6 YEARS LEATER!!! YUI Compressor still does not fully respect CSS3’s calc() or clamp() grammar. THE PROJECT IS DEAD. #349

@R-W-C

Description

@R-W-C

Whitespaces which are required (around the plus sign) are not respected.

Valid CSS rule:

body {
    --fontSize: clamp(
    var(--fontSizeReg),
    calc(0.3766rem + 1.2987vw),
    var(--maxFontSizeReg)
    );
}

or

body { --fontSize: clamp(var(--fontSizeReg), calc(0.3766rem + 1.2987vw), var(--maxFontSizeReg) ); }

Actual result after minifying:

body{--fontSize:clamp(var(--fontSizeReg),calc(0.3766rem+1.2987vw),var(--maxFontSizeReg));}

Expected result after minifying:

body{--fontSize:clamp(var(--fontSizeReg),calc(0.3766rem + 1.2987vw),var(--maxFontSizeReg));}

Note the required missing spaces around the plus sign in the actual result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions