Questions tagged [calc]

calc refers to anything remotely related to anything about calculating anything. Because of its vague purpose, it should be avoided.

refers to anything remotely related to anything about calculating anything. Because of its vague purpose, it should be avoided.

383 questions
7
votes
5 answers

css calc number division

If I use a calculator, 2/3 is 0.6666666667 which is about 67%. However if I try to do the same thing with css calc I get an error. width: calc(2 / 3); Is there a working way for this? I don't think it looks that good writing it like 0.666666666667.…
Jens Törnell
  • 18,167
  • 36
  • 100
  • 168
7
votes
1 answer

using modernizr to detect vh, vw with calc

So I have run into a problem where a browser is compatible with vh, vw units and is compatible with calc(), BUT is not compatible with vh,vw units in calc. So I'm not sure how to use modernizr to test for that specific case. Any ideas for this? …
loriensleafs
  • 2,015
  • 9
  • 32
  • 69
7
votes
2 answers

Libreoffice Calc: Custom x axis label

I am trying to create a diagram in Libreoffice calc, where the x axis labels shall be intervals and the y axis labels shall be shown in percentage. My table looks like this: 0-40 100% 40-70 96% 70-100 92% 100-130 84% >130 …
user1851182
  • 73
  • 1
  • 1
  • 3
6
votes
3 answers

Are there OpenOffice.org export components for Delphi (non-OLE)?

For document exchange, I would like to generate OpenOffice.org text and spreadsheet documents. So far I have found export components which require OpenOffice to be installed, using OLE. Are there already Delphi components available which can write…
mjn
  • 35,561
  • 24
  • 160
  • 351
6
votes
1 answer

flex doesn't support calc in IE11

I am attempting to create a layout using Flexbox. In one of these layouts, I want 3 equal width columns. To accomplish this I am using calc to set the column width. This is working fine in modern browsers, but of course in IE it doesn't want to…
user13286
  • 2,527
  • 6
  • 34
  • 70
6
votes
1 answer

CSS - Can I use an object's Width in Calc()?

I want something like this: height: calc(width + 5px); This is just a small example but I'm ultimately looking for a way to use the set width as a part of the calculation, not a simpler way to solve the example. Any searches I do just gives…
Austin Griner
  • 89
  • 2
  • 5
6
votes
1 answer

calc() not working in Firefox

I am trying to use calc() to get my page contents to fit on the page perfectly. I have a header with a height of 52px. I am trying to make a container 100% of the page -50px to it fits onto the page perfectly, however as it does work in Chrome,…
user7736094
  • 193
  • 2
  • 8
6
votes
2 answers

css element height minus height of a element with changing height

aye folks! is it possible to have dynamic height calculation with css3? i couldn't find anything.. but maybe i'm just using the wrong terms for my search. the problem: i have a site where i want to include an iframe with 100% height minus the height…
Andreas Grafen
  • 95
  • 1
  • 2
  • 8
6
votes
2 answers

Using an org-mode table in emacs to convert units using calc

Is there a way to use an org-mode table to do automatic unit conversion? I cannot get it to work. What I wanted to do is using a simple table where i can input some weights in ounces and let emacs convert them into…
Moschter
  • 63
  • 3
6
votes
0 answers

Bug Using calc() On Table Cells in Safari 9

I can't find any information about this bug, but it looks like a pretty serious one. When using calc() and mixing percentage and absolute values to set the width of a in a table with table-layout:fixed, Safari 9 calculates the value as -2px. It…
Undistraction
  • 38,727
  • 46
  • 165
  • 296
6
votes
4 answers

How to use multiple variables Stylus in calc()?

Everything is in the title. I can not incorporate several Stylus variables in the function CSS calc (). I created a code Sass, I would convert myself under Stylus: // *.scss $gutter : 1rem; .sizeXS-m10 { width: calc(#{100% / 12 * 10} -…
Olivier C
  • 733
  • 9
  • 13
5
votes
3 answers

Using calc() with env(safe-area-inset)

I am wanting to use env(safe-area-inset-bottom) to add margin-bottom to an element, but only when the device is an iPhone X. However, the margin added using env(safe-area-inset-bottom) does not add enough to my liking, and I wish to add an…
awebdev
  • 647
  • 1
  • 5
  • 21
5
votes
3 answers

disable overwriting calc() in sass

In SASS my Calculation looks like calc(50% - 375px); But when it compiles the CSS output looks like that: calc(-325%), which is obviously not what I had in mind. How can I force SASS to not do the maths (50% - 375px)? Thank you for your help!
rvbdv
  • 51
  • 2
5
votes
2 answers

Make variable value negaitve

I am trying to figure out a way to make a variable negative. I have attempted right: calc(0-var(--skyve-bredde)); bit it did not work. This is the variable: #drawer, #burger{ --skyve-lengde:50%; } The value will be used in right and width…
5
votes
2 answers

How to completely erase Emacs Calc's state?

This has got to be a stupid simple question, but I haven't been able to find an answer despite searching Google multiple times in multiple ways, and digging through the Calc documentation. GIVEN an instance of Emacs, with Calc running, and having…
EdwinW
  • 987
  • 2
  • 12
  • 32
1
2
3
25 26