calc.json 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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":"http://www.w3.org/TR/css3-values/#calc",
  5. "status":"cr",
  6. "links":[
  7. {
  8. "url":"http://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 article"
  14. },
  15. {
  16. "url":"http://docs.webplatform.org/wiki/css/functions/calc",
  17. "title":"WebPlatform Docs"
  18. }
  19. ],
  20. "bugs":[
  21. {
  22. "description":"IE10 crashes when a div with a property using `calc()` has a child with [same property with inherit](http://stackoverflow.com/questions/19423384/css-less-calc-method-is-crashing-my-ie10)."
  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, 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/)"
  29. },
  30. {
  31. "description":"Safari & iOS Safari (both 6 and 7) does not support viewport units (`vw`, `vh`, etc) in `calc()`."
  32. },
  33. {
  34. "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);`"
  35. },
  36. {
  37. "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)"
  38. },
  39. {
  40. "description":"IE11 is reported to have trouble with `calc()` with nested expressions, e.g. `width: calc((100% - 10px) / 3);` (i.e. it rounds differently)"
  41. },
  42. {
  43. "description":"IE11 is reported to not support `calc()` correctly in [generated content](http://stackoverflow.com/questions/31323915/internet-explorer-incorrectly-calculates-percentage-height-for-generated-content)"
  44. },
  45. {
  46. "description":"IE11 does not support transitioning values set with `calc()`"
  47. }
  48. ],
  49. "categories":[
  50. "CSS3"
  51. ],
  52. "stats":{
  53. "ie":{
  54. "5.5":"n",
  55. "6":"n",
  56. "7":"n",
  57. "8":"n",
  58. "9":"a #2",
  59. "10":"y",
  60. "11":"y"
  61. },
  62. "edge":{
  63. "12":"y",
  64. "13":"y",
  65. "14":"y"
  66. },
  67. "firefox":{
  68. "2":"n",
  69. "3":"n",
  70. "3.5":"n",
  71. "3.6":"n",
  72. "4":"y x",
  73. "5":"y x",
  74. "6":"y x",
  75. "7":"y x",
  76. "8":"y x",
  77. "9":"y x",
  78. "10":"y x",
  79. "11":"y x",
  80. "12":"y x",
  81. "13":"y x",
  82. "14":"y x",
  83. "15":"y x",
  84. "16":"y",
  85. "17":"y",
  86. "18":"y",
  87. "19":"y",
  88. "20":"y",
  89. "21":"y",
  90. "22":"y",
  91. "23":"y",
  92. "24":"y",
  93. "25":"y",
  94. "26":"y",
  95. "27":"y",
  96. "28":"y",
  97. "29":"y",
  98. "30":"y",
  99. "31":"y",
  100. "32":"y",
  101. "33":"y",
  102. "34":"y",
  103. "35":"y",
  104. "36":"y",
  105. "37":"y",
  106. "38":"y",
  107. "39":"y",
  108. "40":"y",
  109. "41":"y",
  110. "42":"y",
  111. "43":"y",
  112. "44":"y",
  113. "45":"y",
  114. "46":"y",
  115. "47":"y",
  116. "48":"y",
  117. "49":"y",
  118. "50":"y",
  119. "51":"y",
  120. "52":"y",
  121. "53":"y"
  122. },
  123. "chrome":{
  124. "4":"n",
  125. "5":"n",
  126. "6":"n",
  127. "7":"n",
  128. "8":"n",
  129. "9":"n",
  130. "10":"n",
  131. "11":"n",
  132. "12":"n",
  133. "13":"n",
  134. "14":"n",
  135. "15":"n",
  136. "16":"n",
  137. "17":"n",
  138. "18":"n",
  139. "19":"y x",
  140. "20":"y x",
  141. "21":"y x",
  142. "22":"y x",
  143. "23":"y x",
  144. "24":"y x",
  145. "25":"y x",
  146. "26":"y",
  147. "27":"y",
  148. "28":"y",
  149. "29":"y",
  150. "30":"y",
  151. "31":"y",
  152. "32":"y",
  153. "33":"y",
  154. "34":"y",
  155. "35":"y",
  156. "36":"y",
  157. "37":"y",
  158. "38":"y",
  159. "39":"y",
  160. "40":"y",
  161. "41":"y",
  162. "42":"y",
  163. "43":"y",
  164. "44":"y",
  165. "45":"y",
  166. "46":"y",
  167. "47":"y",
  168. "48":"y",
  169. "49":"y",
  170. "50":"y",
  171. "51":"y",
  172. "52":"y",
  173. "53":"y",
  174. "54":"y",
  175. "55":"y",
  176. "56":"y",
  177. "57":"y"
  178. },
  179. "safari":{
  180. "3.1":"n",
  181. "3.2":"n",
  182. "4":"n",
  183. "5":"n",
  184. "5.1":"n",
  185. "6":"y x",
  186. "6.1":"y",
  187. "7":"y",
  188. "7.1":"y",
  189. "8":"y",
  190. "9":"y",
  191. "9.1":"y",
  192. "10":"y",
  193. "TP":"y"
  194. },
  195. "opera":{
  196. "9":"n",
  197. "9.5-9.6":"n",
  198. "10.0-10.1":"n",
  199. "10.5":"n",
  200. "10.6":"n",
  201. "11":"n",
  202. "11.1":"n",
  203. "11.5":"n",
  204. "11.6":"n",
  205. "12":"n",
  206. "12.1":"n",
  207. "15":"y",
  208. "16":"y",
  209. "17":"y",
  210. "18":"y",
  211. "19":"y",
  212. "20":"y",
  213. "21":"y",
  214. "22":"y",
  215. "23":"y",
  216. "24":"y",
  217. "25":"y",
  218. "26":"y",
  219. "27":"y",
  220. "28":"y",
  221. "29":"y",
  222. "30":"y",
  223. "31":"y",
  224. "32":"y",
  225. "33":"y",
  226. "34":"y",
  227. "35":"y",
  228. "36":"y",
  229. "37":"y",
  230. "38":"y",
  231. "39":"y",
  232. "40":"y",
  233. "41":"y",
  234. "42":"y",
  235. "43":"y"
  236. },
  237. "ios_saf":{
  238. "3.2":"n",
  239. "4.0-4.1":"n",
  240. "4.2-4.3":"n",
  241. "5.0-5.1":"n",
  242. "6.0-6.1":"y x",
  243. "7.0-7.1":"y",
  244. "8":"y",
  245. "8.1-8.4":"y",
  246. "9.0-9.2":"y",
  247. "9.3":"y",
  248. "10-10.1":"y"
  249. },
  250. "op_mini":{
  251. "all":"n"
  252. },
  253. "android":{
  254. "2.1":"n",
  255. "2.2":"n",
  256. "2.3":"n",
  257. "3":"n",
  258. "4":"n",
  259. "4.1":"n",
  260. "4.2-4.3":"n",
  261. "4.4":"a #1",
  262. "4.4.3-4.4.4":"a #1",
  263. "53":"y"
  264. },
  265. "bb":{
  266. "7":"n",
  267. "10":"y"
  268. },
  269. "op_mob":{
  270. "10":"n",
  271. "11":"n",
  272. "11.1":"n",
  273. "11.5":"n",
  274. "12":"n",
  275. "12.1":"n",
  276. "37":"y"
  277. },
  278. "and_chr":{
  279. "54":"y"
  280. },
  281. "and_ff":{
  282. "50":"y"
  283. },
  284. "ie_mob":{
  285. "10":"y",
  286. "11":"y"
  287. },
  288. "and_uc":{
  289. "11":"n"
  290. },
  291. "samsung":{
  292. "4":"y"
  293. }
  294. },
  295. "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.",
  296. "notes_by_num":{
  297. "1":"Partial support in Android Browser 4.4 refers to the browser lacking the ability to multiply and divide values.",
  298. "2":"Partial support in IE9 refers to the browser crashing when used as a `background-position` value."
  299. },
  300. "usage_perc_y":80.99,
  301. "usage_perc_a":2.33,
  302. "ucprefix":false,
  303. "parent":"",
  304. "keywords":"",
  305. "ie_id":"csscalc",
  306. "chrome_id":"5765241438732288",
  307. "firefox_id":"",
  308. "webkit_id":"",
  309. "shown":true
  310. }