Skip to content

[Bug]: CSS unit stripped after build in thelinear() timing function causes it to break #1719

@cernymatej

Description

@cernymatej

Describe the bug

I noticed that after transformation, the % unit in CSS gets stripped from all values that are 0, which causes the linear() timing function to break, because it always expects a percentage on the right side.

.example {
  transition-timing-function: linear(0 0%, 1 100%);
}
Image

Expected behaviour

I would expect it to either keep the 0% or transform the argument to a single 0 -> linear(0, 1 100%)

Steps to reproduce

transform the following code and see that the % unit gets stripped

.example {
  transition-timing-function: linear(0 0%, 1 100%);
}

Version

7.1.0

Preset

(no preset)

Environment

System:
    OS: macOS 15.6
    CPU: (12) arm64 Apple M2 Max
    Memory: 1.12 GB / 96.00 GB
    Shell: 5.9 - /bin/zsh

Package details

nuxt 4.0.3
└─┬ @nuxt/vite-builder 4.0.3
  └── cssnano 7.1.0

Additional context

Following up nuxt/nuxt#33014

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