calc.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  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://w3c.github.io/csswg-drafts/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://webplatform.github.io/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://web.archive.org/web/20171123043312/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. "87":"y",
  90. "88":"y",
  91. "89":"y",
  92. "90":"y",
  93. "91":"y",
  94. "92":"y",
  95. "93":"y",
  96. "94":"y",
  97. "95":"y",
  98. "96":"y",
  99. "97":"y",
  100. "98":"y",
  101. "99":"y",
  102. "100":"y",
  103. "101":"y",
  104. "102":"y",
  105. "103":"y",
  106. "104":"y",
  107. "105":"y",
  108. "106":"y",
  109. "107":"y",
  110. "108":"y",
  111. "109":"y",
  112. "110":"y",
  113. "111":"y",
  114. "112":"y",
  115. "113":"y",
  116. "114":"y",
  117. "115":"y",
  118. "116":"y",
  119. "117":"y",
  120. "118":"y",
  121. "119":"y",
  122. "120":"y"
  123. },
  124. "firefox":{
  125. "2":"n",
  126. "3":"n",
  127. "3.5":"n",
  128. "3.6":"n",
  129. "4":"y x",
  130. "5":"y x",
  131. "6":"y x",
  132. "7":"y x",
  133. "8":"y x",
  134. "9":"y x",
  135. "10":"y x",
  136. "11":"y x",
  137. "12":"y x",
  138. "13":"y x",
  139. "14":"y x",
  140. "15":"y x",
  141. "16":"y",
  142. "17":"y",
  143. "18":"y",
  144. "19":"y",
  145. "20":"y",
  146. "21":"y",
  147. "22":"y",
  148. "23":"y",
  149. "24":"y",
  150. "25":"y",
  151. "26":"y",
  152. "27":"y",
  153. "28":"y",
  154. "29":"y",
  155. "30":"y",
  156. "31":"y",
  157. "32":"y",
  158. "33":"y",
  159. "34":"y",
  160. "35":"y",
  161. "36":"y",
  162. "37":"y",
  163. "38":"y",
  164. "39":"y",
  165. "40":"y",
  166. "41":"y",
  167. "42":"y",
  168. "43":"y",
  169. "44":"y",
  170. "45":"y",
  171. "46":"y",
  172. "47":"y",
  173. "48":"y",
  174. "49":"y",
  175. "50":"y",
  176. "51":"y",
  177. "52":"y",
  178. "53":"y",
  179. "54":"y",
  180. "55":"y",
  181. "56":"y",
  182. "57":"y",
  183. "58":"y",
  184. "59":"y",
  185. "60":"y",
  186. "61":"y",
  187. "62":"y",
  188. "63":"y",
  189. "64":"y",
  190. "65":"y",
  191. "66":"y",
  192. "67":"y",
  193. "68":"y",
  194. "69":"y",
  195. "70":"y",
  196. "71":"y",
  197. "72":"y",
  198. "73":"y",
  199. "74":"y",
  200. "75":"y",
  201. "76":"y",
  202. "77":"y",
  203. "78":"y",
  204. "79":"y",
  205. "80":"y",
  206. "81":"y",
  207. "82":"y",
  208. "83":"y",
  209. "84":"y",
  210. "85":"y",
  211. "86":"y",
  212. "87":"y",
  213. "88":"y",
  214. "89":"y",
  215. "90":"y",
  216. "91":"y",
  217. "92":"y",
  218. "93":"y",
  219. "94":"y",
  220. "95":"y",
  221. "96":"y",
  222. "97":"y",
  223. "98":"y",
  224. "99":"y",
  225. "100":"y",
  226. "101":"y",
  227. "102":"y",
  228. "103":"y",
  229. "104":"y",
  230. "105":"y",
  231. "106":"y",
  232. "107":"y",
  233. "108":"y",
  234. "109":"y",
  235. "110":"y",
  236. "111":"y",
  237. "112":"y",
  238. "113":"y",
  239. "114":"y",
  240. "115":"y",
  241. "116":"y",
  242. "117":"y",
  243. "118":"y",
  244. "119":"y",
  245. "120":"y",
  246. "121":"y",
  247. "122":"y",
  248. "123":"y"
  249. },
  250. "chrome":{
  251. "4":"n",
  252. "5":"n",
  253. "6":"n",
  254. "7":"n",
  255. "8":"n",
  256. "9":"n",
  257. "10":"n",
  258. "11":"n",
  259. "12":"n",
  260. "13":"n",
  261. "14":"n",
  262. "15":"n",
  263. "16":"n",
  264. "17":"n",
  265. "18":"n",
  266. "19":"y x",
  267. "20":"y x",
  268. "21":"y x",
  269. "22":"y x",
  270. "23":"y x",
  271. "24":"y x",
  272. "25":"y x",
  273. "26":"y",
  274. "27":"y",
  275. "28":"y",
  276. "29":"y",
  277. "30":"y",
  278. "31":"y",
  279. "32":"y",
  280. "33":"y",
  281. "34":"y",
  282. "35":"y",
  283. "36":"y",
  284. "37":"y",
  285. "38":"y",
  286. "39":"y",
  287. "40":"y",
  288. "41":"y",
  289. "42":"y",
  290. "43":"y",
  291. "44":"y",
  292. "45":"y",
  293. "46":"y",
  294. "47":"y",
  295. "48":"y",
  296. "49":"y",
  297. "50":"y",
  298. "51":"y",
  299. "52":"y",
  300. "53":"y",
  301. "54":"y",
  302. "55":"y",
  303. "56":"y",
  304. "57":"y",
  305. "58":"y",
  306. "59":"y",
  307. "60":"y",
  308. "61":"y",
  309. "62":"y",
  310. "63":"y",
  311. "64":"y",
  312. "65":"y",
  313. "66":"y",
  314. "67":"y",
  315. "68":"y",
  316. "69":"y",
  317. "70":"y",
  318. "71":"y",
  319. "72":"y",
  320. "73":"y",
  321. "74":"y",
  322. "75":"y",
  323. "76":"y",
  324. "77":"y",
  325. "78":"y",
  326. "79":"y",
  327. "80":"y",
  328. "81":"y",
  329. "83":"y",
  330. "84":"y",
  331. "85":"y",
  332. "86":"y",
  333. "87":"y",
  334. "88":"y",
  335. "89":"y",
  336. "90":"y",
  337. "91":"y",
  338. "92":"y",
  339. "93":"y",
  340. "94":"y",
  341. "95":"y",
  342. "96":"y",
  343. "97":"y",
  344. "98":"y",
  345. "99":"y",
  346. "100":"y",
  347. "101":"y",
  348. "102":"y",
  349. "103":"y",
  350. "104":"y",
  351. "105":"y",
  352. "106":"y",
  353. "107":"y",
  354. "108":"y",
  355. "109":"y",
  356. "110":"y",
  357. "111":"y",
  358. "112":"y",
  359. "113":"y",
  360. "114":"y",
  361. "115":"y",
  362. "116":"y",
  363. "117":"y",
  364. "118":"y",
  365. "119":"y",
  366. "120":"y",
  367. "121":"y",
  368. "122":"y",
  369. "123":"y"
  370. },
  371. "safari":{
  372. "3.1":"n",
  373. "3.2":"n",
  374. "4":"n",
  375. "5":"n",
  376. "5.1":"n",
  377. "6":"y x",
  378. "6.1":"y",
  379. "7":"y",
  380. "7.1":"y",
  381. "8":"y",
  382. "9":"y",
  383. "9.1":"y",
  384. "10":"y",
  385. "10.1":"y",
  386. "11":"y",
  387. "11.1":"y",
  388. "12":"y",
  389. "12.1":"y",
  390. "13":"y",
  391. "13.1":"y",
  392. "14":"y",
  393. "14.1":"y",
  394. "15":"y",
  395. "15.1":"y",
  396. "15.2-15.3":"y",
  397. "15.4":"y",
  398. "15.5":"y",
  399. "15.6":"y",
  400. "16.0":"y",
  401. "16.1":"y",
  402. "16.2":"y",
  403. "16.3":"y",
  404. "16.4":"y",
  405. "16.5":"y",
  406. "16.6":"y",
  407. "17.0":"y",
  408. "17.1":"y",
  409. "17.2":"y",
  410. "TP":"y"
  411. },
  412. "opera":{
  413. "9":"n",
  414. "9.5-9.6":"n",
  415. "10.0-10.1":"n",
  416. "10.5":"n",
  417. "10.6":"n",
  418. "11":"n",
  419. "11.1":"n",
  420. "11.5":"n",
  421. "11.6":"n",
  422. "12":"n",
  423. "12.1":"n",
  424. "15":"y",
  425. "16":"y",
  426. "17":"y",
  427. "18":"y",
  428. "19":"y",
  429. "20":"y",
  430. "21":"y",
  431. "22":"y",
  432. "23":"y",
  433. "24":"y",
  434. "25":"y",
  435. "26":"y",
  436. "27":"y",
  437. "28":"y",
  438. "29":"y",
  439. "30":"y",
  440. "31":"y",
  441. "32":"y",
  442. "33":"y",
  443. "34":"y",
  444. "35":"y",
  445. "36":"y",
  446. "37":"y",
  447. "38":"y",
  448. "39":"y",
  449. "40":"y",
  450. "41":"y",
  451. "42":"y",
  452. "43":"y",
  453. "44":"y",
  454. "45":"y",
  455. "46":"y",
  456. "47":"y",
  457. "48":"y",
  458. "49":"y",
  459. "50":"y",
  460. "51":"y",
  461. "52":"y",
  462. "53":"y",
  463. "54":"y",
  464. "55":"y",
  465. "56":"y",
  466. "57":"y",
  467. "58":"y",
  468. "60":"y",
  469. "62":"y",
  470. "63":"y",
  471. "64":"y",
  472. "65":"y",
  473. "66":"y",
  474. "67":"y",
  475. "68":"y",
  476. "69":"y",
  477. "70":"y",
  478. "71":"y",
  479. "72":"y",
  480. "73":"y",
  481. "74":"y",
  482. "75":"y",
  483. "76":"y",
  484. "77":"y",
  485. "78":"y",
  486. "79":"y",
  487. "80":"y",
  488. "81":"y",
  489. "82":"y",
  490. "83":"y",
  491. "84":"y",
  492. "85":"y",
  493. "86":"y",
  494. "87":"y",
  495. "88":"y",
  496. "89":"y",
  497. "90":"y",
  498. "91":"y",
  499. "92":"y",
  500. "93":"y",
  501. "94":"y",
  502. "95":"y",
  503. "96":"y",
  504. "97":"y",
  505. "98":"y",
  506. "99":"y",
  507. "100":"y",
  508. "101":"y",
  509. "102":"y",
  510. "103":"y",
  511. "104":"y"
  512. },
  513. "ios_saf":{
  514. "3.2":"n",
  515. "4.0-4.1":"n",
  516. "4.2-4.3":"n",
  517. "5.0-5.1":"n",
  518. "6.0-6.1":"y x",
  519. "7.0-7.1":"y",
  520. "8":"y",
  521. "8.1-8.4":"y",
  522. "9.0-9.2":"y",
  523. "9.3":"y",
  524. "10.0-10.2":"y",
  525. "10.3":"y",
  526. "11.0-11.2":"y",
  527. "11.3-11.4":"y",
  528. "12.0-12.1":"y",
  529. "12.2-12.5":"y",
  530. "13.0-13.1":"y",
  531. "13.2":"y",
  532. "13.3":"y",
  533. "13.4-13.7":"y",
  534. "14.0-14.4":"y",
  535. "14.5-14.8":"y",
  536. "15.0-15.1":"y",
  537. "15.2-15.3":"y",
  538. "15.4":"y",
  539. "15.5":"y",
  540. "15.6-15.7":"y",
  541. "16.0":"y",
  542. "16.1":"y",
  543. "16.2":"y",
  544. "16.3":"y",
  545. "16.4":"y",
  546. "16.5":"y",
  547. "16.6-16.7":"y",
  548. "17.0":"y",
  549. "17.1":"y",
  550. "17.2":"y"
  551. },
  552. "op_mini":{
  553. "all":"n"
  554. },
  555. "android":{
  556. "2.1":"n",
  557. "2.2":"n",
  558. "2.3":"n",
  559. "3":"n",
  560. "4":"n",
  561. "4.1":"n",
  562. "4.2-4.3":"n",
  563. "4.4":"a #1",
  564. "4.4.3-4.4.4":"a #1",
  565. "119":"y"
  566. },
  567. "bb":{
  568. "7":"n",
  569. "10":"y"
  570. },
  571. "op_mob":{
  572. "10":"n",
  573. "11":"n",
  574. "11.1":"n",
  575. "11.5":"n",
  576. "12":"n",
  577. "12.1":"n",
  578. "73":"y"
  579. },
  580. "and_chr":{
  581. "119":"y"
  582. },
  583. "and_ff":{
  584. "119":"y"
  585. },
  586. "ie_mob":{
  587. "10":"y",
  588. "11":"y"
  589. },
  590. "and_uc":{
  591. "15.5":"y"
  592. },
  593. "samsung":{
  594. "4":"y",
  595. "5.0-5.4":"y",
  596. "6.2-6.4":"y",
  597. "7.2-7.4":"y",
  598. "8.2":"y",
  599. "9.2":"y",
  600. "10.1":"y",
  601. "11.1-11.2":"y",
  602. "12.0":"y",
  603. "13.0":"y",
  604. "14.0":"y",
  605. "15.0":"y",
  606. "16.0":"y",
  607. "17.0":"y",
  608. "18.0":"y",
  609. "19.0":"y",
  610. "20":"y",
  611. "21":"y",
  612. "22":"y",
  613. "23":"y"
  614. },
  615. "and_qq":{
  616. "13.1":"y"
  617. },
  618. "baidu":{
  619. "13.18":"y"
  620. },
  621. "kaios":{
  622. "2.5":"y",
  623. "3.0-3.1":"y"
  624. }
  625. },
  626. "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.",
  627. "notes_by_num":{
  628. "1":"Partial support in Android Browser 4.4 refers to the browser lacking the ability to multiply and divide values.",
  629. "2":"Partial support in IE9 refers to the browser crashing when used as a `background-position` value.",
  630. "3":"Partial support in IE10/IE11 refers to calc not working properly with various use cases mentioned in known issues"
  631. },
  632. "usage_perc_y":97.7,
  633. "usage_perc_a":0.43,
  634. "ucprefix":false,
  635. "parent":"",
  636. "keywords":"",
  637. "chrome_id":"5765241438732288",
  638. "shown":true
  639. }