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.

Hi!

I got some weird results with calc.

Version

1.0.11

Steps to reproduce

const DoubleInputContainer = styled.div`
  margin-bottom: calc(15px - 0.5rem) !important;
`

Expected Behavior

margin-bottom: calc(15px - 0.5rem) !important;

Actual Behavior (Chrome console)

margin-bottom: calc(15px - 0.5rem); /* !important is missing */
marginBottom: -webkit-calc(15px - 0.5rem) !important; /* marginBottom is not valid */

Thanks for the help!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

14reactions
geelencommented, Nov 16, 2016

8reactions
geelencommented, Nov 16, 2016

Fixed this and added a test case for calc() in #208

Read more comments on GitHub >

github_iconTop Results From Across the Web

calc() - CSS: Cascading Style Sheets - MDN Web Docs
The calc() CSS function lets you perform calculations when specifying CSS property values. It can be used with , , , , ,...
Read more >
CSS calc() function - W3Schools
The calc() function performs a calculation to be used as the property value. Version: CSS3. Browser Support. The numbers in the table specify...
Read more >
A Complete Guide to calc() in CSS
calc () is a native CSS way to do simple math right in CSS as a replacement for any length value (or pretty...
Read more >
How and when to use CSS calc(): Tutorial with examples
The calc() function allows you to perform computations when specifying CSS property values. It's especially useful for calculating length, ...
Read more >
CSS | calc() Function - GeeksforGeeks
The calc() function is an inbuilt function in CSS which is used to perform calculations based on CSS property. Syntax: calc( Expression )....
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