vendor-prefixes.less 6.6 KB

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