Skip to content

[css-less-sass] css.lint.zeroUnits warns "No unit for zero needed" inside calc function #46997

Closed

Description

@a2d
  • VSCode Version: 1.21.1
  • OS Version: Windows 7

Steps to Reproduce:

  1. Set "css.lint.zeroUnits": "warning" in settings.json
  2. Create CSS rule with calc function to produce a negative pixel value e.g. top: calc(0px - 10vw)
  3. VS Code suggests that you can remove the px unit

The px unit is needed to coerce the result into a pixel value. Suggest ignore/drop warning for 0+value within calc functions.
Guessing will also affect LESS or SASS usage of calc even with escaping or interpolation.

Activity

  1. added
    css-less-scss
    on Mar 30, 2018
  2. added
    bug
    on Apr 3, 2018
  3. locked and limited conversation to collaborators on Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcss-less-scssverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions