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 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

@anikethsaha anikethsaha commented Oct 4, 2020

Thanks for the issue

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

@ludofischer
Copy link
Collaborator

@ludofischer ludofischer commented Mar 19, 2021

Fixed in 5.0.0-rc.2

jim60105 added a commit to jim60105/sound-buttons that referenced this issue Apr 2, 2021
這是cssnano的bug,issue: cssnano/cssnano#957
把cssnano升到5.0.0-rc.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants