calc.json 8.2 KB

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