vendor-prefixes.less 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. &::-moz-placeholder { color: @color; // Firefox
  92. opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
  93. &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
  94. &::-webkit-input-placeholder { color: @color; } // Safari and Chrome
  95. }
  96. // Transformations
  97. .scale(@ratio) {
  98. -webkit-transform: scale(@ratio);
  99. -ms-transform: scale(@ratio); // IE9 only
  100. -o-transform: scale(@ratio);
  101. transform: scale(@ratio);
  102. }
  103. .scale(@ratioX; @ratioY) {
  104. -webkit-transform: scale(@ratioX, @ratioY);
  105. -ms-transform: scale(@ratioX, @ratioY); // IE9 only
  106. -o-transform: scale(@ratioX, @ratioY);
  107. transform: scale(@ratioX, @ratioY);
  108. }
  109. .scaleX(@ratio) {
  110. -webkit-transform: scaleX(@ratio);
  111. -ms-transform: scaleX(@ratio); // IE9 only
  112. -o-transform: scaleX(@ratio);
  113. transform: scaleX(@ratio);
  114. }
  115. .scaleY(@ratio) {
  116. -webkit-transform: scaleY(@ratio);
  117. -ms-transform: scaleY(@ratio); // IE9 only
  118. -o-transform: scaleY(@ratio);
  119. transform: scaleY(@ratio);
  120. }
  121. .skew(@x; @y) {
  122. -webkit-transform: skewX(@x) skewY(@y);
  123. -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
  124. -o-transform: skewX(@x) skewY(@y);
  125. transform: skewX(@x) skewY(@y);
  126. }
  127. .translate(@x; @y) {
  128. -webkit-transform: translate(@x, @y);
  129. -ms-transform: translate(@x, @y); // IE9 only
  130. -o-transform: translate(@x, @y);
  131. transform: translate(@x, @y);
  132. }
  133. .translate3d(@x; @y; @z) {
  134. -webkit-transform: translate3d(@x, @y, @z);
  135. transform: translate3d(@x, @y, @z);
  136. }
  137. .rotate(@degrees) {
  138. -webkit-transform: rotate(@degrees);
  139. -ms-transform: rotate(@degrees); // IE9 only
  140. -o-transform: rotate(@degrees);
  141. transform: rotate(@degrees);
  142. }
  143. .rotateX(@degrees) {
  144. -webkit-transform: rotateX(@degrees);
  145. -ms-transform: rotateX(@degrees); // IE9 only
  146. -o-transform: rotateX(@degrees);
  147. transform: rotateX(@degrees);
  148. }
  149. .rotateY(@degrees) {
  150. -webkit-transform: rotateY(@degrees);
  151. -ms-transform: rotateY(@degrees); // IE9 only
  152. -o-transform: rotateY(@degrees);
  153. transform: rotateY(@degrees);
  154. }
  155. .perspective(@perspective) {
  156. -webkit-perspective: @perspective;
  157. -moz-perspective: @perspective;
  158. perspective: @perspective;
  159. }
  160. .perspective-origin(@perspective) {
  161. -webkit-perspective-origin: @perspective;
  162. -moz-perspective-origin: @perspective;
  163. perspective-origin: @perspective;
  164. }
  165. .transform-origin(@origin) {
  166. -webkit-transform-origin: @origin;
  167. -moz-transform-origin: @origin;
  168. -ms-transform-origin: @origin; // IE9 only
  169. transform-origin: @origin;
  170. }
  171. // Transitions
  172. .transition(@transition) {
  173. -webkit-transition: @transition;
  174. -o-transition: @transition;
  175. transition: @transition;
  176. }
  177. .transition-property(@transition-property) {
  178. -webkit-transition-property: @transition-property;
  179. transition-property: @transition-property;
  180. }
  181. .transition-delay(@transition-delay) {
  182. -webkit-transition-delay: @transition-delay;
  183. transition-delay: @transition-delay;
  184. }
  185. .transition-duration(@transition-duration) {
  186. -webkit-transition-duration: @transition-duration;
  187. transition-duration: @transition-duration;
  188. }
  189. .transition-timing-function(@timing-function) {
  190. -webkit-transition-timing-function: @timing-function;
  191. transition-timing-function: @timing-function;
  192. }
  193. .transition-transform(@transition) {
  194. -webkit-transition: -webkit-transform @transition;
  195. -moz-transition: -moz-transform @transition;
  196. -o-transition: -o-transform @transition;
  197. transition: transform @transition;
  198. }
  199. // User select
  200. // For selecting text on the page
  201. .user-select(@select) {
  202. -webkit-user-select: @select;
  203. -moz-user-select: @select;
  204. -ms-user-select: @select; // IE10+
  205. user-select: @select;
  206. }