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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

sass: opacity x% becomes 1% on build #5207

Closed
hugollm opened this issue Oct 4, 2020 · 1 comment
Closed

sass: opacity x% becomes 1% on build #5207

hugollm opened this issue Oct 4, 2020 · 1 comment
Labels
鉁栵笍 Non-Parcel bug Bugs related to dependencies or plugins

Comments

@hugollm
Copy link

hugollm commented Oct 4, 2020

馃悰 bug report

When in development mode, opacity: x% works normally, but when building it becomes 1%.

馃帥 Configuration (.babelrc, package.json, cli command)

No .babelrc.
package.json:

{
    "private": true,
    "scripts": {
        "start": "parcel src/index.html",
        "build": "rm -rf dist/* && parcel build src/index.html --no-source-maps"
    },
    "dependencies": {
        "preact": "^10.5.3",
        "true-store": "^0.5.2"
    },
    "devDependencies": {
        "parcel-bundler": "^1.12.4",
        "sass": "^1.26.11"
    }
}

馃 Expected Behavior

  • Ideally: opacity as percentage should work just fine.
  • At least: dev and build should behave consistently.

馃槸 Current Behavior

Opacity percentage becomes 1% upon build. Does not happen when developing (which makes the problem worse).

馃拋 Possible Solution

Not using percentages (e.g. using 0.7 instead of 70%) is the current workaround.

馃敠 Context

Page worked fine during development, but text disappeared on build (because they got changed to opacity 1%).

馃捇 Code Sample

image

馃實 My Environment

npm version: 6.14.8
node version: v10.19.0
parcel version: 1.12.4
sass version: 1.26.11 compiled with dart2js 2.9.3
OS: ubuntu 19.10 (eoan)
@mischnic
Copy link
Member

mischnic commented Oct 4, 2020

This is apparently caused by cssnano, not sass: https://cssnano.co/playground

Follow this issue: cssnano/cssnano#957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
鉁栵笍 Non-Parcel bug Bugs related to dependencies or plugins
Projects
None yet
Development

No branches or pull requests

2 participants