M
M
mishapsv2018-04-20 16:31:04
css
mishapsv, 2018-04-20 16:31:04

Why doesn't calc work in firefox for spreadsheets?

Made an example:
https://codepen.io/anon/pen/erNGNN
If you open it in Chrome, the columns have different proportions, as intended.
But in Firefox, calc is ignored, the columns are the same width.
Couldn't google a working solution. Maybe someone came across?
Solution: calc in Firefox for table columns does not work. But it can be considered a preprocessor

$numCol: 10 //number of columns
$x1: 100%/$numCol*1
$x2: 100%/$numCol*2
$x5: 100%/$numCol*5

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Fedoryan, 2018-04-20
@AnnTHony

caniuse.com :

  • Firefox does not support width: calc()on table cells.
  • Firefox <48 does not support calc()inside the line-height, stroke-width, stroke-dashoffset, and stroke-dasharrayproperties.
  • Firefox does not support calc()on color functions. Example: color: hsl(calc(60 * 2), 100%, 50%).

V
Vadim Belkin, 2018-04-20
@BelkinVadim

If you believe this dock calc() , then in FF it processes as they have described in notes about tables

Note : Math expressions involving percentages for widths and heights on table columns, table column groups, table rows, table row groups, and table cells in both auto and fixed layout tables may be treated as if auto had been specified.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question