vendor-prefixes.less 6.4 KB

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