Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] : Percent value is converted to a different value #957

Closed
mischnic opened this issue Oct 4, 2020 · 2 comments
Closed

[Bug] : Percent value is converted to a different value #957

mischnic opened this issue Oct 4, 2020 · 2 comments
Labels
Milestone

Comments

@mischnic
Copy link

mischnic commented Oct 4, 2020

Describe the bug
70% is minified into 1%

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://cssnano.co/playground/
  2. Insert body { opacity: 70%; } on the left
  3. "Run"
  4. See incorrect result

Input

body {opacity: 70%;}

Current behaviour

body{opacity:1%}

Expected behavior

body{opacity:70%}

Desktop (please complete the following information):

  • cssnano: 4.1.10
  • cssnano-preset-default: 4.0.7
  • postcss-convert-values 4.0.1

Additional context
This seems to be fixed by using this config:

module.exports = {
	preset: [
		"default",
		{
			convertValues: false,
		},
	],
};
@anikethsaha
Copy link
Member

Thanks for the issue

This has been fixed in master.
It will be released soon.
Till then use cssnano@nightly

@ludofischer
Copy link
Collaborator

Fixed in 5.0.0-rc.2

jim60105 added a commit to sound-buttons/sound-buttons that referenced this issue Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants