Skip to content

CSS variables inside other functions are incorrectly minified #66

@PrathamSV

Description

@PrathamSV

CSS variables when placed inside other functions (like calc(...)) are incorrectly minified.

That is, calc(100% - var(--gradient-width)) becomes calc(100% - var( - - gradient - width))

In my case,

linear-gradient(
        to right, 
        #000 0%,
        rgba(0,0,0,0.15) var(--gradient-width) calc(100% - var(--gradient-width)),
        #000 100%
    );

gets minified into:

linear-gradient(to right,#000 0%,rgba(0,0,0,0.15) var(--gradient-width) calc(100% - var( - - gradient - width)),#000 100%)

My styles are written in SCSS
And jekyll-minifier version is 0.2.2

For now,

sass:
  style: compressed

jekyll-minifier:
  exclude: "*.css"

provides some compression without the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions