Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to use calc in CSS? [closed]

This data from caniuse http://caniuse.com/#feat=calc suggests that practically all browsers now support calc in CSS. Are there any reasons to still avoid using calc for consumer websites? Have any major websites started using calc?

like image 947
Deepak Joy Cheenath Avatar asked Jul 22 '15 15:07

Deepak Joy Cheenath


2 Answers

The official level is Candidate Recommendation for W3C and are descripted in draft document CSS Values and Units Module Level 3

Candidate Recomendation is not like Approved but is very near, so (i think) it 'a choice deeply comforted by the state of the documentation of W3C

like image 187
ScaisEdge Avatar answered Oct 08 '22 01:10

ScaisEdge


IE seems to be the problem as usual but as far as I know, the calc element is fairly safe to use, depending on the units you are using (c.f. 'Known issues' with vw vh).

About Opera Mini, I thought it was now using the Chrome engine, even on iOS (iOS Safari engine is specified for iOS on caniuse). Would someone have more details about this?

EDIT: A very interesting post about this on CSS-Tricks by Chris Coyier.

like image 29
Alexis B. Avatar answered Oct 08 '22 00:10

Alexis B.