calc.json 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. {
  2. "title":"calc() as CSS unit value",
  3. "description":"Method of allowing calculated values for length units, i.e. `width: calc(100% - 3em)`",
  4. "spec":"https://drafts.csswg.org/css-values-3/#calc-notation",
  5. "status":"cr",
  6. "links":[
  7. {
  8. "url":"https://hacks.mozilla.org/2010/06/css3-calc/",
  9. "title":"Mozilla Hacks article"
  10. },
  11. {
  12. "url":"https://developer.mozilla.org/en/docs/Web/CSS/calc",
  13. "title":"MDN Web Docs - calc"
  14. },
  15. {
  16. "url":"https://www.webplatform.org/docs/css/functions/calc",
  17. "title":"WebPlatform Docs"
  18. }
  19. ],
  20. "bugs":[
  21. {
  22. "description":"IE 9 - 11 and Edge do not support `width: calc()` on table cells. [Bug Report](https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10982196/)"
  23. },
  24. {
  25. "description":"IE 9 - 11 don't render `box-shadow` when `calc()` is used for any of the values"
  26. },
  27. {
  28. "description":"IE10 crashes when a div with a property using `calc()` has a child with [same property with inherit](https://stackoverflow.com/questions/19423384/css-less-calc-method-is-crashing-my-ie10)."
  29. },
  30. {
  31. "description":"IE10, IE11, and Edge < 14 don't support using `calc()` inside a `transform`. [Bug report](https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/104773/)"
  32. },
  33. {
  34. "description":"IE11 is reported to have trouble with `calc()` with nested expressions, e.g. `width: calc((100% - 10px) / 3);` (i.e. it rounds differently)"
  35. },
  36. {
  37. "description":"IE11 is reported to not support `calc()` correctly in [generated content](https://stackoverflow.com/questions/31323915/internet-explorer-incorrectly-calculates-percentage-height-for-generated-content)"
  38. },
  39. {
  40. "description":"IE11 does not support transitioning values set with `calc()`"
  41. },
  42. {
  43. "description":"Safari & iOS Safari (both 6 and 7) does not support viewport units (`vw`, `vh`, etc) in `calc()`."
  44. },
  45. {
  46. "description":"IE & Edge are reported to not support calc inside a 'flex'. (Not tested on older versions)\r\nThis example does not work: `flex: 1 1 calc(50% - 20px);`"
  47. },
  48. {
  49. "description":"IE does not support `calc()` on color functions. Example: `color: hsl(calc(60 * 2), 100%, 50%)`."
  50. },
  51. {
  52. "description":"Firefox <48 does not support `calc()` inside the `line-height`, `stroke-width`, `stroke-dashoffset`, and `stroke-dasharray` properties. [Bug report](https://bugzilla.mozilla.org/show_bug.cgi?id=594933)"
  53. },
  54. {
  55. "description":"Firefox <59 does not support `calc()` on color functions. Example: `color: hsl(calc(60 * 2), 100%, 50%)`. [Bug Report](https://bugzilla.mozilla.org/show_bug.cgi?id=984021)"
  56. },
  57. {
  58. "description":"Firefox <66 does not support `width: calc()` on table cells. [Bug Report](https://bugzilla.mozilla.org/show_bug.cgi?id=957915)"
  59. }
  60. ],
  61. "categories":[
  62. "CSS3"
  63. ],
  64. "stats":{
  65. "ie":{
  66. "5.5":"n",
  67. "6":"n",
  68. "7":"n",
  69. "8":"n",
  70. "9":"a #2",
  71. "10":"a #3",
  72. "11":"a #3"
  73. },
  74. "edge":{
  75. "12":"y",
  76. "13":"y",
  77. "14":"y",
  78. "15":"y",
  79. "16":"y",
  80. "17":"y",
  81. "18":"y",
  82. "79":"y",
  83. "80":"y",
  84. "81":"y",
  85. "83":"y",
  86. "84":"y",
  87. "85":"y",
  88. "86":"y"
  89. },
  90. "firefox":{
  91. "2":"n",
  92. "3":"n",
  93. "3.5":"n",
  94. "3.6":"n",
  95. "4":"y x",
  96. "5":"y x",
  97. "6":"y x",
  98. "7":"y x",
  99. "8":"y x",
  100. "9":"y x",
  101. "10":"y x",
  102. "11":"y x",
  103. "12":"y x",
  104. "13":"y x",
  105. "14":"y x",
  106. "15":"y x",
  107. "16":"y",
  108. "17":"y",
  109. "18":"y",
  110. "19":"y",
  111. "20":"y",
  112. "21":"y",
  113. "22":"y",
  114. "23":"y",
  115. "24":"y",
  116. "25":"y",
  117. "26":"y",
  118. "27":"y",
  119. "28":"y",
  120. "29":"y",
  121. "30":"y",
  122. "31":"y",
  123. "32":"y",
  124. "33":"y",
  125. "34":"y",
  126. "35":"y",
  127. "36":"y",
  128. "37":"y",
  129. "38":"y",
  130. "39":"y",
  131. "40":"y",
  132. "41":"y",
  133. "42":"y",
  134. "43":"y",
  135. "44":"y",
  136. "45":"y",
  137. "46":"y",
  138. "47":"y",
  139. "48":"y",
  140. "49":"y",
  141. "50":"y",
  142. "51":"y",
  143. "52":"y",
  144. "53":"y",
  145. "54":"y",
  146. "55":"y",
  147. "56":"y",
  148. "57":"y",
  149. "58":"y",
  150. "59":"y",
  151. "60":"y",
  152. "61":"y",
  153. "62":"y",
  154. "63":"y",
  155. "64":"y",
  156. "65":"y",
  157. "66":"y",
  158. "67":"y",
  159. "68":"y",
  160. "69":"y",
  161. "70":"y",
  162. "71":"y",
  163. "72":"y",
  164. "73":"y",
  165. "74":"y",
  166. "75":"y",
  167. "76":"y",
  168. "77":"y",
  169. "78":"y",
  170. "79":"y",
  171. "80":"y",
  172. "81":"y",
  173. "82":"y",
  174. "83":"y"
  175. },
  176. "chrome":{
  177. "4":"n",
  178. "5":"n",
  179. "6":"n",
  180. "7":"n",
  181. "8":"n",
  182. "9":"n",
  183. "10":"n",
  184. "11":"n",
  185. "12":"n",
  186. "13":"n",
  187. "14":"n",
  188. "15":"n",
  189. "16":"n",
  190. "17":"n",
  191. "18":"n",
  192. "19":"y x",
  193. "20":"y x",
  194. "21":"y x",
  195. "22":"y x",
  196. "23":"y x",
  197. "24":"y x",
  198. "25":"y x",
  199. "26":"y",
  200. "27":"y",
  201. "28":"y",
  202. "29":"y",
  203. "30":"y",
  204. "31":"y",
  205. "32":"y",
  206. "33":"y",
  207. "34":"y",
  208. "35":"y",
  209. "36":"y",
  210. "37":"y",
  211. "38":"y",
  212. "39":"y",
  213. "40":"y",
  214. "41":"y",
  215. "42":"y",
  216. "43":"y",
  217. "44":"y",
  218. "45":"y",
  219. "46":"y",
  220. "47":"y",
  221. "48":"y",
  222. "49":"y",
  223. "50":"y",
  224. "51":"y",
  225. "52":"y",
  226. "53":"y",
  227. "54":"y",
  228. "55":"y",
  229. "56":"y",
  230. "57":"y",
  231. "58":"y",
  232. "59":"y",
  233. "60":"y",
  234. "61":"y",
  235. "62":"y",
  236. "63":"y",
  237. "64":"y",
  238. "65":"y",
  239. "66":"y",
  240. "67":"y",
  241. "68":"y",
  242. "69":"y",
  243. "70":"y",
  244. "71":"y",
  245. "72":"y",
  246. "73":"y",
  247. "74":"y",
  248. "75":"y",
  249. "76":"y",
  250. "77":"y",
  251. "78":"y",
  252. "79":"y",
  253. "80":"y",
  254. "81":"y",
  255. "83":"y",
  256. "84":"y",
  257. "85":"y",
  258. "86":"y",
  259. "87":"y",
  260. "88":"y",
  261. "89":"y"
  262. },
  263. "safari":{
  264. "3.1":"n",
  265. "3.2":"n",
  266. "4":"n",
  267. "5":"n",
  268. "5.1":"n",
  269. "6":"y x",
  270. "6.1":"y",
  271. "7":"y",
  272. "7.1":"y",
  273. "8":"y",
  274. "9":"y",
  275. "9.1":"y",
  276. "10":"y",
  277. "10.1":"y",
  278. "11":"y",
  279. "11.1":"y",
  280. "12":"y",
  281. "12.1":"y",
  282. "13":"y",
  283. "13.1":"y",
  284. "14":"y",
  285. "TP":"y"
  286. },
  287. "opera":{
  288. "9":"n",
  289. "9.5-9.6":"n",
  290. "10.0-10.1":"n",
  291. "10.5":"n",
  292. "10.6":"n",
  293. "11":"n",
  294. "11.1":"n",
  295. "11.5":"n",
  296. "11.6":"n",
  297. "12":"n",
  298. "12.1":"n",
  299. "15":"y",
  300. "16":"y",
  301. "17":"y",
  302. "18":"y",
  303. "19":"y",
  304. "20":"y",
  305. "21":"y",
  306. "22":"y",
  307. "23":"y",
  308. "24":"y",
  309. "25":"y",
  310. "26":"y",
  311. "27":"y",
  312. "28":"y",
  313. "29":"y",
  314. "30":"y",
  315. "31":"y",
  316. "32":"y",
  317. "33":"y",
  318. "34":"y",
  319. "35":"y",
  320. "36":"y",
  321. "37":"y",
  322. "38":"y",
  323. "39":"y",
  324. "40":"y",
  325. "41":"y",
  326. "42":"y",
  327. "43":"y",
  328. "44":"y",
  329. "45":"y",
  330. "46":"y",
  331. "47":"y",
  332. "48":"y",
  333. "49":"y",
  334. "50":"y",
  335. "51":"y",
  336. "52":"y",
  337. "53":"y",
  338. "54":"y",
  339. "55":"y",
  340. "56":"y",
  341. "57":"y",
  342. "58":"y",
  343. "60":"y",
  344. "62":"y",
  345. "63":"y",
  346. "64":"y",
  347. "65":"y",
  348. "66":"y",
  349. "67":"y",
  350. "68":"y",
  351. "69":"y",
  352. "70":"y",
  353. "71":"y"
  354. },
  355. "ios_saf":{
  356. "3.2":"n",
  357. "4.0-4.1":"n",
  358. "4.2-4.3":"n",
  359. "5.0-5.1":"n",
  360. "6.0-6.1":"y x",
  361. "7.0-7.1":"y",
  362. "8":"y",
  363. "8.1-8.4":"y",
  364. "9.0-9.2":"y",
  365. "9.3":"y",
  366. "10.0-10.2":"y",
  367. "10.3":"y",
  368. "11.0-11.2":"y",
  369. "11.3-11.4":"y",
  370. "12.0-12.1":"y",
  371. "12.2-12.4":"y",
  372. "13.0-13.1":"y",
  373. "13.2":"y",
  374. "13.3":"y",
  375. "13.4-13.7":"y",
  376. "14":"y"
  377. },
  378. "op_mini":{
  379. "all":"n"
  380. },
  381. "android":{
  382. "2.1":"n",
  383. "2.2":"n",
  384. "2.3":"n",
  385. "3":"n",
  386. "4":"n",
  387. "4.1":"n",
  388. "4.2-4.3":"n",
  389. "4.4":"a #1",
  390. "4.4.3-4.4.4":"a #1",
  391. "81":"y"
  392. },
  393. "bb":{
  394. "7":"n",
  395. "10":"y"
  396. },
  397. "op_mob":{
  398. "10":"n",
  399. "11":"n",
  400. "11.1":"n",
  401. "11.5":"n",
  402. "12":"n",
  403. "12.1":"n",
  404. "59":"y"
  405. },
  406. "and_chr":{
  407. "85":"y"
  408. },
  409. "and_ff":{
  410. "79":"y"
  411. },
  412. "ie_mob":{
  413. "10":"y",
  414. "11":"y"
  415. },
  416. "and_uc":{
  417. "12.12":"y"
  418. },
  419. "samsung":{
  420. "4":"y",
  421. "5.0-5.4":"y",
  422. "6.2-6.4":"y",
  423. "7.2-7.4":"y",
  424. "8.2":"y",
  425. "9.2":"y",
  426. "10.1":"y",
  427. "11.1-11.2":"y",
  428. "12.0":"y"
  429. },
  430. "and_qq":{
  431. "10.4":"y"
  432. },
  433. "baidu":{
  434. "7.12":"y"
  435. },
  436. "kaios":{
  437. "2.5":"y"
  438. }
  439. },
  440. "notes":"Support can be somewhat emulated in older versions of IE using the non-standard `expression()` syntax.\r\n\r\nDue to the way browsers handle [sub-pixel rounding](https://johnresig.com/blog/sub-pixel-problems-in-css/) differently, layouts using `calc()` expressions may have unexpected results.",
  441. "notes_by_num":{
  442. "1":"Partial support in Android Browser 4.4 refers to the browser lacking the ability to multiply and divide values.",
  443. "2":"Partial support in IE9 refers to the browser crashing when used as a `background-position` value.",
  444. "3":"Partial support in IE10/IE11 refers to calc not working properly with various use cases mentioned in known issues"
  445. },
  446. "usage_perc_y":96.48,
  447. "usage_perc_a":1.55,
  448. "ucprefix":false,
  449. "parent":"",
  450. "keywords":"",
  451. "ie_id":"csscalc",
  452. "chrome_id":"5765241438732288",
  453. "firefox_id":"",
  454. "webkit_id":"",
  455. "shown":true
  456. }