calc.json 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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. },
  145. "chrome":{
  146. "4":"n",
  147. "5":"n",
  148. "6":"n",
  149. "7":"n",
  150. "8":"n",
  151. "9":"n",
  152. "10":"n",
  153. "11":"n",
  154. "12":"n",
  155. "13":"n",
  156. "14":"n",
  157. "15":"n",
  158. "16":"n",
  159. "17":"n",
  160. "18":"n",
  161. "19":"y x",
  162. "20":"y x",
  163. "21":"y x",
  164. "22":"y x",
  165. "23":"y x",
  166. "24":"y x",
  167. "25":"y x",
  168. "26":"y",
  169. "27":"y",
  170. "28":"y",
  171. "29":"y",
  172. "30":"y",
  173. "31":"y",
  174. "32":"y",
  175. "33":"y",
  176. "34":"y",
  177. "35":"y",
  178. "36":"y",
  179. "37":"y",
  180. "38":"y",
  181. "39":"y",
  182. "40":"y",
  183. "41":"y",
  184. "42":"y",
  185. "43":"y",
  186. "44":"y",
  187. "45":"y",
  188. "46":"y",
  189. "47":"y",
  190. "48":"y",
  191. "49":"y",
  192. "50":"y",
  193. "51":"y",
  194. "52":"y",
  195. "53":"y",
  196. "54":"y",
  197. "55":"y",
  198. "56":"y",
  199. "57":"y",
  200. "58":"y",
  201. "59":"y",
  202. "60":"y",
  203. "61":"y",
  204. "62":"y",
  205. "63":"y",
  206. "64":"y",
  207. "65":"y",
  208. "66":"y",
  209. "67":"y",
  210. "68":"y",
  211. "69":"y"
  212. },
  213. "safari":{
  214. "3.1":"n",
  215. "3.2":"n",
  216. "4":"n",
  217. "5":"n",
  218. "5.1":"n",
  219. "6":"y x",
  220. "6.1":"y",
  221. "7":"y",
  222. "7.1":"y",
  223. "8":"y",
  224. "9":"y",
  225. "9.1":"y",
  226. "10":"y",
  227. "10.1":"y",
  228. "11":"y",
  229. "11.1":"y",
  230. "TP":"y"
  231. },
  232. "opera":{
  233. "9":"n",
  234. "9.5-9.6":"n",
  235. "10.0-10.1":"n",
  236. "10.5":"n",
  237. "10.6":"n",
  238. "11":"n",
  239. "11.1":"n",
  240. "11.5":"n",
  241. "11.6":"n",
  242. "12":"n",
  243. "12.1":"n",
  244. "15":"y",
  245. "16":"y",
  246. "17":"y",
  247. "18":"y",
  248. "19":"y",
  249. "20":"y",
  250. "21":"y",
  251. "22":"y",
  252. "23":"y",
  253. "24":"y",
  254. "25":"y",
  255. "26":"y",
  256. "27":"y",
  257. "28":"y",
  258. "29":"y",
  259. "30":"y",
  260. "31":"y",
  261. "32":"y",
  262. "33":"y",
  263. "34":"y",
  264. "35":"y",
  265. "36":"y",
  266. "37":"y",
  267. "38":"y",
  268. "39":"y",
  269. "40":"y",
  270. "41":"y",
  271. "42":"y",
  272. "43":"y",
  273. "44":"y",
  274. "45":"y",
  275. "46":"y",
  276. "47":"y",
  277. "48":"y",
  278. "49":"y",
  279. "50":"y",
  280. "51":"y",
  281. "52":"y"
  282. },
  283. "ios_saf":{
  284. "3.2":"n",
  285. "4.0-4.1":"n",
  286. "4.2-4.3":"n",
  287. "5.0-5.1":"n",
  288. "6.0-6.1":"y x",
  289. "7.0-7.1":"y",
  290. "8":"y",
  291. "8.1-8.4":"y",
  292. "9.0-9.2":"y",
  293. "9.3":"y",
  294. "10.0-10.2":"y",
  295. "10.3":"y",
  296. "11.0-11.2":"y",
  297. "11.3":"y"
  298. },
  299. "op_mini":{
  300. "all":"n"
  301. },
  302. "android":{
  303. "2.1":"n",
  304. "2.2":"n",
  305. "2.3":"n",
  306. "3":"n",
  307. "4":"n",
  308. "4.1":"n",
  309. "4.2-4.3":"n",
  310. "4.4":"a #1",
  311. "4.4.3-4.4.4":"a #1",
  312. "62":"y"
  313. },
  314. "bb":{
  315. "7":"n",
  316. "10":"y"
  317. },
  318. "op_mob":{
  319. "10":"n",
  320. "11":"n",
  321. "11.1":"n",
  322. "11.5":"n",
  323. "12":"n",
  324. "12.1":"n",
  325. "37":"y"
  326. },
  327. "and_chr":{
  328. "66":"y"
  329. },
  330. "and_ff":{
  331. "57":"y"
  332. },
  333. "ie_mob":{
  334. "10":"y",
  335. "11":"y"
  336. },
  337. "and_uc":{
  338. "11.8":"y"
  339. },
  340. "samsung":{
  341. "4":"y",
  342. "5":"y",
  343. "6.2":"y"
  344. },
  345. "and_qq":{
  346. "1.2":"y"
  347. },
  348. "baidu":{
  349. "7.12":"y"
  350. }
  351. },
  352. "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.",
  353. "notes_by_num":{
  354. "1":"Partial support in Android Browser 4.4 refers to the browser lacking the ability to multiply and divide values.",
  355. "2":"Partial support in IE9 refers to the browser crashing when used as a `background-position` value."
  356. },
  357. "usage_perc_y":92.99,
  358. "usage_perc_a":1.04,
  359. "ucprefix":false,
  360. "parent":"",
  361. "keywords":"",
  362. "ie_id":"csscalc",
  363. "chrome_id":"5765241438732288",
  364. "firefox_id":"",
  365. "webkit_id":"",
  366. "shown":true
  367. }