calc.json 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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://www.w3.org/TR/css3-values/#calc",
  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 does not support `width: calc()` on table cells. [Bug Report](https://bugzilla.mozilla.org/show_bug.cgi?id=1297576)"
  56. },
  57. {
  58. "description":"Firefox 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)"
  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. "76":"y"
  83. },
  84. "firefox":{
  85. "2":"n",
  86. "3":"n",
  87. "3.5":"n",
  88. "3.6":"n",
  89. "4":"y x",
  90. "5":"y x",
  91. "6":"y x",
  92. "7":"y x",
  93. "8":"y x",
  94. "9":"y x",
  95. "10":"y x",
  96. "11":"y x",
  97. "12":"y x",
  98. "13":"y x",
  99. "14":"y x",
  100. "15":"y x",
  101. "16":"y",
  102. "17":"y",
  103. "18":"y",
  104. "19":"y",
  105. "20":"y",
  106. "21":"y",
  107. "22":"y",
  108. "23":"y",
  109. "24":"y",
  110. "25":"y",
  111. "26":"y",
  112. "27":"y",
  113. "28":"y",
  114. "29":"y",
  115. "30":"y",
  116. "31":"y",
  117. "32":"y",
  118. "33":"y",
  119. "34":"y",
  120. "35":"y",
  121. "36":"y",
  122. "37":"y",
  123. "38":"y",
  124. "39":"y",
  125. "40":"y",
  126. "41":"y",
  127. "42":"y",
  128. "43":"y",
  129. "44":"y",
  130. "45":"y",
  131. "46":"y",
  132. "47":"y",
  133. "48":"y",
  134. "49":"y",
  135. "50":"y",
  136. "51":"y",
  137. "52":"y",
  138. "53":"y",
  139. "54":"y",
  140. "55":"y",
  141. "56":"y",
  142. "57":"y",
  143. "58":"y",
  144. "59":"y",
  145. "60":"y",
  146. "61":"y",
  147. "62":"y",
  148. "63":"y",
  149. "64":"y",
  150. "65":"y",
  151. "66":"y",
  152. "67":"y",
  153. "68":"y",
  154. "69":"y",
  155. "70":"y",
  156. "71":"y"
  157. },
  158. "chrome":{
  159. "4":"n",
  160. "5":"n",
  161. "6":"n",
  162. "7":"n",
  163. "8":"n",
  164. "9":"n",
  165. "10":"n",
  166. "11":"n",
  167. "12":"n",
  168. "13":"n",
  169. "14":"n",
  170. "15":"n",
  171. "16":"n",
  172. "17":"n",
  173. "18":"n",
  174. "19":"y x",
  175. "20":"y x",
  176. "21":"y x",
  177. "22":"y x",
  178. "23":"y x",
  179. "24":"y x",
  180. "25":"y x",
  181. "26":"y",
  182. "27":"y",
  183. "28":"y",
  184. "29":"y",
  185. "30":"y",
  186. "31":"y",
  187. "32":"y",
  188. "33":"y",
  189. "34":"y",
  190. "35":"y",
  191. "36":"y",
  192. "37":"y",
  193. "38":"y",
  194. "39":"y",
  195. "40":"y",
  196. "41":"y",
  197. "42":"y",
  198. "43":"y",
  199. "44":"y",
  200. "45":"y",
  201. "46":"y",
  202. "47":"y",
  203. "48":"y",
  204. "49":"y",
  205. "50":"y",
  206. "51":"y",
  207. "52":"y",
  208. "53":"y",
  209. "54":"y",
  210. "55":"y",
  211. "56":"y",
  212. "57":"y",
  213. "58":"y",
  214. "59":"y",
  215. "60":"y",
  216. "61":"y",
  217. "62":"y",
  218. "63":"y",
  219. "64":"y",
  220. "65":"y",
  221. "66":"y",
  222. "67":"y",
  223. "68":"y",
  224. "69":"y",
  225. "70":"y",
  226. "71":"y",
  227. "72":"y",
  228. "73":"y",
  229. "74":"y",
  230. "75":"y",
  231. "76":"y",
  232. "77":"y",
  233. "78":"y",
  234. "79":"y"
  235. },
  236. "safari":{
  237. "3.1":"n",
  238. "3.2":"n",
  239. "4":"n",
  240. "5":"n",
  241. "5.1":"n",
  242. "6":"y x",
  243. "6.1":"y",
  244. "7":"y",
  245. "7.1":"y",
  246. "8":"y",
  247. "9":"y",
  248. "9.1":"y",
  249. "10":"y",
  250. "10.1":"y",
  251. "11":"y",
  252. "11.1":"y",
  253. "12":"y",
  254. "12.1":"y",
  255. "13":"y",
  256. "TP":"y"
  257. },
  258. "opera":{
  259. "9":"n",
  260. "9.5-9.6":"n",
  261. "10.0-10.1":"n",
  262. "10.5":"n",
  263. "10.6":"n",
  264. "11":"n",
  265. "11.1":"n",
  266. "11.5":"n",
  267. "11.6":"n",
  268. "12":"n",
  269. "12.1":"n",
  270. "15":"y",
  271. "16":"y",
  272. "17":"y",
  273. "18":"y",
  274. "19":"y",
  275. "20":"y",
  276. "21":"y",
  277. "22":"y",
  278. "23":"y",
  279. "24":"y",
  280. "25":"y",
  281. "26":"y",
  282. "27":"y",
  283. "28":"y",
  284. "29":"y",
  285. "30":"y",
  286. "31":"y",
  287. "32":"y",
  288. "33":"y",
  289. "34":"y",
  290. "35":"y",
  291. "36":"y",
  292. "37":"y",
  293. "38":"y",
  294. "39":"y",
  295. "40":"y",
  296. "41":"y",
  297. "42":"y",
  298. "43":"y",
  299. "44":"y",
  300. "45":"y",
  301. "46":"y",
  302. "47":"y",
  303. "48":"y",
  304. "49":"y",
  305. "50":"y",
  306. "51":"y",
  307. "52":"y",
  308. "53":"y",
  309. "54":"y",
  310. "55":"y",
  311. "56":"y",
  312. "57":"y",
  313. "58":"y",
  314. "60":"y",
  315. "62":"y"
  316. },
  317. "ios_saf":{
  318. "3.2":"n",
  319. "4.0-4.1":"n",
  320. "4.2-4.3":"n",
  321. "5.0-5.1":"n",
  322. "6.0-6.1":"y x",
  323. "7.0-7.1":"y",
  324. "8":"y",
  325. "8.1-8.4":"y",
  326. "9.0-9.2":"y",
  327. "9.3":"y",
  328. "10.0-10.2":"y",
  329. "10.3":"y",
  330. "11.0-11.2":"y",
  331. "11.3-11.4":"y",
  332. "12.0-12.1":"y",
  333. "12.2-12.3":"y",
  334. "13":"y"
  335. },
  336. "op_mini":{
  337. "all":"n"
  338. },
  339. "android":{
  340. "2.1":"n",
  341. "2.2":"n",
  342. "2.3":"n",
  343. "3":"n",
  344. "4":"n",
  345. "4.1":"n",
  346. "4.2-4.3":"n",
  347. "4.4":"a #1",
  348. "4.4.3-4.4.4":"a #1",
  349. "67":"y"
  350. },
  351. "bb":{
  352. "7":"n",
  353. "10":"y"
  354. },
  355. "op_mob":{
  356. "10":"n",
  357. "11":"n",
  358. "11.1":"n",
  359. "11.5":"n",
  360. "12":"n",
  361. "12.1":"n",
  362. "46":"y"
  363. },
  364. "and_chr":{
  365. "75":"y"
  366. },
  367. "and_ff":{
  368. "67":"y"
  369. },
  370. "ie_mob":{
  371. "10":"y",
  372. "11":"y"
  373. },
  374. "and_uc":{
  375. "12.12":"y"
  376. },
  377. "samsung":{
  378. "4":"y",
  379. "5.0-5.4":"y",
  380. "6.2-6.4":"y",
  381. "7.2-7.4":"y",
  382. "8.2":"y",
  383. "9.2":"y"
  384. },
  385. "and_qq":{
  386. "1.2":"y"
  387. },
  388. "baidu":{
  389. "7.12":"y"
  390. },
  391. "kaios":{
  392. "2.5":"y"
  393. }
  394. },
  395. "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](http://ejohn.org/blog/sub-pixel-problems-in-css/) differently, layouts using `calc()` expressions may have unexpected results.",
  396. "notes_by_num":{
  397. "1":"Partial support in Android Browser 4.4 refers to the browser lacking the ability to multiply and divide values.",
  398. "2":"Partial support in IE9 refers to the browser crashing when used as a `background-position` value.",
  399. "3":"Partial support in IE10/IE11 refers to calc not working properly with various use cases mentioned in known issues"
  400. },
  401. "usage_perc_y":94.6,
  402. "usage_perc_a":2.02,
  403. "ucprefix":false,
  404. "parent":"",
  405. "keywords":"",
  406. "ie_id":"csscalc",
  407. "chrome_id":"5765241438732288",
  408. "firefox_id":"",
  409. "webkit_id":"",
  410. "shown":true
  411. }