vendor-prefixes.less 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. // Vendor Prefixes
  2. //
  3. // All vendor mixins are deprecated as of v3.2.0 due to the introduction of
  4. // Autoprefixer in our Gruntfile. They will be removed in v4.
  5. // - Animations
  6. // - Backface visibility
  7. // - Box shadow
  8. // - Box sizing
  9. // - Content columns
  10. // - Hyphens
  11. // - Placeholder text
  12. // - Transformations
  13. // - Transitions
  14. // - User Select
  15. // Animations
  16. .animation(@animation) {
  17. -webkit-animation: @animation;
  18. -o-animation: @animation;
  19. animation: @animation;
  20. }
  21. .animation-name(@name) {
  22. -webkit-animation-name: @name;
  23. animation-name: @name;
  24. }
  25. .animation-duration(@duration) {
  26. -webkit-animation-duration: @duration;
  27. animation-duration: @duration;
  28. }
  29. .animation-timing-function(@timing-function) {
  30. -webkit-animation-timing-function: @timing-function;
  31. animation-timing-function: @timing-function;
  32. }
  33. .animation-delay(@delay) {
  34. -webkit-animation-delay: @delay;
  35. animation-delay: @delay;
  36. }
  37. .animation-iteration-count(@iteration-count) {
  38. -webkit-animation-iteration-count: @iteration-count;
  39. animation-iteration-count: @iteration-count;
  40. }
  41. .animation-direction(@direction) {
  42. -webkit-animation-direction: @direction;
  43. animation-direction: @direction;
  44. }
  45. .animation-fill-mode(@fill-mode) {
  46. -webkit-animation-fill-mode: @fill-mode;
  47. animation-fill-mode: @fill-mode;
  48. }
  49. // Backface visibility
  50. // Prevent browsers from flickering when using CSS 3D transforms.
  51. // Default value is `visible`, but can be changed to `hidden`
  52. .backface-visibility(@visibility) {
  53. -webkit-backface-visibility: @visibility;
  54. -moz-backface-visibility: @visibility;
  55. backface-visibility: @visibility;
  56. }
  57. // Drop shadows
  58. //
  59. // Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
  60. // supported browsers that have box shadow capabilities now support it.
  61. .box-shadow(@shadow) {
  62. -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
  63. box-shadow: @shadow;
  64. }
  65. // Box sizing
  66. .box-sizing(@boxmodel) {
  67. -webkit-box-sizing: @boxmodel;
  68. -moz-box-sizing: @boxmodel;
  69. box-sizing: @boxmodel;
  70. }
  71. // CSS3 Content Columns
  72. .content-columns(@column-count; @column-gap: @grid-gutter-width) {
  73. -webkit-column-count: @column-count;
  74. -moz-column-count: @column-count;
  75. column-count: @column-count;
  76. -webkit-column-gap: @column-gap;
  77. -moz-column-gap: @column-gap;
  78. column-gap: @column-gap;
  79. }
  80. // Optional hyphenation
  81. .hyphens(@mode: auto) {
  82. word-wrap: break-word;
  83. -webkit-hyphens: @mode;
  84. -moz-hyphens: @mode;
  85. -ms-hyphens: @mode; // IE10+
  86. -o-hyphens: @mode;
  87. hyphens: @mode;
  88. }
  89. // Placeholder text
  90. .placeholder(@color: @input-color-placeholder) {
  91. // Firefox
  92. &::-moz-placeholder {
  93. color: @color;
  94. opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
  95. }
  96. &:-ms-input-placeholder {
  97. color: @color;
  98. }
  99. // Internet Explorer 10+
  100. &::-webkit-input-placeholder {
  101. color: @color;
  102. }
  103. // Safari and Chrome
  104. }
  105. // Transformations
  106. .scale(@ratio) {
  107. -webkit-transform: scale(@ratio);
  108. -ms-transform: scale(@ratio); // IE9 only
  109. -o-transform: scale(@ratio);
  110. transform: scale(@ratio);
  111. }
  112. .scale(@ratioX; @ratioY) {
  113. -webkit-transform: scale(@ratioX, @ratioY);
  114. -ms-transform: scale(@ratioX, @ratioY); // IE9 only
  115. -o-transform: scale(@ratioX, @ratioY);
  116. transform: scale(@ratioX, @ratioY);
  117. }
  118. .scaleX(@ratio) {
  119. -webkit-transform: scaleX(@ratio);
  120. -ms-transform: scaleX(@ratio); // IE9 only
  121. -o-transform: scaleX(@ratio);
  122. transform: scaleX(@ratio);
  123. }
  124. .scaleY(@ratio) {
  125. -webkit-transform: scaleY(@ratio);
  126. -ms-transform: scaleY(@ratio); // IE9 only
  127. -o-transform: scaleY(@ratio);
  128. transform: scaleY(@ratio);
  129. }
  130. .skew(@x; @y) {
  131. -webkit-transform: skewX(@x) skewY(@y);
  132. -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
  133. -o-transform: skewX(@x) skewY(@y);
  134. transform: skewX(@x) skewY(@y);
  135. }
  136. .translate(@x; @y) {
  137. -webkit-transform: translate(@x, @y);
  138. -ms-transform: translate(@x, @y); // IE9 only
  139. -o-transform: translate(@x, @y);
  140. transform: translate(@x, @y);
  141. }
  142. .translate3d(@x; @y; @z) {
  143. -webkit-transform: translate3d(@x, @y, @z);
  144. transform: translate3d(@x, @y, @z);
  145. }
  146. .rotate(@degrees) {
  147. -webkit-transform: rotate(@degrees);
  148. -ms-transform: rotate(@degrees); // IE9 only
  149. -o-transform: rotate(@degrees);
  150. transform: rotate(@degrees);
  151. }
  152. .rotateX(@degrees) {
  153. -webkit-transform: rotateX(@degrees);
  154. -ms-transform: rotateX(@degrees); // IE9 only
  155. -o-transform: rotateX(@degrees);
  156. transform: rotateX(@degrees);
  157. }
  158. .rotateY(@degrees) {
  159. -webkit-transform: rotateY(@degrees);
  160. -ms-transform: rotateY(@degrees); // IE9 only
  161. -o-transform: rotateY(@degrees);
  162. transform: rotateY(@degrees);
  163. }
  164. .perspective(@perspective) {
  165. -webkit-perspective: @perspective;
  166. -moz-perspective: @perspective;
  167. perspective: @perspective;
  168. }
  169. .perspective-origin(@perspective) {
  170. -webkit-perspective-origin: @perspective;
  171. -moz-perspective-origin: @perspective;
  172. perspective-origin: @perspective;
  173. }
  174. .transform-origin(@origin) {
  175. -webkit-transform-origin: @origin;
  176. -moz-transform-origin: @origin;
  177. -ms-transform-origin: @origin; // IE9 only
  178. transform-origin: @origin;
  179. }
  180. // Transitions
  181. .transition(@transition) {
  182. -webkit-transition: @transition;
  183. -o-transition: @transition;
  184. transition: @transition;
  185. }
  186. .transition-property(@transition-property) {
  187. -webkit-transition-property: @transition-property;
  188. transition-property: @transition-property;
  189. }
  190. .transition-delay(@transition-delay) {
  191. -webkit-transition-delay: @transition-delay;
  192. transition-delay: @transition-delay;
  193. }
  194. .transition-duration(@transition-duration) {
  195. -webkit-transition-duration: @transition-duration;
  196. transition-duration: @transition-duration;
  197. }
  198. .transition-timing-function(@timing-function) {
  199. -webkit-transition-timing-function: @timing-function;
  200. transition-timing-function: @timing-function;
  201. }
  202. .transition-transform(@transition) {
  203. -webkit-transition: -webkit-transform @transition;
  204. -moz-transition: -moz-transform @transition;
  205. -o-transition: -o-transform @transition;
  206. transition: transform @transition;
  207. }
  208. // User select
  209. // For selecting text on the page
  210. .user-select(@select) {
  211. -webkit-user-select: @select;
  212. -moz-user-select: @select;
  213. -ms-user-select: @select; // IE10+
  214. user-select: @select;
  215. }