question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

in App.css, i append follow code to it.

:root {
  --distance: 44px;
}

div {margin-top: calc(var(--distance)*-1/2);}

after, run npm run build

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
Summer-andycommented, Nov 23, 2020

stage 4 or 5 is all ok !

0reactions
Summer-andycommented, Dec 3, 2020

But sometimes the following writing method is also needed,

:root {
 --distance: 20px + 20px;
}

or

 calc(var(--distance)*-1/2)

Besides,the underlying parser postcss-values-parser also supports this approach ~

you can see this issue https://github.com/postcss/postcss-custom-properties/issues/161

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when trying to run CSS build in package.json
javascript - Error when trying to run CSS build in package. json - Stack Overflow. Stack Overflow for Teams – Start collaborating and...
Read more >
CSS Compile Error - Material Design for Bootstrap
Hello, I am trying to set the order of SCSS files in my main SCSS file. I'd like to compile in the following...
Read more >
CSS Minimizer error when building react js app - Reddit
I got the following error after updating react-scripts. static/css/main.57ddad44.css from Css Minimizer plugin Error: Unexpected '/'.
Read more >
Nelify build error - HTML/CSS - Code with Mosh Forum
When I try to deploy my website with Netlify, I got this error. opt/build/repo/images/logo.svg: Invalid version: Undefined, when my build ...
Read more >
Photo by Leif Christoph Gottwald on Unsplash - Jian Jye
node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): Error: Node Sass ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found