Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

_Fabric.Mixins.scss 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
  2. //
  3. // Office UI Fabric
  4. // --------------------------------------------------
  5. // Vendor-prefixed mixins
  6. // Border radius.
  7. @mixin border-radius($ms-radius: 5px) {
  8. border-radius: $ms-radius;
  9. background-clip: padding-box;
  10. }
  11. // Drop shadow.
  12. @mixin drop-shadow($ms-x-offset: 0, $ms-y-offset: 0, $ms-blur: 5px, $ms-spread: 0, $ms-alpha: 0.4) {
  13. box-shadow: $ms-x-offset $ms-y-offset $ms-blur $ms-spread rgba(0, 0, 0, $ms-alpha);
  14. }
  15. // Background gradient.
  16. @mixin background-gradient($ms-origin: left, $ms-start: #000, $ms-start-location: 0%, $ms-stop: #FFF, $ms-stop-location: 100%) {
  17. background-color: $ms-start;
  18. background-image: linear-gradient($ms-origin, $ms-start $ms-start-location, $ms-stop $ms-stop-location);
  19. }
  20. // Rotation.
  21. @mixin rotate($ms-deg) {
  22. transform: rotate($ms-deg);
  23. }
  24. // Reset button styles.
  25. @mixin button-reset() {
  26. background: none;
  27. border: 0;
  28. cursor: pointer;
  29. }
  30. @mixin resetAnimation() {
  31. -webkit-animation: none;
  32. -moz-animation: none;
  33. -ms-animation: none;
  34. -o-animation: none;
  35. animation: none;
  36. }
  37. @mixin resetBackface() {
  38. backface-visibility: visible;
  39. }
  40. @mixin resetBackground() {
  41. background: 0;
  42. background-clip: border-box;
  43. background-origin: padding-box;
  44. }
  45. @mixin resetBorder() {
  46. border: 0;
  47. border-collapse: separate;
  48. border-image: none;
  49. border-radius: 0;
  50. border-spacing: 0;
  51. }
  52. @mixin resetBoxShadow() {
  53. -webkit-box-shadow: none;
  54. -moz-box-shadow: none;
  55. box-shadow: none;
  56. }
  57. @mixin resetBoxSizing() {
  58. box-sizing: content-box;
  59. }
  60. @mixin resetColumns() {
  61. columns: auto;
  62. column-count: auto;
  63. column-fill: balance;
  64. column-gap: normal;
  65. column-rule: medium none currentColor;
  66. column-rule-color: currentColor;
  67. column-rule-style: none;
  68. column-rule-width: none;
  69. column-span: 1;
  70. column-width: auto;
  71. }
  72. // Fonts and Typography Resets
  73. @mixin resetFont() {
  74. font: normal;
  75. font-family: inherit;
  76. font-size: normal;
  77. font-style: normal;
  78. font-variant: normal;
  79. font-weight: normal;
  80. }
  81. @mixin resetTextStyling() {
  82. text-align: inherit;
  83. text-align-last: auto;
  84. text-decoration: none;
  85. text-decoration-color: inherit;
  86. text-decoration-line: none;
  87. text-decoration-style: solid;
  88. text-indent: 0;
  89. text-shadow: none;
  90. text-transform: none;
  91. line-height: normal;
  92. letter-spacing: normal;
  93. word-spacing: normal;
  94. }
  95. // Box Model Resets
  96. @mixin resetPadding() {
  97. padding: 0;
  98. }
  99. @mixin resetMargins() {
  100. margin: 0;
  101. }
  102. @mixin resetOverflow() {
  103. overflow: visible;
  104. }
  105. @mixin resetMax() {
  106. max-height: none;
  107. max-width: none;
  108. }
  109. @mixin resetMin() {
  110. min-height: 0;
  111. min-width: 0;
  112. }
  113. @mixin resetPositioning() {
  114. bottom: auto;
  115. left: auto;
  116. top: auto;
  117. left: auto;
  118. }
  119. @mixin resetFloat() {
  120. float: none;
  121. }
  122. @mixin resetHeight($ms-useMaxMin: false) {
  123. height: auto;
  124. @if $ms-useMaxMin == true {
  125. min-height: 0;
  126. max-height: 0;
  127. }
  128. }
  129. @mixin resetWidth($ms-useMaxMin: false) {
  130. width: auto;
  131. @if $ms-useMaxMin == true {
  132. min-width: 0;
  133. max-width: 0;
  134. }
  135. }
  136. @mixin resetPosition() {
  137. position: static;
  138. }
  139. @mixin resetPerspective() {
  140. -webkit-perspective: none;
  141. -webkit-perspective-origin: 50% 50%;
  142. perspective: none;
  143. perspective-origin: 50% 50%;
  144. }
  145. @mixin resetTransition() {
  146. -webkit-transition: none;
  147. transition: none;
  148. }
  149. @mixin resetListStyle() {
  150. list-style: none;
  151. }
  152. @mixin resetTransform() {
  153. -ms-transform: none;
  154. -webkit-transform: none;
  155. -webkit-transform-style: flat;
  156. transform: none;
  157. transform-style: flat;
  158. }
  159. @mixin resetOutline() {
  160. outline: 0;
  161. }
  162. @mixin resetPageBreak() {
  163. page-break-after: auto;
  164. page-break-before: auto;
  165. page-break-inside: auto;
  166. }
  167. @mixin resetDisplay() {
  168. display: block;
  169. }
  170. @mixin resetVerticalAlign() {
  171. vertical-align: baseline;
  172. }
  173. // Prevents the text within a block element from wrapping to second line.
  174. @mixin noWrap() {
  175. display: block;
  176. overflow: hidden;
  177. text-overflow: ellipsis;
  178. white-space: nowrap;
  179. }
  180. // Input placehoder
  181. @mixin input-placeholder {
  182. &::-webkit-input-placeholder,
  183. &::-moz-placeholder,
  184. &:-moz-placeholder,
  185. &:-ms-input-placeholder {
  186. @content;
  187. }
  188. }
  189. // Animations
  190. @mixin animationName($ms-name) {
  191. -webkit-animation-name: $ms-name;
  192. -moz-animation-name: $ms-name;
  193. -ms-animation-name: $ms-name;
  194. -o-animation-name: $ms-name;
  195. animation-name: $ms-name;
  196. }
  197. @mixin animationDuration($ms-duration) {
  198. -webkit-animation-duration: $ms-duration;
  199. -moz-animation-duration: $ms-duration;
  200. -ms-animation-duration: $ms-duration;
  201. -o-animation-duration: $ms-duration;
  202. }
  203. @mixin animationTiming($ms-function) {
  204. -webkit-animation-timing-function: $ms-function;
  205. -moz-animation-timing-function: $ms-function;
  206. -ms-animation-timing-function: $ms-function;
  207. -o-animation-timing-function: $ms-function;
  208. animation-timing-function: $ms-function;
  209. }
  210. @mixin animationFillMode($ms-mode) {
  211. -webkit-animation-fill-mode: $ms-mode;
  212. -moz-animation-fill-mode: $ms-mode;
  213. -ms-animation-fill-mode: $ms-mode;
  214. -o-animation-fill-mode: $ms-mode;
  215. animation-fill-mode: $ms-mode;
  216. }
  217. // Flexbox
  218. @mixin flexBox() {
  219. display: -ms-flexbox;
  220. display: -webkit-flex;
  221. display: flex;
  222. }
  223. @mixin alignItems($ms-mode) {
  224. -webkit-box-align: $ms-mode;
  225. -moz-box-align: $ms-mode;
  226. -ms-flex-align: $ms-mode;
  227. -webkit-align-items: $ms-mode;
  228. align-items: $ms-mode;
  229. }