You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7423 lines
176 KiB

7 years ago
  1. // Typography
  2. // ------------------------------
  3. $font-family: Roboto, 'Helvetica Neue', sans-serif !default;
  4. $font-size: 10px !default;
  5. //-- Must be defined before $font-size.
  6. @function rem($multiplier) {
  7. @return $multiplier * $font-size;
  8. }
  9. $display-4-font-size-base: rem(11.20) !default;
  10. $display-3-font-size-base: rem(5.600) !default;
  11. $display-2-font-size-base: rem(4.500) !default;
  12. $display-1-font-size-base: rem(3.400) !default;
  13. $headline-font-size-base: rem(2.400) !default;
  14. $title-font-size-base: rem(2.000) !default;
  15. $subhead-font-size-base: rem(1.600) !default;
  16. $body-font-size-base: rem(1.400) !default;
  17. $caption-font-size-base: rem(1.200) !default;
  18. // Layout
  19. // ------------------------------
  20. $baseline-grid: 8px !default;
  21. $layout-gutter-width: ($baseline-grid * 2) !default;
  22. $layout-breakpoint-xs: 600px !default;
  23. $layout-breakpoint-sm: 960px !default;
  24. $layout-breakpoint-md: 1280px !default;
  25. $layout-breakpoint-lg: 1920px !default;
  26. // Button
  27. $button-left-right-padding: rem(0.600) !default;
  28. // Icon
  29. $icon-size: rem(2.400) !default;
  30. // App bar variables
  31. $app-bar-height: 64px !default;
  32. $toast-height: $baseline-grid * 3 !default;
  33. $toast-margin: $baseline-grid * 1 !default;
  34. // Whiteframes
  35. $shadow-key-umbra-opacity: 0.2 !default;
  36. $shadow-key-penumbra-opacity: 0.14 !default;
  37. $shadow-ambient-shadow-opacity: 0.12 !default;
  38. // NOTE(shyndman): gulp-sass seems to be failing if I split the shadow defs across
  39. // multiple lines. Ugly. Sorry.
  40. $whiteframe-shadow-1dp: 0px 1px 3px 0px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 1px 1px 0px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 2px 1px -1px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  41. $whiteframe-shadow-2dp: 0px 1px 5px 0px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 2px 2px 0px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 3px 1px -2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  42. $whiteframe-shadow-3dp: 0px 1px 8px 0px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 3px 4px 0px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 3px 3px -2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  43. $whiteframe-shadow-4dp: 0px 2px 4px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 4px 5px 0px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 1px 10px 0px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  44. $whiteframe-shadow-5dp: 0px 3px 5px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 5px 8px 0px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 1px 14px 0px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  45. $whiteframe-shadow-6dp: 0px 3px 5px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 6px 10px 0px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 1px 18px 0px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  46. $whiteframe-shadow-7dp: 0px 4px 5px -2px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 7px 10px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 2px 16px 1px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  47. $whiteframe-shadow-8dp: 0px 5px 5px -3px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 8px 10px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 3px 14px 2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  48. $whiteframe-shadow-9dp: 0px 5px 6px -3px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 9px 12px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 3px 16px 2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  49. $whiteframe-shadow-10dp: 0px 6px 6px -3px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 10px 14px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 4px 18px 3px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  50. $whiteframe-shadow-11dp: 0px 6px 7px -4px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 11px 15px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 4px 20px 3px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  51. $whiteframe-shadow-12dp: 0px 7px 8px -4px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 12px 17px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 5px 22px 4px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  52. $whiteframe-shadow-13dp: 0px 7px 8px -4px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 13px 19px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 5px 24px 4px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  53. $whiteframe-shadow-14dp: 0px 7px 9px -4px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 14px 21px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 5px 26px 4px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  54. $whiteframe-shadow-15dp: 0px 8px 9px -5px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 15px 22px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 6px 28px 5px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  55. $whiteframe-shadow-16dp: 0px 8px 10px -5px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 16px 24px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 6px 30px 5px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  56. $whiteframe-shadow-17dp: 0px 8px 11px -5px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 17px 26px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 6px 32px 5px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  57. $whiteframe-shadow-18dp: 0px 9px 11px -5px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 18px 28px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 7px 34px 6px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  58. $whiteframe-shadow-19dp: 0px 9px 12px -6px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 19px 29px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 7px 36px 6px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  59. $whiteframe-shadow-20dp: 0px 10px 13px -6px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 20px 31px 3px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 8px 38px 7px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  60. $whiteframe-shadow-21dp: 0px 10px 13px -6px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 21px 33px 3px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 8px 40px 7px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  61. $whiteframe-shadow-22dp: 0px 10px 14px -6px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 22px 35px 3px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 8px 42px 7px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  62. $whiteframe-shadow-23dp: 0px 11px 14px -7px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 23px 36px 3px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 9px 44px 8px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  63. $whiteframe-shadow-24dp: 0px 11px 15px -7px rgba(0, 0, 0, $shadow-key-umbra-opacity), 0px 24px 38px 3px rgba(0, 0, 0, $shadow-key-penumbra-opacity), 0px 9px 46px 8px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
  64. // Z-indexes
  65. //--------------------------------------------
  66. $z-index-toast: 105 !default;
  67. $z-index-tooltip: 100 !default;
  68. $z-index-menu: 100 !default;
  69. $z-index-calendar-pane: 100 !default;
  70. $z-index-select: 90 !default;
  71. $z-index-dialog: 80 !default;
  72. $z-index-bottom-sheet: 70 !default;
  73. $z-index-scroll-mask: 50 !default;
  74. $z-index-scroll-mask-bar: 65 !default;
  75. $z-index-sidenav: 60 !default;
  76. $z-index-backdrop: 50 !default;
  77. $z-index-fab: 20 !default;
  78. $z-index-progress-circular: 2 !default; // Used to fix animation bug in Chrome
  79. // Easing Curves
  80. //--------------------------------------------
  81. $swift-ease-out-duration: 0.4s !default;
  82. $swift-ease-out-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;
  83. $swift-ease-out: all $swift-ease-out-duration $swift-ease-out-timing-function !default;
  84. $swift-ease-in-duration: 0.3s !default;
  85. $swift-ease-in-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2) !default;
  86. $swift-ease-in: all $swift-ease-in-duration $swift-ease-in-timing-function !default;
  87. $swift-ease-in-out-duration: 0.5s !default;
  88. $swift-ease-in-out-timing-function: cubic-bezier(0.35, 0, 0.25, 1) !default;
  89. $swift-ease-in-out: all $swift-ease-in-out-duration $swift-ease-in-out-timing-function !default;
  90. $swift-linear-duration: 0.08s !default;
  91. $swift-linear-timing-function: linear !default;
  92. $swift-linear: all $swift-linear-duration $swift-linear-timing-function !default;
  93. $material-enter-duration: 0.3s;
  94. $material-enter-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
  95. $material-enter: all $material-enter-duration $material-enter-timing-function;
  96. $material-leave-duration: 0.3s;
  97. $material-leave-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
  98. $material-leave: all $material-leave-duration $material-leave-timing-function;
  99. // Fab Buttons (shared between buttons.scss and fab*.scss)
  100. // -------------------------------------------
  101. $button-fab-width: rem(5.600) !default;
  102. $button-fab-height: rem(5.600) !default;
  103. $button-fab-padding: rem(1.60) !default;
  104. // Shared Checkbox variables
  105. $checkbox-width: 20px !default;
  106. $checkbox-height: $checkbox-width !default;
  107. $checkbox-border-radius: 2px !default;
  108. $checkbox-border-width: 2px !default;
  109. @mixin margin-selectors($before:1em, $after:1em, $start:0px, $end:0px) {
  110. -webkit-margin-before: $before;
  111. -webkit-margin-after: $after;
  112. -webkit-margin-start: $start;
  113. -webkit-margin-end: $end;
  114. }
  115. @mixin not-selectable($value:none) {
  116. -webkit-touch-callout: $value;
  117. -webkit-user-select: $value;
  118. -khtml-user-select: $value;
  119. -moz-user-select: $value;
  120. -ms-user-select: $value;
  121. user-select: $value;
  122. }
  123. @mixin input-placeholder-color($color) {
  124. $pseudos: '::-webkit-input-placeholder', ':-moz-placeholder', '::-moz-placeholder',
  125. ':-ms-input-placeholder', '::-webkit-input-placeholder';
  126. // It is important to export every pseudo within its own block, because otherwise the placeholder
  127. // won't be set on the most browsers.
  128. @each $pseudo in $pseudos {
  129. &#{$pseudo} {
  130. color: unquote($color);
  131. }
  132. }
  133. }
  134. @mixin pie-clearfix {
  135. &:after {
  136. content: '';
  137. display: table;
  138. clear: both;
  139. }
  140. }
  141. @mixin md-shadow-bottom-z-1() {
  142. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  143. }
  144. @mixin md-shadow-bottom-z-2() {
  145. box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
  146. }
  147. // Mixin for a "flat" input that can be used for components that contain an input
  148. // (datepicker, autocomplete).
  149. @mixin md-flat-input() {
  150. font-size: 14px;
  151. box-sizing: border-box;
  152. border: none;
  153. box-shadow: none;
  154. outline: none;
  155. background: transparent;
  156. // The "clear X" that IE adds to input[type="search"]
  157. &::-ms-clear {
  158. display: none;
  159. }
  160. }
  161. // Typography mixins
  162. @mixin md-title() {
  163. font-size: $title-font-size-base;
  164. font-weight: 500;
  165. letter-spacing: 0.005em;
  166. }
  167. @mixin md-body-1() {
  168. font-size: $body-font-size-base;
  169. font-weight: 400;
  170. letter-spacing: 0.010em;
  171. line-height: rem(2);
  172. }
  173. @mixin md-body-2() {
  174. font-size: $body-font-size-base;
  175. font-weight: 500;
  176. letter-spacing: 0.010em;
  177. line-height: rem(2.4);
  178. }
  179. @mixin md-subhead() {
  180. font-size: $subhead-font-size-base;
  181. font-weight: 400;
  182. letter-spacing: 0.010em;
  183. line-height: rem(2.4);
  184. }
  185. @function map-to-string($map) {
  186. $map-str: '{';
  187. $keys: map-keys($map);
  188. $len: length($keys);
  189. @for $i from 1 through $len {
  190. $key: nth($keys, $i);
  191. $value: map-get($map, $key);
  192. $map-str: $map-str + '_' + $key + '_: _' + map-get($map, $key) + '_';
  193. @if $i != $len {
  194. $map-str: $map-str + ',';
  195. }
  196. }
  197. @return $map-str + '}';
  198. }
  199. // This is a mixin, which fixes IE11's vertical alignment issue, when using `min-height`.
  200. // See https://connect.microsoft.com/IE/feedback/details/816293/
  201. @mixin ie11-min-height-flexbug($min-height) {
  202. &::before {
  203. content: '';
  204. min-height: $min-height;
  205. visibility: hidden;
  206. display: inline-block;
  207. }
  208. }
  209. // mixin definition ; sets LTR and RTL within the same style call
  210. // @see https://css-tricks.com/almanac/properties/d/direction/
  211. @mixin rtl($prop, $ltr-value, $rtl-value) {
  212. #{$prop}: $ltr-value;
  213. [dir=rtl] & {
  214. #{$prop}: $rtl-value;
  215. }
  216. }
  217. @mixin rtl-prop($ltr-prop, $rtl-prop, $value, $reset-value) {
  218. #{$ltr-prop}: $value;
  219. [dir=rtl] & {
  220. #{$ltr-prop}: $reset-value;
  221. #{$rtl-prop}: $value;
  222. }
  223. }
  224. // To reverse padding (top left bottom right) -> (top right bottom left)
  225. @function rtl-value($list) {
  226. @if length($list) == 4 {
  227. @return nth($list, 1) nth($list, 4) nth($list, 3) nth($list, 2)
  228. }
  229. @if length($list) == 5 {
  230. @return nth($list, 1) nth($list, 4) nth($list, 3) nth($list, 2) nth($list, 5)
  231. }
  232. @return $list;
  233. }
  234. // Position a FAB button.
  235. @mixin fab-position($spot, $top: auto, $right: auto, $bottom: auto, $left: auto) {
  236. &.md-fab-#{$spot} {
  237. top: $top;
  238. right: $right;
  239. bottom: $bottom;
  240. left: $left;
  241. position: absolute;
  242. }
  243. }
  244. @mixin fab-all-positions() {
  245. @include fab-position(bottom-right, auto, ($button-fab-width - $button-fab-padding)/2, ($button-fab-height - $button-fab-padding)/2, auto);
  246. @include fab-position(bottom-left, auto, auto, ($button-fab-height - $button-fab-padding)/2, ($button-fab-width - $button-fab-padding)/2);
  247. @include fab-position(top-right, ($button-fab-height - $button-fab-padding)/2, ($button-fab-width - $button-fab-padding)/2, auto, auto);
  248. @include fab-position(top-left, ($button-fab-height - $button-fab-padding)/2, auto, auto, ($button-fab-width - $button-fab-padding)/2);
  249. }
  250. // This mixin allows a user to use the md-checkbox css outside of the
  251. // md-checkbox directive.
  252. // See src/components/select/select.scss for an example.
  253. @mixin checkbox-container(
  254. $checkedSelector: '.md-checked',
  255. $width: $checkbox-width,
  256. $height: $checkbox-height,
  257. $border-width: $checkbox-border-width,
  258. $border-radius: $checkbox-border-radius) {
  259. .md-container {
  260. position: absolute;
  261. top: 50%;
  262. transform: translateY(-50%);
  263. box-sizing: border-box;
  264. display: inline-block;
  265. width: $width;
  266. height: $height;
  267. @include rtl(left, 0, auto);
  268. @include rtl(right, auto, 0);
  269. &:before {
  270. box-sizing: border-box;
  271. background-color: transparent;
  272. border-radius: 50%;
  273. content: '';
  274. position: absolute;
  275. display: block;
  276. height: auto;
  277. left: 0;
  278. top: 0;
  279. right: 0;
  280. bottom: 0;
  281. transition: all 0.5s;
  282. width: auto;
  283. }
  284. &:after {
  285. box-sizing: border-box;
  286. content: '';
  287. position: absolute;
  288. top: -10px;
  289. right: -10px;
  290. bottom: -10px;
  291. left: -10px;
  292. }
  293. .md-ripple-container {
  294. position: absolute;
  295. display: block;
  296. width: auto;
  297. height: auto;
  298. left: -15px;
  299. top: -15px;
  300. right: -15px;
  301. bottom: -15px;
  302. }
  303. }
  304. // unchecked
  305. .md-icon {
  306. box-sizing: border-box;
  307. transition: 240ms;
  308. position: absolute;
  309. top: 0;
  310. left: 0;
  311. width: $width;
  312. height: $height;
  313. border-width: $border-width;
  314. border-style: solid;
  315. border-radius: $border-radius;
  316. }
  317. &#{$checkedSelector} .md-icon {
  318. border-color: transparent;
  319. &:after {
  320. box-sizing: border-box;
  321. transform: rotate(45deg);
  322. position: absolute;
  323. left: $width / 3 - $border-width;
  324. top: $width / 9 - $border-width;
  325. display: table;
  326. width: $width / 3;
  327. height: $width * 2 / 3;
  328. border-width: $border-width;
  329. border-style: solid;
  330. border-top: 0;
  331. border-left: 0;
  332. content: '';
  333. }
  334. }
  335. // disabled
  336. &[disabled] {
  337. cursor: default;
  338. }
  339. &.md-indeterminate .md-icon {
  340. &:after {
  341. box-sizing: border-box;
  342. position: absolute;
  343. top: 50%;
  344. left: 50%;
  345. transform: translate(-50%, -50%);
  346. display: table;
  347. width: $width * 0.6;
  348. height: $border-width;
  349. border-width: $border-width;
  350. border-style: solid;
  351. border-top: 0;
  352. border-left: 0;
  353. content: '';
  354. }
  355. }
  356. }
  357. // Mixin to create a primary checkbox.
  358. // Used by the checkbox and select component.
  359. @mixin checkbox-primary($checkedSelector: '.md-checked') {
  360. .md-ripple {
  361. color: '{{primary-600}}';
  362. }
  363. &#{$checkedSelector} .md-ripple {
  364. color: '{{background-600}}';
  365. }
  366. .md-ink-ripple {
  367. color: '{{foreground-2}}';
  368. }
  369. &#{$checkedSelector} .md-ink-ripple {
  370. color: '{{primary-color-0.87}}';
  371. }
  372. &:not(.md-checked) .md-icon {
  373. border-color: '{{foreground-2}}';
  374. }
  375. &#{$checkedSelector} .md-icon {
  376. background-color: '{{primary-color-0.87}}';
  377. }
  378. &#{$checkedSelector}.md-focused .md-container:before {
  379. background-color: '{{primary-color-0.26}}';
  380. }
  381. &#{$checkedSelector} .md-icon:after {
  382. border-color: '{{primary-contrast-0.87}}';
  383. }
  384. & .md-indeterminate[disabled] {
  385. .md-container {
  386. color: '{{foreground-3}}';
  387. }
  388. }
  389. }
  390. @mixin dense($prop, $normal, $dense) {
  391. #{$prop}: $normal;
  392. .md-dense > &:not(.md-dense-disabled),
  393. .md-dense :not(.md-dense-disabled) &:not(.md-dense-disabled) {
  394. #{$prop}: $dense;
  395. }
  396. }
  397. @mixin dense-rtl($prop, $ltr-normal, $rtl-normal, $ltr-dense, $rtl-dense) {
  398. @include rtl($prop, $ltr-normal, $rtl-normal);
  399. .md-dense > &:not(.md-dense-disabled),
  400. .md-dense :not(.md-dense-disabled) &:not(.md-dense-disabled) {
  401. @include rtl($prop, $ltr-dense, $rtl-dense);
  402. }
  403. }
  404. html, body {
  405. height: 100%;
  406. position: relative;
  407. }
  408. body {
  409. margin: 0;
  410. padding: 0;
  411. }
  412. [tabindex='-1']:focus {
  413. outline: none;
  414. }
  415. .inset {
  416. padding: 10px;
  417. }
  418. a.md-no-style,
  419. button.md-no-style {
  420. font-weight: normal;
  421. background-color: inherit;
  422. text-align: left;
  423. border: none;
  424. padding: 0;
  425. margin: 0;
  426. }
  427. select,
  428. button,
  429. textarea,
  430. input {
  431. vertical-align: baseline;
  432. }
  433. // Fix Android 4.0 button bugs
  434. input[type="reset"],
  435. input[type="submit"],
  436. html input[type="button"],
  437. button {
  438. cursor: pointer;
  439. -webkit-appearance: button;
  440. &[disabled] {
  441. cursor: default;
  442. }
  443. }
  444. textarea {
  445. vertical-align: top;
  446. overflow: auto;
  447. }
  448. input {
  449. &[type="search"] {
  450. -webkit-appearance: textfield;
  451. box-sizing: content-box;
  452. -webkit-box-sizing: content-box;
  453. &::-webkit-search-decoration,
  454. &::-webkit-search-cancel-button {
  455. -webkit-appearance: none;
  456. }
  457. }
  458. &:-webkit-autofill {
  459. text-shadow: none;
  460. }
  461. }
  462. .md-visually-hidden {
  463. border: 0;
  464. clip: rect(0 0 0 0);
  465. height: 1px;
  466. margin: -1px;
  467. overflow: hidden;
  468. padding: 0;
  469. position: absolute;
  470. text-transform: none;
  471. width: 1px;
  472. }
  473. .md-shadow {
  474. position: absolute;
  475. top: 0;
  476. left: 0;
  477. bottom: 0;
  478. right: 0;
  479. border-radius: inherit;
  480. pointer-events: none;
  481. }
  482. .md-shadow-bottom-z-1 {
  483. @include md-shadow-bottom-z-1();
  484. }
  485. .md-shadow-bottom-z-2 {
  486. @include md-shadow-bottom-z-2();
  487. }
  488. .md-shadow-animated.md-shadow {
  489. transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  490. }
  491. /*
  492. * A container inside of a rippling element (eg a button),
  493. * which contains all of the individual ripples
  494. */
  495. .md-ripple-container {
  496. pointer-events: none;
  497. position: absolute;
  498. overflow: hidden;
  499. left: 0;
  500. top: 0;
  501. width: 100%;
  502. height: 100%;
  503. transition: all 0.55s $swift-ease-out-timing-function;
  504. }
  505. .md-ripple {
  506. $sizeDuration: 0.45s * 2;
  507. position: absolute;
  508. transform: translate(-50%, -50%) scale(0);
  509. transform-origin: 50% 50%;
  510. opacity: 0;
  511. border-radius: 50%;
  512. &.md-ripple-placed {
  513. transition: margin $sizeDuration $swift-ease-out-timing-function,
  514. border $sizeDuration $swift-ease-out-timing-function,
  515. width $sizeDuration $swift-ease-out-timing-function,
  516. height $sizeDuration $swift-ease-out-timing-function,
  517. opacity $sizeDuration $swift-ease-out-timing-function,
  518. transform $sizeDuration $swift-ease-out-timing-function;
  519. }
  520. &.md-ripple-scaled {
  521. transform: translate(-50%, -50%) scale(1);
  522. }
  523. &.md-ripple-active, &.md-ripple-full, &.md-ripple-visible {
  524. opacity: 0.20;
  525. }
  526. &.md-ripple-remove {
  527. animation: md-remove-ripple $sizeDuration $swift-ease-out-timing-function;
  528. }
  529. }
  530. // Fix issue causing ripple disappear suddenly in Chrome version 51, opacity .15 is close to the opacity when a normal click mouseup
  531. @keyframes md-remove-ripple {
  532. 0% { opacity: .15; }
  533. 100% { opacity: 0; }
  534. }
  535. .md-padding {
  536. padding: 8px;
  537. }
  538. .md-margin {
  539. margin: 8px;
  540. }
  541. .md-scroll-mask {
  542. position: absolute;
  543. background-color: transparent;
  544. top: 0;
  545. right: 0;
  546. bottom: 0;
  547. left: 0;
  548. z-index: $z-index-scroll-mask;
  549. > .md-scroll-mask-bar {
  550. display: block;
  551. position: absolute;
  552. background-color: #fafafa;
  553. right: 0;
  554. top: 0;
  555. bottom: 0;
  556. z-index: $z-index-scroll-mask-bar;
  557. box-shadow: inset 0px 0px 1px rgba(0, 0, 0, 0.3)
  558. }
  559. }
  560. // For iOS allow disabling of momentum scrolling
  561. // @see issue #2640
  562. .md-no-momentum {
  563. -webkit-overflow-scrolling: auto;
  564. }
  565. // Add a class to help reduce flicker
  566. // @see issue #7078 and #8649
  567. .md-no-flicker {
  568. -webkit-filter: blur(0px);
  569. }
  570. @media (min-width: $layout-breakpoint-sm) {
  571. .md-padding {
  572. padding: 16px;
  573. }
  574. }
  575. // Bi-directional support
  576. html, body {
  577. &[dir=rtl], &[dir=ltr] {
  578. unicode-bidi: embed
  579. }
  580. }
  581. bdo[dir=rtl] {
  582. direction: rtl;
  583. unicode-bidi: bidi-override;
  584. }
  585. bdo[dir=ltr] {
  586. direction: ltr;
  587. unicode-bidi: bidi-override;
  588. }
  589. // Global page styles
  590. //
  591. // [2] Ensure the page always fills at least the entire height of the viewport.
  592. // [3] Prevent iOS text size adjust after orientation change, without disabling user zoom
  593. // [4] Fonts on OSX will look more consistent with other systems that do not
  594. // render text using sub-pixel anti-aliasing.
  595. html, body {
  596. -webkit-tap-highlight-color: rgba(0,0,0,0);
  597. -webkit-touch-callout: none;
  598. min-height: 100%; // [2]
  599. -webkit-text-size-adjust: 100%; // [3]
  600. -ms-text-size-adjust: 100%; // [3]
  601. -webkit-font-smoothing: antialiased; // [4]
  602. -moz-osx-font-smoothing: grayscale; // [4]
  603. }
  604. md-select, md-card, md-list, md-toolbar,
  605. ul, ol, p, h1, h2, h3, h4, h5, h6 {
  606. //text-rendering: optimizeLegibility;
  607. }
  608. /************
  609. * Headings
  610. ************/
  611. .md-display-4 {
  612. font-size: $display-4-font-size-base;
  613. font-weight: 300;
  614. letter-spacing: -0.010em;
  615. line-height: $display-4-font-size-base;
  616. }
  617. .md-display-3 {
  618. font-size: $display-3-font-size-base;
  619. font-weight: 400;
  620. letter-spacing: -0.005em;
  621. line-height: $display-3-font-size-base;
  622. }
  623. .md-display-2 {
  624. font-size: $display-2-font-size-base;
  625. font-weight: 400;
  626. line-height: rem(6.4);
  627. }
  628. .md-display-1 {
  629. font-size: $display-1-font-size-base;
  630. font-weight: 400;
  631. line-height: rem(4);
  632. }
  633. .md-headline {
  634. font-size: $headline-font-size-base;
  635. font-weight: 400;
  636. line-height: rem(3.2);
  637. }
  638. .md-title {
  639. @include md-title();
  640. }
  641. .md-subhead {
  642. @include md-subhead();
  643. }
  644. /************
  645. * Body Copy
  646. ************/
  647. .md-body-1 {
  648. @include md-body-1();
  649. }
  650. .md-body-2 {
  651. @include md-body-2();
  652. }
  653. .md-caption {
  654. font-size: $caption-font-size-base;
  655. letter-spacing: 0.020em;
  656. }
  657. .md-button {
  658. letter-spacing: 0.010em;
  659. }
  660. /************
  661. * Defaults
  662. ************/
  663. button,
  664. select,
  665. html,
  666. textarea,
  667. input {
  668. font-family: $font-family;
  669. }
  670. select,
  671. button,
  672. textarea,
  673. input {
  674. font-size: 100%;
  675. }
  676. /*
  677. *
  678. * Responsive attributes
  679. *
  680. * References:
  681. * 1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex
  682. * 2) https://css-tricks.com/almanac/properties/f/flex/
  683. * 3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/
  684. * 4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
  685. * 5) http://godban.com.ua/projects/flexgrid
  686. *
  687. *
  688. */
  689. @mixin flex-order-for-name($sizes:null) {
  690. @if $sizes == null {
  691. $sizes : '';
  692. .flex-order {
  693. order : 0;
  694. }
  695. }
  696. @for $i from -20 through 20 {
  697. $order : '';
  698. $suffix : '';
  699. @each $s in $sizes {
  700. @if $s != '' { $suffix : '#{$s}-#{$i}'; }
  701. @else { $suffix : '#{$i}'; }
  702. $order : '.flex-order-#{$suffix}';
  703. }
  704. #{$order} {
  705. order: #{$i};
  706. }
  707. }
  708. }
  709. @mixin offset-for-name($sizes:null) {
  710. @if $sizes == null { $sizes : ''; }
  711. @for $i from 0 through 19 {
  712. $offsets : '';
  713. $suffix : '';
  714. @each $s in $sizes {
  715. @if $s != '' { $suffix : '#{$s}-#{$i * 5}'; }
  716. @else { $suffix : '#{$i * 5}'; }
  717. $offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}';
  718. }
  719. #{$offsets} {
  720. @if $i != 0 { @include rtl-prop(margin-left, margin-right, #{$i * 5 + '%'}, auto); }
  721. @else { @include rtl-prop(margin-left, margin-right, 0, auto); }
  722. }
  723. }
  724. @each $i in 33 {
  725. $offsets : '';
  726. $suffix : '';
  727. @each $s in $sizes {
  728. @if $s != '' { $suffix : '#{$s}-#{$i}'; }
  729. @else { $suffix : '#{$i}'; }
  730. $offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix} ';
  731. }
  732. #{$offsets} {
  733. margin-left: calc(100% / 3);
  734. }
  735. }
  736. @each $i in 66 {
  737. $offsets : '';
  738. $suffix : '';
  739. @each $s in $sizes {
  740. @if $s != '' { $suffix : '#{$s}-#{$i}'; }
  741. @else { $suffix : '#{$i}'; }
  742. $offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix} ';
  743. }
  744. #{$offsets} {
  745. @include rtl-prop(margin-left, margin-right, calc(200% / 3), auto);
  746. }
  747. }
  748. }
  749. @mixin layout-for-name($name: null) {
  750. @if $name == null { $name : ''; }
  751. @if $name != '' { $name : '-#{$name}'; }
  752. .layout#{$name}, .layout#{$name}-column, .layout#{$name}-row {
  753. box-sizing: border-box;
  754. display: -webkit-box;
  755. display: -webkit-flex;
  756. display: -moz-box;
  757. display: -ms-flexbox;
  758. display: flex;
  759. }
  760. .layout#{$name}-column { flex-direction: column; }
  761. .layout#{$name}-row { flex-direction: row; }
  762. }
  763. @mixin flex-properties-for-name($name: null) {
  764. $flexName: 'flex';
  765. @if $name != null {
  766. $flexName: 'flex-#{$name}';
  767. $name : '-#{$name}';
  768. } @else {
  769. $name : '';
  770. }
  771. .#{$flexName} { flex: 1; box-sizing: border-box; } // === flex: 1 1 0%;
  772. .#{$flexName}-grow { flex: 1 1 100%; box-sizing: border-box; }
  773. .#{$flexName}-initial { flex: 0 1 auto; box-sizing: border-box; }
  774. .#{$flexName}-auto { flex: 1 1 auto; box-sizing: border-box; }
  775. .#{$flexName}-none { flex: 0 0 auto; box-sizing: border-box; }
  776. .#{$flexName}-noshrink { flex: 1 0 auto; box-sizing: border-box; }
  777. .#{$flexName}-nogrow { flex: 0 1 auto; box-sizing: border-box; }
  778. // (1-20) * 5 = 0-100%
  779. @for $i from 0 through 20 {
  780. $value : #{$i * 5 + '%'};
  781. .#{$flexName}-#{$i * 5} {
  782. flex: 1 1 100%;
  783. max-width: #{$value};
  784. max-height: 100%;
  785. box-sizing: border-box;
  786. }
  787. .layout-row > .#{$flexName}-#{$i * 5} {
  788. flex: 1 1 100%;
  789. max-width: #{$value};
  790. max-height: 100%;
  791. box-sizing: border-box;
  792. // Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
  793. @if $i == 0 { min-width: 0; }
  794. }
  795. .layout-column > .#{$flexName}-#{$i * 5} {
  796. flex: 1 1 100%;
  797. max-width: 100%;
  798. max-height: #{$value};
  799. box-sizing: border-box;
  800. }
  801. .layout-row {
  802. > .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
  803. > .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
  804. }
  805. .layout-column {
  806. > .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
  807. > .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
  808. }
  809. .layout#{$name}-row > .#{$flexName}-#{$i * 5} {
  810. flex: 1 1 100%;
  811. max-width: #{$value};
  812. max-height: 100%;
  813. box-sizing: border-box;
  814. // Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
  815. @if $i == 0 { min-width: 0; }
  816. }
  817. .layout#{$name}-column > .#{$flexName}-#{$i * 5} {
  818. flex: 1 1 100%;
  819. max-width: 100%;
  820. max-height: #{$value};
  821. box-sizing: border-box;
  822. // Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
  823. @if $i == 0 { min-height: 0; }
  824. }
  825. }
  826. .layout#{$name}-row {
  827. > .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 100%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
  828. > .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 100%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
  829. // Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
  830. > .flex { min-width: 0; }
  831. }
  832. .layout#{$name}-column {
  833. > .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 100%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
  834. > .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 100%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
  835. // Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
  836. > .flex { min-height: 0; }
  837. }
  838. }
  839. @mixin layout-align-for-name($suffix: null) {
  840. // Alignment attributes for layout containers' children
  841. // Arrange on the Main Axis
  842. // center, start, end, space-between, space-around
  843. // flex-start is the default for justify-content
  844. // ------------------------------
  845. $name: 'layout-align';
  846. @if $suffix != null {
  847. $name: 'layout-align-#{$suffix}';
  848. }
  849. .#{$name},
  850. .#{$name}-start-stretch // defaults
  851. {
  852. justify-content : flex-start;
  853. align-content : stretch;
  854. align-items: stretch;
  855. }
  856. // Main Axis Center
  857. .#{$name}-start,
  858. .#{$name}-start-start,
  859. .#{$name}-start-center,
  860. .#{$name}-start-end,
  861. .#{$name}-start-stretch
  862. {
  863. justify-content: flex-start;
  864. }
  865. // Main Axis Center
  866. .#{$name}-center, //stretch
  867. .#{$name}-center-start,
  868. .#{$name}-center-center,
  869. .#{$name}-center-end,
  870. .#{$name}-center-stretch
  871. {
  872. justify-content: center;
  873. }
  874. // Main Axis End
  875. .#{$name}-end, //stretch
  876. .#{$name}-end-start,
  877. .#{$name}-end-center,
  878. .#{$name}-end-end,
  879. .#{$name}-end-stretch
  880. {
  881. justify-content: flex-end;
  882. }
  883. // Main Axis Space Around
  884. .#{$name}-space-around, //stretch
  885. .#{$name}-space-around-center,
  886. .#{$name}-space-around-start,
  887. .#{$name}-space-around-end,
  888. .#{$name}-space-around-stretch
  889. {
  890. justify-content: space-around;
  891. }
  892. // Main Axis Space Between
  893. .#{$name}-space-between, //stretch
  894. .#{$name}-space-between-center,
  895. .#{$name}-space-between-start,
  896. .#{$name}-space-between-end,
  897. .#{$name}-space-between-stretch
  898. {
  899. justify-content: space-between;
  900. }
  901. // Arrange on the Cross Axis
  902. // center, start, end
  903. // stretch is the default for align-items
  904. // ------------------------------
  905. // Cross Axis Start
  906. .#{$name}-start-start,
  907. .#{$name}-center-start,
  908. .#{$name}-end-start,
  909. .#{$name}-space-between-start,
  910. .#{$name}-space-around-start
  911. {
  912. align-items: flex-start;
  913. align-content: flex-start;
  914. }
  915. // Cross Axis Center
  916. .#{$name}-start-center,
  917. .#{$name}-center-center,
  918. .#{$name}-end-center,
  919. .#{$name}-space-between-center,
  920. .#{$name}-space-around-center
  921. {
  922. align-items: center;
  923. align-content: center;
  924. max-width: 100%;
  925. }
  926. // Cross Axis Center IE overflow fix
  927. .#{$name}-start-center > *,
  928. .#{$name}-center-center > *,
  929. .#{$name}-end-center > *,
  930. .#{$name}-space-between-center > *,
  931. .#{$name}-space-around-center > *
  932. {
  933. max-width: 100%;
  934. box-sizing: border-box;
  935. }
  936. // Cross Axis End
  937. .#{$name}-start-end,
  938. .#{$name}-center-end,
  939. .#{$name}-end-end,
  940. .#{$name}-space-between-end,
  941. .#{$name}-space-around-end
  942. {
  943. align-items: flex-end;
  944. align-content: flex-end;
  945. }
  946. // Cross Axis Start
  947. .#{$name}-start-stretch,
  948. .#{$name}-center-stretch,
  949. .#{$name}-end-stretch,
  950. .#{$name}-space-between-stretch,
  951. .#{$name}-space-around-stretch
  952. {
  953. align-items: stretch;
  954. align-content: stretch;
  955. }
  956. }
  957. @mixin layout-padding-margin() {
  958. // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
  959. .layout-padding-sm > *,
  960. .layout-padding > .flex-sm
  961. {
  962. padding: $layout-gutter-width / 4;
  963. }
  964. .layout-padding,
  965. .layout-padding-gt-sm,
  966. .layout-padding-md,
  967. // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
  968. .layout-padding > *,
  969. .layout-padding-gt-sm > *,
  970. .layout-padding-md > *,
  971. .layout-padding > .flex,
  972. .layout-padding > .flex-gt-sm,
  973. .layout-padding > .flex-md
  974. {
  975. padding: $layout-gutter-width / 2;
  976. }
  977. // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
  978. .layout-padding-gt-md > *,
  979. .layout-padding-lg > *,
  980. .layout-padding-gt-lg > *,
  981. .layout-padding > .flex-gt-md,
  982. .layout-padding > .flex-lg,
  983. .layout-padding > .flex-lg,
  984. .layout-padding > .flex-gt-lg
  985. {
  986. padding: $layout-gutter-width / 1;
  987. }
  988. // Margin enhancements
  989. .layout-margin-sm > *,
  990. .layout-margin > .flex-sm
  991. {
  992. margin: $layout-gutter-width / 4;
  993. }
  994. .layout-margin,
  995. .layout-margin-gt-sm,
  996. .layout-margin-md,
  997. // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
  998. .layout-margin > *,
  999. .layout-margin-gt-sm > *,
  1000. .layout-margin-md > *,
  1001. .layout-margin > .flex,
  1002. .layout-margin > .flex-gt-sm,
  1003. .layout-margin > .flex-md
  1004. {
  1005. margin: $layout-gutter-width / 2;
  1006. }
  1007. // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
  1008. .layout-margin-gt-md > *,
  1009. .layout-margin-lg > *,
  1010. .layout-margin-gt-lg > *,
  1011. .layout-margin > .flex-gt-md,
  1012. .layout-margin > .flex-lg,
  1013. .layout-margin > .flex-gt-lg
  1014. {
  1015. margin: $layout-gutter-width / 1;
  1016. }
  1017. .layout-wrap {
  1018. flex-wrap: wrap;
  1019. }
  1020. .layout-nowrap {
  1021. flex-wrap: nowrap;
  1022. }
  1023. .layout-fill {
  1024. margin: 0;
  1025. width: 100%;
  1026. min-height: 100%;
  1027. height: 100%;
  1028. }
  1029. }
  1030. @mixin layouts_for_breakpoint($name:null) {
  1031. @include flex-order-for-name($name);
  1032. @include offset-for-name($name);
  1033. @include layout-align-for-name($name);
  1034. @include flex-properties-for-name($name);
  1035. @include layout-for-name($name);
  1036. }
  1037. .md-panel-outer-wrapper {
  1038. height: 100%;
  1039. left: 0;
  1040. position: absolute;
  1041. top: 0;
  1042. width: 100%;
  1043. }
  1044. ._md-panel-hidden {
  1045. display: none;
  1046. }
  1047. ._md-panel-fullscreen {
  1048. border-radius: 0;
  1049. left: 0;
  1050. min-height: 100%;
  1051. min-width: 100%;
  1052. position: fixed;
  1053. top: 0;
  1054. }
  1055. // Only used when no animations are present.
  1056. ._md-panel-shown .md-panel {
  1057. opacity: 1;
  1058. transition: none;
  1059. }
  1060. .md-panel {
  1061. opacity: 0;
  1062. position: fixed;
  1063. &._md-panel-shown {
  1064. // Only used when custom animations are present.
  1065. // Overridden by the default animations.
  1066. opacity: 1;
  1067. transition: none;
  1068. }
  1069. &._md-panel-animate-enter {
  1070. opacity: 1;
  1071. transition: $material-enter;
  1072. }
  1073. &._md-panel-animate-leave {
  1074. opacity: 1;
  1075. transition: $material-leave;
  1076. }
  1077. &._md-panel-animate-scale-out,
  1078. &._md-panel-animate-fade-out {
  1079. opacity: 0;
  1080. }
  1081. &._md-panel-backdrop {
  1082. height: 100%;
  1083. position: absolute;
  1084. width: 100%;
  1085. }
  1086. &._md-opaque-enter {
  1087. opacity: .48;
  1088. transition: opacity $material-enter-duration $material-enter-timing-function;
  1089. }
  1090. &._md-opaque-leave {
  1091. transition: opacity $material-leave-duration $material-leave-timing-function;
  1092. }
  1093. }
  1094. // The default item height is also specified in the JavaScript.
  1095. $md-autocomplete-item-height: 48px !default;
  1096. $md-autocomplete-clear-size: 30px !default;
  1097. $md-autocomplete-input-offset: 20px !default;
  1098. md-autocomplete {
  1099. border-radius: 2px;
  1100. display: block;
  1101. height: 40px;
  1102. position: relative;
  1103. overflow: visible;
  1104. min-width: 190px;
  1105. &[disabled] {
  1106. input {
  1107. cursor: default;
  1108. }
  1109. }
  1110. &[md-floating-label] {
  1111. border-radius: 0;
  1112. background: transparent;
  1113. height: auto;
  1114. md-input-container {
  1115. padding-bottom: 0;
  1116. }
  1117. md-autocomplete-wrap {
  1118. height: auto;
  1119. }
  1120. .md-show-clear-button {
  1121. button {
  1122. display: block;
  1123. position: absolute;
  1124. right: 0;
  1125. top: $md-autocomplete-input-offset;
  1126. width: $md-autocomplete-clear-size;
  1127. height: $md-autocomplete-clear-size;
  1128. }
  1129. input {
  1130. // Add padding to the end of the input to avoid overlapping with the clear button.
  1131. @include rtl-prop(padding-right, padding-left, $md-autocomplete-clear-size, 0);
  1132. }
  1133. }
  1134. }
  1135. md-autocomplete-wrap {
  1136. // Layout [layout='row']
  1137. display: flex;
  1138. flex-direction: row;
  1139. box-sizing: border-box;
  1140. position: relative;
  1141. overflow: visible;
  1142. height: 40px;
  1143. &.md-menu-showing {
  1144. z-index: $z-index-backdrop + 1;
  1145. }
  1146. md-input-container, input {
  1147. // Layout [flex]
  1148. flex: 1 1 0%;
  1149. box-sizing: border-box;
  1150. min-width : 0;
  1151. }
  1152. md-progress-linear {
  1153. position: absolute;
  1154. bottom: -2px;
  1155. left: 0;
  1156. // When `md-inline` is present, we adjust the offset to go over the `ng-message` space
  1157. &.md-inline {
  1158. bottom: 40px;
  1159. right: 2px;
  1160. left: 2px;
  1161. width: auto;
  1162. }
  1163. .md-mode-indeterminate {
  1164. position: absolute;
  1165. top: 0;
  1166. left: 0;
  1167. width: 100%;
  1168. height: 3px;
  1169. transition: none;
  1170. .md-container {
  1171. transition: none;
  1172. height: 3px;
  1173. }
  1174. &.ng-enter {
  1175. transition: opacity 0.15s linear;
  1176. &.ng-enter-active {
  1177. opacity: 1;
  1178. }
  1179. }
  1180. &.ng-leave {
  1181. transition: opacity 0.15s linear;
  1182. &.ng-leave-active {
  1183. opacity: 0;
  1184. }
  1185. }
  1186. }
  1187. }
  1188. }
  1189. input:not(.md-input) {
  1190. @include md-flat-input();
  1191. width: 100%;
  1192. padding: 0 15px;
  1193. line-height: 40px;
  1194. height: 40px;
  1195. }
  1196. .md-show-clear-button button {
  1197. position: relative;
  1198. line-height: 20px;
  1199. text-align: center;
  1200. width: $md-autocomplete-clear-size;
  1201. height: $md-autocomplete-clear-size;
  1202. cursor: pointer;
  1203. border: none;
  1204. border-radius: 50%;
  1205. padding: 0;
  1206. font-size: 12px;
  1207. background: transparent;
  1208. margin: auto 5px;
  1209. &:after {
  1210. content: '';
  1211. position: absolute;
  1212. top: -6px;
  1213. right: -6px;
  1214. bottom: -6px;
  1215. left: -6px;
  1216. border-radius: 50%;
  1217. transform: scale(0);
  1218. opacity: 0;
  1219. transition: $swift-ease-out;
  1220. }
  1221. &:focus {
  1222. outline: none;
  1223. &:after {
  1224. transform: scale(1);
  1225. opacity: 1;
  1226. }
  1227. }
  1228. md-icon {
  1229. position: absolute;
  1230. top: 50%;
  1231. left: 50%;
  1232. transform: translate3d(-50%, -50%, 0) scale(0.9);
  1233. path {
  1234. stroke-width: 0;
  1235. }
  1236. }
  1237. &.ng-enter {
  1238. transform: scale(0);
  1239. transition: transform 0.15s ease-out;
  1240. &.ng-enter-active {
  1241. transform: scale(1);
  1242. }
  1243. }
  1244. &.ng-leave {
  1245. transition: transform 0.15s ease-out;
  1246. &.ng-leave-active {
  1247. transform: scale(0);
  1248. }
  1249. }
  1250. }
  1251. // IE Only
  1252. @media screen and (-ms-high-contrast: active) {
  1253. $border-color: #fff;
  1254. input {
  1255. border: 1px solid $border-color;
  1256. }
  1257. li:focus {
  1258. color: #fff;
  1259. }
  1260. }
  1261. }
  1262. .md-virtual-repeat-container.md-autocomplete-suggestions-container {
  1263. position: absolute;
  1264. box-shadow: 0 2px 5px rgba(black, 0.25);
  1265. z-index: $z-index-tooltip;
  1266. // Expand the virtualRepeatContainer as much as the max-height from the JavaScript allows.
  1267. // This is necessary for the virtualRepeatContainer to be able to grow back.
  1268. height: 100%;
  1269. }
  1270. .md-virtual-repeat-container.md-not-found {
  1271. height: $md-autocomplete-item-height;
  1272. }
  1273. .md-autocomplete-suggestions {
  1274. margin: 0;
  1275. list-style: none;
  1276. padding: 0;
  1277. li {
  1278. font-size: 14px;
  1279. overflow: hidden;
  1280. padding: 0 15px;
  1281. line-height: $md-autocomplete-item-height;
  1282. height: $md-autocomplete-item-height;
  1283. transition: background 0.15s linear;
  1284. margin: 0;
  1285. white-space: nowrap;
  1286. text-overflow: ellipsis;
  1287. &:focus {
  1288. outline: none;
  1289. }
  1290. &:not(.md-not-found-wrapper) {
  1291. cursor: pointer;
  1292. }
  1293. }
  1294. }
  1295. // IE Only
  1296. @media screen and (-ms-high-contrast: active) {
  1297. md-autocomplete,
  1298. .md-autocomplete-suggestions {
  1299. border: 1px solid #fff;
  1300. }
  1301. }
  1302. // !!Important - Theme-based Background-color can be configured in backdrop-theme.scss
  1303. // - Animate background-color opacity only for `.md-opaque` styles
  1304. md-backdrop {
  1305. transition: opacity 450ms;
  1306. position: absolute;
  1307. top:0;
  1308. bottom:0;
  1309. left: 0;
  1310. right: 0;
  1311. z-index: $z-index-backdrop;
  1312. &.md-menu-backdrop {
  1313. position: fixed !important;
  1314. z-index: $z-index-menu - 1;
  1315. }
  1316. &.md-select-backdrop {
  1317. z-index: $z-index-dialog + 1;
  1318. transition-duration: 0;
  1319. }
  1320. &.md-dialog-backdrop {
  1321. z-index: $z-index-dialog - 1;
  1322. }
  1323. &.md-bottom-sheet-backdrop {
  1324. z-index: $z-index-bottom-sheet - 1;
  1325. }
  1326. &.md-sidenav-backdrop {
  1327. z-index: $z-index-sidenav - 1;
  1328. }
  1329. &.md-click-catcher {
  1330. position: absolute;
  1331. }
  1332. &.md-opaque {
  1333. opacity: .48;
  1334. &.ng-enter {
  1335. opacity: 0;
  1336. }
  1337. &.ng-enter.md-opaque.ng-enter-active {
  1338. opacity: .48;
  1339. }
  1340. &.ng-leave {
  1341. opacity: .48;
  1342. transition: opacity 400ms;
  1343. }
  1344. &.ng-leave.md-opaque.ng-leave-active {
  1345. opacity: 0;
  1346. }
  1347. }
  1348. }
  1349. $bottom-sheet-horizontal-padding: 2 * $baseline-grid !default;
  1350. $bottom-sheet-vertical-padding: 1 * $baseline-grid !default;
  1351. $bottom-sheet-icon-after-margin: 4 * $baseline-grid !default;
  1352. $bottom-sheet-list-item-height: 6 * $baseline-grid !default;
  1353. $bottom-sheet-hidden-bottom-padding: 80px !default;
  1354. $bottom-sheet-header-height: 7 * $baseline-grid !default;
  1355. $bottom-sheet-grid-font-weight: 400 !default;
  1356. md-bottom-sheet {
  1357. position: absolute;
  1358. left: 0;
  1359. right: 0;
  1360. bottom: 0;
  1361. padding: $bottom-sheet-vertical-padding $bottom-sheet-horizontal-padding $bottom-sheet-vertical-padding + $bottom-sheet-hidden-bottom-padding $bottom-sheet-horizontal-padding;
  1362. z-index: $z-index-bottom-sheet;
  1363. border-top-width: 1px;
  1364. border-top-style: solid;
  1365. transform: translate3d(0, $bottom-sheet-hidden-bottom-padding, 0);
  1366. transition: $swift-ease-out;
  1367. transition-property: transform;
  1368. &.md-has-header {
  1369. padding-top: 0;
  1370. }
  1371. &.ng-enter {
  1372. opacity: 0;
  1373. transform: translate3d(0, 100%, 0);
  1374. }
  1375. &.ng-enter-active {
  1376. opacity: 1;
  1377. display: block;
  1378. transform: translate3d(0, $bottom-sheet-hidden-bottom-padding, 0) !important;
  1379. }
  1380. &.ng-leave-active {
  1381. transform: translate3d(0, 100%, 0) !important;
  1382. transition: $swift-ease-in;
  1383. }
  1384. .md-subheader {
  1385. background-color: transparent;
  1386. font-family: $font-family;
  1387. line-height: $bottom-sheet-header-height;
  1388. padding: 0;
  1389. white-space: nowrap;
  1390. }
  1391. md-inline-icon {
  1392. display: inline-block;
  1393. height: 24px;
  1394. width: 24px;
  1395. fill: #444;
  1396. }
  1397. md-list-item {
  1398. display: flex;
  1399. outline: none;
  1400. &:hover {
  1401. cursor: pointer;
  1402. }
  1403. }
  1404. &.md-list {
  1405. md-list-item {
  1406. padding: 0;
  1407. align-items: center;
  1408. height: $bottom-sheet-list-item-height;
  1409. }
  1410. }
  1411. &.md-grid {
  1412. padding-left: 3 * $baseline-grid;
  1413. padding-right: 3 * $baseline-grid;
  1414. padding-top: 0;
  1415. md-list {
  1416. display: flex;
  1417. flex-direction: row;
  1418. flex-wrap: wrap;
  1419. transition: all 0.5s;
  1420. align-items: center;
  1421. }
  1422. md-list-item {
  1423. flex-direction: column;
  1424. align-items: center;
  1425. transition: all 0.5s;
  1426. height: 12 * $baseline-grid;
  1427. margin-top: $baseline-grid;
  1428. margin-bottom: $baseline-grid;
  1429. /* Mixin for how many grid items to show per row */
  1430. @mixin grid-items-per-row($num, $alignEdges: false) {
  1431. $width: 100% / $num;
  1432. flex: 1 1 $width;
  1433. max-width: $width;
  1434. @if $alignEdges {
  1435. &:nth-of-type(#{$num}n + 1) {
  1436. align-items: flex-start;
  1437. }
  1438. &:nth-of-type(#{$num}n) {
  1439. align-items: flex-end;
  1440. }
  1441. }
  1442. }
  1443. @media (max-width: $layout-breakpoint-sm) {
  1444. @include grid-items-per-row(3, true);
  1445. }
  1446. @media (min-width: $layout-breakpoint-sm) and (max-width: $layout-breakpoint-md - 1) {
  1447. @include grid-items-per-row(4);
  1448. }
  1449. @media (min-width: $layout-breakpoint-md) and (max-width: $layout-breakpoint-lg - 1) {
  1450. @include grid-items-per-row(6);
  1451. }
  1452. @media (min-width: $layout-breakpoint-lg) {
  1453. @include grid-items-per-row(7);
  1454. }
  1455. // Override of the IE11 fix from @mixin ie11-min-height-flexbug, line 109 mixins.scss
  1456. &::before {
  1457. display: none;
  1458. }
  1459. .md-list-item-content {
  1460. display: flex;
  1461. flex-direction: column;
  1462. align-items: center;
  1463. width: 6 * $baseline-grid;
  1464. padding-bottom: 2 * $baseline-grid;
  1465. }
  1466. .md-grid-item-content {
  1467. border: 1px solid transparent;
  1468. display: flex;
  1469. flex-direction: column;
  1470. align-items: center;
  1471. width: 10 * $baseline-grid;
  1472. }
  1473. .md-grid-text {
  1474. font-weight: $bottom-sheet-grid-font-weight;
  1475. line-height: 2 * $baseline-grid;
  1476. font-size: 2 * $baseline-grid - 3;
  1477. margin: 0;
  1478. white-space: nowrap;
  1479. width: 8 * $baseline-grid;
  1480. text-align: center;
  1481. text-transform: none;
  1482. padding-top: 1 * $baseline-grid;
  1483. }
  1484. }
  1485. }
  1486. }
  1487. // IE only
  1488. @media screen and (-ms-high-contrast: active) {
  1489. md-bottom-sheet {
  1490. border: 1px solid #fff;
  1491. }
  1492. }
  1493. // Material Design Button
  1494. // https://material.google.com/components/buttons.html
  1495. $button-border-radius: 2px !default;
  1496. $button-fab-border-radius: 50% !default;
  1497. $button-icon-border-radius: $button-fab-border-radius !default;
  1498. $button-font-size: $body-font-size-base !default;
  1499. $button-font-size-dense: $body-font-size-base * 13/14 !default;
  1500. $button-line-height: rem(3.60) !default;
  1501. $button-line-height-dense: rem(3.20) !default;
  1502. $button-margin: rem(0.600) rem(0.800) !default;
  1503. $button-min-width: rem(8.800) !default;
  1504. $button-padding: 0 $button-left-right-padding !default;
  1505. // Fab buttons
  1506. $button-fab-line-height: rem(5.600) !default;
  1507. $button-fab-mini-width: rem(4.00) !default;
  1508. $button-fab-mini-height: rem(4.00) !default;
  1509. $button-fab-mini-line-height: rem(4.00) !default;
  1510. $button-fab-toast-offset: $button-fab-height * 0.75 !default;
  1511. $icon-button-height: rem(4.000) !default;
  1512. $icon-button-width: rem(4.000) !default;
  1513. $icon-button-margin: rem(0.600) !default;
  1514. // Fix issue causing buttons in Firefox to be 2px bigger than they should
  1515. button.md-button::-moz-focus-inner {
  1516. border: 0;
  1517. }
  1518. .md-button {
  1519. display: inline-block;
  1520. position: relative; // Required for absolute canvas child elements.
  1521. cursor: pointer;
  1522. /** Alignment adjustments */
  1523. @include dense(min-height, $button-line-height, $button-line-height-dense);
  1524. min-width: $button-min-width;
  1525. @include dense(line-height, $button-line-height, $button-line-height-dense);
  1526. vertical-align: middle;
  1527. align-items: center;
  1528. text-align: center;
  1529. border-radius: $button-border-radius;
  1530. box-sizing: border-box;
  1531. /* Reset default button appearance */
  1532. user-select: none;
  1533. outline: none;
  1534. border: 0;
  1535. /** Custom styling for button */
  1536. padding: $button-padding;
  1537. margin: $button-margin;
  1538. background: transparent;
  1539. color: currentColor;
  1540. white-space: nowrap;
  1541. /* Uppercase text content */
  1542. text-transform: uppercase;
  1543. font-weight: 500;
  1544. @include dense(font-size, $button-font-size, $button-font-size-dense);
  1545. font-style: inherit;
  1546. font-variant: inherit;
  1547. font-family: inherit;
  1548. text-decoration: none;
  1549. // Ink Ripple should not create any overflow.
  1550. overflow: hidden;
  1551. transition: box-shadow $swift-ease-out-duration $swift-ease-out-timing-function,
  1552. background-color $swift-ease-out-duration $swift-ease-out-timing-function;
  1553. &:focus {
  1554. outline: none;
  1555. }
  1556. &:hover, &:focus {
  1557. text-decoration: none;
  1558. }
  1559. // By default $ngAnimate looks for transition durations on the element, when using ng-hide, ng-if, ng-show.
  1560. // The .md-button has a transition duration applied, which means, that $ngAnimate delays the hide process.
  1561. // To avoid this, we need to reset the transition, when $ngAnimate looks for the duration.
  1562. &.ng-hide, &.ng-leave {
  1563. transition: none;
  1564. }
  1565. &.md-cornered {
  1566. border-radius: 0;
  1567. }
  1568. &.md-icon {
  1569. padding: 0;
  1570. background: none;
  1571. }
  1572. &.md-raised {
  1573. &:not([disabled]) {
  1574. @include md-shadow-bottom-z-1();
  1575. }
  1576. }
  1577. &.md-icon-button {
  1578. margin: 0 $icon-button-margin;
  1579. height: $icon-button-height;
  1580. min-width: 0;
  1581. line-height: $icon-size;
  1582. padding: $baseline-grid;
  1583. width: $icon-button-width;
  1584. border-radius: $button-icon-border-radius;
  1585. .md-ripple-container {
  1586. border-radius: $button-icon-border-radius;
  1587. background-clip: padding-box;
  1588. overflow: hidden;
  1589. // The following hack causes Safari/Chrome to respect overflow hidden for ripples
  1590. -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');
  1591. }
  1592. }
  1593. &.md-fab {
  1594. // Include the top/left/bottom/right fab positions
  1595. @include fab-all-positions();
  1596. z-index: $z-index-fab;
  1597. line-height: $button-fab-line-height;
  1598. min-width: 0;
  1599. width: $button-fab-width;
  1600. height: $button-fab-height;
  1601. vertical-align: middle;
  1602. @include md-shadow-bottom-z-1();
  1603. border-radius: $button-fab-border-radius;
  1604. background-clip: padding-box;
  1605. overflow: hidden;
  1606. transition: $swift-ease-in;
  1607. transition-property: background-color, box-shadow, transform;
  1608. .md-ripple-container {
  1609. border-radius: $button-fab-border-radius;
  1610. background-clip: padding-box;
  1611. overflow: hidden;
  1612. // The following hack causes Safari/Chrome to respect overflow hidden for ripples
  1613. -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');
  1614. }
  1615. &.md-mini {
  1616. line-height: $button-fab-mini-line-height;
  1617. width: $button-fab-mini-width;
  1618. height: $button-fab-mini-height;
  1619. }
  1620. &.ng-hide, &.ng-leave {
  1621. transition: none;
  1622. }
  1623. }
  1624. &:not([disabled]) {
  1625. &.md-raised,
  1626. &.md-fab {
  1627. &.md-focused {
  1628. @include md-shadow-bottom-z-1();
  1629. }
  1630. &:active {
  1631. @include md-shadow-bottom-z-2();
  1632. }
  1633. }
  1634. }
  1635. .md-ripple-container {
  1636. border-radius: $button-border-radius;
  1637. background-clip: padding-box;
  1638. overflow: hidden;
  1639. // The following hack causes Safari/Chrome to respect overflow hidden for ripples
  1640. -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');
  1641. }
  1642. }
  1643. // Using `display:block;` is required for correct vertical alignment
  1644. // because '.md-button' uses `display:inline-block;`.
  1645. .md-button.md-icon-button,
  1646. button.md-button.md-fab {
  1647. md-icon {
  1648. display: block;
  1649. }
  1650. }
  1651. .md-toast-open-top {
  1652. .md-button.md-fab-top-left,
  1653. .md-button.md-fab-top-right {
  1654. transition: $swift-ease-out;
  1655. transform: translate3d(0, $button-fab-toast-offset, 0);
  1656. &:not([disabled]) {
  1657. &.md-focused,
  1658. &:hover {
  1659. transform: translate3d(0, $button-fab-toast-offset - 1, 0);
  1660. }
  1661. }
  1662. }
  1663. }
  1664. .md-toast-open-bottom {
  1665. .md-button.md-fab-bottom-left,
  1666. .md-button.md-fab-bottom-right {
  1667. transition: $swift-ease-out;
  1668. transform: translate3d(0, -$button-fab-toast-offset, 0);
  1669. &:not([disabled]) {
  1670. &.md-focused,
  1671. &:hover {
  1672. transform: translate3d(0, -$button-fab-toast-offset - 1, 0);
  1673. }
  1674. }
  1675. }
  1676. }
  1677. .md-button-group {
  1678. display: flex;
  1679. flex: 1;
  1680. width: 100%;
  1681. & > .md-button {
  1682. flex: 1;
  1683. display: block;
  1684. overflow: hidden;
  1685. width: 0;
  1686. border-width: 1px 0px 1px 1px;
  1687. border-radius: 0;
  1688. text-align: center;
  1689. text-overflow: ellipsis;
  1690. white-space: nowrap;
  1691. &:first-child {
  1692. border-radius: 2px 0px 0px 2px;
  1693. }
  1694. &:last-child {
  1695. border-right-width: 1px;
  1696. border-radius: 0px 2px 2px 0px;
  1697. }
  1698. }
  1699. }
  1700. // IE only
  1701. @media screen and (-ms-high-contrast: active) {
  1702. .md-button.md-raised,
  1703. .md-button.md-fab {
  1704. border: 1px solid #fff;
  1705. }
  1706. }
  1707. $card-padding: 16px !default;
  1708. $card-box-shadow: $whiteframe-shadow-1dp !default;
  1709. md-card {
  1710. box-sizing: border-box;
  1711. display: flex;
  1712. flex-direction: column;
  1713. margin: $baseline-grid;
  1714. box-shadow: $card-box-shadow;
  1715. md-card-header {
  1716. padding: $card-padding;
  1717. display: flex;
  1718. flex-direction: row;
  1719. &:first-child {
  1720. md-card-avatar {
  1721. @include rtl-prop(margin-right, margin-left, 12px, auto);
  1722. }
  1723. }
  1724. &:last-child {
  1725. md-card-avatar {
  1726. @include rtl-prop(margin-left, margin-right, 12px, auto);
  1727. }
  1728. }
  1729. md-card-avatar {
  1730. width: 40px;
  1731. height: 40px;
  1732. .md-user-avatar,
  1733. md-icon{
  1734. border-radius: 50%;
  1735. }
  1736. md-icon {
  1737. padding: 8px;
  1738. > svg {
  1739. // Safari workaround for any SVG with padded parent
  1740. height: inherit;
  1741. width: inherit;
  1742. }
  1743. }
  1744. & + md-card-header-text {
  1745. max-height: 40px;
  1746. .md-title {
  1747. font-size: 14px;
  1748. }
  1749. }
  1750. }
  1751. md-card-header-text {
  1752. display: flex;
  1753. flex: 1;
  1754. flex-direction: column;
  1755. .md-subhead {
  1756. font-size: 14px;
  1757. }
  1758. }
  1759. }
  1760. > img,
  1761. > md-card-header img,
  1762. md-card-title-media img {
  1763. box-sizing: border-box;
  1764. display: flex;
  1765. flex: 0 0 auto;
  1766. width: 100%;
  1767. height: auto;
  1768. }
  1769. md-card-title {
  1770. padding: 3 * $card-padding / 2 $card-padding $card-padding;
  1771. display: flex;
  1772. flex: 1 1 auto;
  1773. flex-direction: row;
  1774. & + md-card-content {
  1775. padding-top: 0;
  1776. }
  1777. md-card-title-text {
  1778. flex: 1;
  1779. flex-direction: column;
  1780. display: flex;
  1781. .md-subhead {
  1782. padding-top: 0;
  1783. font-size: 14px;
  1784. }
  1785. &:only-child {
  1786. .md-subhead {
  1787. padding-top: 3 * $card-padding / 4;
  1788. }
  1789. }
  1790. }
  1791. md-card-title-media {
  1792. margin-top: - $card-padding / 2;
  1793. .md-media-sm {
  1794. height: 80px;
  1795. width: 80px;
  1796. }
  1797. .md-media-md {
  1798. height: 112px;
  1799. width: 112px;
  1800. }
  1801. .md-media-lg {
  1802. height: 152px;
  1803. width: 152px;
  1804. }
  1805. }
  1806. }
  1807. md-card-content {
  1808. display: block;
  1809. padding: $card-padding;
  1810. & > p {
  1811. &:first-child {
  1812. margin-top: 0;
  1813. }
  1814. &:last-child {
  1815. margin-bottom: 0;
  1816. }
  1817. }
  1818. .md-media-xl {
  1819. height: 240px;
  1820. width: 240px;
  1821. }
  1822. }
  1823. .md-actions, md-card-actions {
  1824. margin: $baseline-grid;
  1825. &.layout-column {
  1826. .md-button {
  1827. &:not(.md-icon-button) {
  1828. margin: $baseline-grid / 4 0;
  1829. &:first-of-type {
  1830. margin-top: 0;
  1831. }
  1832. &:last-of-type {
  1833. margin-bottom: 0;
  1834. }
  1835. }
  1836. &.md-icon-button {
  1837. margin-top: 3 * $baseline-grid / 4;
  1838. margin-bottom: 3 * $baseline-grid / 4;
  1839. }
  1840. }
  1841. }
  1842. md-card-icon-actions {
  1843. flex: 1;
  1844. justify-content: flex-start;
  1845. display: flex;
  1846. flex-direction: row;
  1847. }
  1848. &:not(.layout-column) .md-button {
  1849. &:not(.md-icon-button) {
  1850. margin: 0 $baseline-grid * .5;
  1851. &:first-of-type {
  1852. @include rtl-prop(margin-left, margin-right, 0, auto);
  1853. }
  1854. &:last-of-type {
  1855. @include rtl-prop(margin-right, margin-left, 0, auto);
  1856. }
  1857. }
  1858. &.md-icon-button {
  1859. margin-left: 3 * $baseline-grid / 4;
  1860. margin-right: 3 * $baseline-grid / 4;
  1861. &:first-of-type {
  1862. @include rtl-prop(margin-left, margin-right, 3 * $baseline-grid / 2, auto);
  1863. }
  1864. &:last-of-type {
  1865. @include rtl-prop(margin-right, margin-left, 3 * $baseline-grid / 2, auto);
  1866. }
  1867. }
  1868. & + md-card-icon-actions {
  1869. flex: 1;
  1870. justify-content: flex-end;
  1871. display: flex;
  1872. flex-direction: row;
  1873. }
  1874. }
  1875. }
  1876. md-card-footer {
  1877. margin-top: auto;
  1878. padding: $card-padding;
  1879. }
  1880. }
  1881. @media screen and (-ms-high-contrast: active) {
  1882. md-card {
  1883. border: 1px solid #fff;
  1884. }
  1885. }
  1886. .md-image-no-fill {
  1887. > img {
  1888. width: auto;
  1889. height: auto;
  1890. }
  1891. }
  1892. //$checkbox-width: 20px !default;
  1893. //$checkbox-height: $checkbox-width !default;
  1894. //$checkbox-border-radius: 2px !default;
  1895. //$checkbox-border-width: 2px !default;
  1896. //
  1897. // ^^ defined in variables.scss
  1898. //
  1899. $checkbox-margin: 16px !default;
  1900. $checkbox-text-margin: 10px !default;
  1901. $checkbox-top: 12px !default;
  1902. .md-inline-form {
  1903. md-checkbox {
  1904. margin: 19px 0 18px;
  1905. }
  1906. }
  1907. md-checkbox {
  1908. box-sizing: border-box;
  1909. display: inline-block;
  1910. margin-bottom: $checkbox-margin;
  1911. white-space: nowrap;
  1912. cursor: pointer;
  1913. outline: none;
  1914. user-select: none;
  1915. position: relative;
  1916. min-width: $checkbox-width;
  1917. min-height: $checkbox-width;
  1918. @include rtl(margin-left, 0, $checkbox-margin);
  1919. @include rtl(margin-right, $checkbox-margin, 0);
  1920. &:last-of-type {
  1921. margin-left: 0;
  1922. margin-right: 0;
  1923. }
  1924. &.md-focused:not([disabled]) {
  1925. .md-container:before {
  1926. left: -8px;
  1927. top: -8px;
  1928. right: -8px;
  1929. bottom: -8px;
  1930. }
  1931. &:not(.md-checked) {
  1932. .md-container:before {
  1933. background-color: rgba(0, 0, 0, 0.12);
  1934. }
  1935. }
  1936. }
  1937. &.md-align-top-left > div.md-container {
  1938. top: $checkbox-top;
  1939. }
  1940. @include checkbox-container;
  1941. .md-label {
  1942. box-sizing: border-box;
  1943. position: relative;
  1944. display: inline-block;
  1945. vertical-align: middle;
  1946. white-space: normal;
  1947. user-select: text;
  1948. @include rtl(margin-left, $checkbox-text-margin + $checkbox-width, 0);
  1949. @include rtl(margin-right, 0, $checkbox-text-margin + $checkbox-width);
  1950. }
  1951. }
  1952. $chip-font-size: rem(1.6) !default;
  1953. $chip-height: rem(3.2) !default;
  1954. $chip-padding: 0 rem(1.2) 0 rem(1.2) !default;
  1955. $chip-input-padding: 0 !default;
  1956. $chip-remove-padding-right: rem(2.2) !default;
  1957. $chip-remove-line-height: rem(2.2) !default;
  1958. $chip-margin: rem(0.8) rem(0.8) 0 0 !default;
  1959. $chip-wrap-padding: 0 0 rem(0.8) rem(0.3) !default;
  1960. $chip-delete-icon-size: rem(1.8) !default;
  1961. $contact-chip-padding: 0 rem(2.5) 0 0 !default;
  1962. $contact-chip-suggestion-image-height: rem(4.0) !default;
  1963. $contact-chip-suggestion-margin: rem(0.8) !default;
  1964. $contact-chip-name-width: rem(12) !default;
  1965. .md-contact-chips {
  1966. .md-chips {
  1967. md-chip {
  1968. @include rtl(padding, $contact-chip-padding, rtl-value($contact-chip-padding));
  1969. .md-contact-avatar {
  1970. @include rtl(float, left, right);
  1971. img {
  1972. height: $chip-height;
  1973. border-radius: $chip-height / 2;
  1974. }
  1975. }
  1976. .md-contact-name {
  1977. display: inline-block;
  1978. height: $chip-height;
  1979. @include rtl-prop(margin-left, margin-right, rem(0.8), auto);
  1980. }
  1981. }
  1982. }
  1983. }
  1984. .md-contact-suggestion {
  1985. height: ($contact-chip-suggestion-margin * 2) + $contact-chip-suggestion-image-height;
  1986. img {
  1987. height: $contact-chip-suggestion-image-height;
  1988. border-radius: $contact-chip-suggestion-image-height / 2;
  1989. margin-top: $contact-chip-suggestion-margin;
  1990. }
  1991. .md-contact-name {
  1992. @include rtl-prop(margin-left, margin-right, $contact-chip-suggestion-margin, auto);
  1993. width: $contact-chip-name-width;
  1994. }
  1995. .md-contact-name, .md-contact-email {
  1996. display: inline-block;
  1997. overflow: hidden;
  1998. text-overflow: ellipsis;
  1999. }
  2000. }
  2001. .md-contact-chips-suggestions li {
  2002. height: 100%;
  2003. }
  2004. .md-chips {
  2005. @include pie-clearfix();
  2006. display: block;
  2007. font-family: $font-family;
  2008. font-size: $chip-font-size;
  2009. @include rtl(padding, $chip-wrap-padding, rtl-value($chip-wrap-padding));
  2010. vertical-align: middle;
  2011. &.md-readonly .md-chip-input-container {
  2012. min-height: $chip-height;
  2013. }
  2014. &:not(.md-readonly) {
  2015. cursor: text;
  2016. }
  2017. &.md-removable {
  2018. md-chip {
  2019. @include rtl-prop(padding-right, padding-left, $chip-remove-padding-right, 0);
  2020. .md-chip-content {
  2021. @include rtl-prop(padding-right, padding-left, rem(0.4), 0);
  2022. }
  2023. }
  2024. }
  2025. md-chip {
  2026. cursor: default;
  2027. border-radius: $chip-height / 2;
  2028. display: block;
  2029. height: $chip-height;
  2030. line-height: $chip-height;
  2031. @include rtl(margin, $chip-margin, rtl-value($chip-margin));
  2032. padding: $chip-padding;
  2033. @include rtl(float, left, right);
  2034. box-sizing: border-box;
  2035. max-width: 100%;
  2036. position: relative;
  2037. .md-chip-content {
  2038. display: block;
  2039. @include rtl(float, left, right);
  2040. white-space: nowrap;
  2041. max-width: 100%;
  2042. overflow: hidden;
  2043. text-overflow: ellipsis;
  2044. &:focus {
  2045. outline: none;
  2046. }
  2047. }
  2048. &._md-chip-content-edit-is-enabled {
  2049. -webkit-user-select: none; /* webkit (safari, chrome) browsers */
  2050. -moz-user-select: none; /* mozilla browsers */
  2051. -khtml-user-select: none; /* webkit (konqueror) browsers */
  2052. -ms-user-select: none; /* IE10+ */
  2053. }
  2054. .md-chip-remove-container {
  2055. position: absolute;
  2056. @include rtl-prop(right, left, 0, auto);
  2057. line-height: $chip-remove-line-height;
  2058. }
  2059. .md-chip-remove {
  2060. text-align: center;
  2061. width: $chip-height;
  2062. height: $chip-height;
  2063. min-width: 0;
  2064. padding: 0;
  2065. background: transparent;
  2066. border: none;
  2067. box-shadow: none;
  2068. margin: 0;
  2069. position: relative;
  2070. md-icon {
  2071. height: $chip-delete-icon-size;
  2072. width: $chip-delete-icon-size;
  2073. position: absolute;
  2074. top: 50%;
  2075. left: 50%;
  2076. transform: translate3d(-50%, -50%, 0);
  2077. }
  2078. }
  2079. }
  2080. .md-chip-input-container {
  2081. display: block;
  2082. line-height: $chip-height;
  2083. @include rtl(margin, $chip-margin, rtl-value($chip-margin));
  2084. padding: $chip-input-padding;
  2085. @include rtl(float, left, right);
  2086. input {
  2087. &:not([type]),&[type="email"],&[type="number"],&[type="tel"],&[type="url"],&[type="text"] {
  2088. border: 0;
  2089. height: $chip-height;
  2090. line-height: $chip-height;
  2091. padding: 0;
  2092. &:focus {
  2093. outline: none;
  2094. }
  2095. }
  2096. }
  2097. md-autocomplete, md-autocomplete-wrap {
  2098. background: transparent;
  2099. height: $chip-height;
  2100. }
  2101. md-autocomplete {
  2102. md-autocomplete-wrap {
  2103. box-shadow: none;
  2104. }
  2105. input {
  2106. position: relative;
  2107. }
  2108. }
  2109. input {
  2110. border:0;
  2111. height: $chip-height;
  2112. line-height: $chip-height;
  2113. padding: 0;
  2114. &:focus {
  2115. outline:none;
  2116. }
  2117. }
  2118. md-autocomplete, md-autocomplete-wrap {
  2119. height: $chip-height;
  2120. }
  2121. md-autocomplete {
  2122. box-shadow: none;
  2123. input {
  2124. position: relative;
  2125. }
  2126. }
  2127. &:not(:first-child) {
  2128. @include rtl(margin, $chip-margin, rtl-value($chip-margin));
  2129. }
  2130. input {
  2131. background:transparent;
  2132. border-width: 0;
  2133. }
  2134. }
  2135. md-autocomplete {
  2136. button {
  2137. display: none;
  2138. }
  2139. }
  2140. }
  2141. // IE only
  2142. @media screen and (-ms-high-contrast: active) {
  2143. .md-chip-input-container,
  2144. md-chip {
  2145. border: 1px solid #fff;
  2146. }
  2147. .md-chip-input-container md-autocomplete {
  2148. border: none;
  2149. }
  2150. }
  2151. md-content {
  2152. display: block;
  2153. position: relative;
  2154. overflow: auto;
  2155. -webkit-overflow-scrolling: touch;
  2156. &[md-scroll-y] {
  2157. overflow-y: auto;
  2158. overflow-x: hidden;
  2159. }
  2160. &[md-scroll-x] {
  2161. overflow-x: auto;
  2162. overflow-y: hidden;
  2163. }
  2164. &[md-scroll-xy] {
  2165. }
  2166. @media print {
  2167. overflow: visible !important;
  2168. }
  2169. }
  2170. /** Styles for mdCalendar. */
  2171. $md-calendar-cell-size: 44px !default;
  2172. $md-calendar-header-height: 40px !default;
  2173. $md-calendar-cell-emphasis-size: 40px !default;
  2174. $md-calendar-side-padding: 16px !default;
  2175. $md-calendar-weeks-to-show: 7 !default;
  2176. $md-calendar-month-label-padding: 8px !default;
  2177. $md-calendar-month-label-font-size: 14px !default;
  2178. $md-calendar-scroll-cue-shadow-radius: 6px !default;
  2179. $md-calendar-width: (7 * $md-calendar-cell-size) + (2 * $md-calendar-side-padding) !default;
  2180. $md-calendar-height:
  2181. ($md-calendar-weeks-to-show * $md-calendar-cell-size) + $md-calendar-header-height !default;
  2182. // Styles for date cells, including day-of-the-week header cells.
  2183. @mixin md-calendar-cell($height: $md-calendar-cell-size) {
  2184. height: $height;
  2185. width: $md-calendar-cell-size;
  2186. text-align: center;
  2187. // Remove all padding and borders so we can completely
  2188. // control the size of the table cells.
  2189. padding: 0;
  2190. border: none;
  2191. // Prevent issues if somebody is applying box-sizing: border-box; eveywhere.
  2192. box-sizing: content-box;
  2193. // The left / right padding is applied to the cells instead of the wrapper
  2194. // because we want the header background and the month dividing border to
  2195. // extend the entire width of the calendar.
  2196. &:first-child {
  2197. @include rtl-prop(padding-left, padding-right, $md-calendar-side-padding, 0);
  2198. }
  2199. &:last-child {
  2200. @include rtl-prop(padding-right, padding-left, $md-calendar-side-padding, 0);
  2201. }
  2202. }
  2203. // Styles for tables used in mdCalendar (the day-of-the-week header and the table of dates itself).
  2204. @mixin md-calendar-table() {
  2205. // Fixed table layout makes IE faster.
  2206. // https://msdn.microsoft.com/en-us/library/ms533020(VS.85).aspx
  2207. table-layout: fixed;
  2208. border-spacing: 0;
  2209. border-collapse: collapse;
  2210. }
  2211. md-calendar {
  2212. font-size: 13px;
  2213. user-select: none;
  2214. }
  2215. // Wrap the scroll with overflow: hidden in order to hide the scrollbar.
  2216. // The inner .md-calendar-scroll-container will using a padding-right to push the
  2217. // scrollbar into the hidden area (done with javascript).
  2218. .md-calendar-scroll-mask {
  2219. display: inline-block;
  2220. overflow: hidden;
  2221. height: $md-calendar-weeks-to-show * $md-calendar-cell-size;
  2222. // The actual scrolling element.
  2223. .md-virtual-repeat-scroller {
  2224. // These two properties are needed to get touch momentum to work.
  2225. // See https://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements
  2226. overflow-y: scroll;
  2227. -webkit-overflow-scrolling: touch;
  2228. &::-webkit-scrollbar {
  2229. display: none;
  2230. }
  2231. }
  2232. // Offsetter is the element that is translateY'ed into view of the user and contains the
  2233. // calendar content.
  2234. .md-virtual-repeat-offsetter {
  2235. width: 100%;
  2236. }
  2237. }
  2238. // Contains the scrolling element (this is the md-virtual-repeat-container).
  2239. .md-calendar-scroll-container {
  2240. // Add an inset shadow to help cue users that the calendar is scrollable. Use a negative x
  2241. // offset to push the vertical edge shadow off to the right so that it's cut off by the edge
  2242. // of the calendar container.
  2243. box-shadow: inset -3px 3px $md-calendar-scroll-cue-shadow-radius rgba(black, 0.2);
  2244. display: inline-block;
  2245. height: $md-calendar-weeks-to-show * $md-calendar-cell-size;
  2246. // Add the shadow radius to the width so that the shadow os pushed off to the side and cut off.
  2247. width: $md-calendar-width + $md-calendar-scroll-cue-shadow-radius;
  2248. }
  2249. // A single date cell in the calendar table.
  2250. .md-calendar-date {
  2251. @include md-calendar-cell();
  2252. &.md-calendar-date-disabled {
  2253. cursor: default;
  2254. }
  2255. }
  2256. // Circle element inside of every date cell used to indicate selection or focus.
  2257. .md-calendar-date-selection-indicator {
  2258. transition: background-color, color $swift-ease-out-duration $swift-ease-out-timing-function;
  2259. border-radius: 50%;
  2260. display: inline-block;
  2261. width: $md-calendar-cell-emphasis-size;
  2262. height: $md-calendar-cell-emphasis-size;
  2263. line-height: $md-calendar-cell-emphasis-size;
  2264. .md-calendar-date:not(.md-disabled) & {
  2265. cursor: pointer;
  2266. }
  2267. }
  2268. // The label above each month (containing the month name and the year, e.g. "Jun 2014").
  2269. .md-calendar-month-label {
  2270. height: $md-calendar-cell-size;
  2271. font-size: $md-calendar-month-label-font-size;
  2272. font-weight: 500; // Roboto Medium
  2273. @include rtl(padding, 0 0 0 $md-calendar-side-padding + $md-calendar-month-label-padding, rtl-value( 0 0 0 $md-calendar-side-padding + $md-calendar-month-label-padding));
  2274. md-calendar-month &:not(.md-calendar-month-label-disabled) {
  2275. cursor: pointer;
  2276. }
  2277. md-icon {
  2278. @include rtl(transform, rotate(180deg), none);
  2279. }
  2280. span {
  2281. vertical-align: middle;
  2282. }
  2283. }
  2284. // Table containing the day-of-the-week header.
  2285. .md-calendar-day-header {
  2286. @include md-calendar-table();
  2287. th {
  2288. @include md-calendar-cell($md-calendar-header-height);
  2289. font-weight: normal;
  2290. }
  2291. }
  2292. // Primary table containing all date cells. Each month is a tbody in this table.
  2293. .md-calendar {
  2294. @include md-calendar-table();
  2295. // Divider between months.
  2296. tr:last-child td {
  2297. border-bottom-width: 1px;
  2298. border-bottom-style: solid;
  2299. }
  2300. // The divider between months doesn't actually change the height of the tbody in which the
  2301. // border appear; it changes the height of the following tbody. The causes the first-child to be
  2302. // 1px shorter than the other months. We fix this by adding an invisible border-top.
  2303. &:first-child {
  2304. border-top: 1px solid transparent;
  2305. }
  2306. // Explicitly set vertical-align to avoid conflicting with popular CSS resets. When
  2307. // vertical-align:baseline is set, month headers are misaligned. Also reset the box-sizing,
  2308. // in case the user set it to border-box.
  2309. // http://meyerweb.com/eric/tools/css/reset/
  2310. tbody, td, tr {
  2311. vertical-align: middle;
  2312. box-sizing: content-box;
  2313. }
  2314. }
  2315. /** Styles for mdDatepicker. */
  2316. $md-datepicker-button-gap: 12px !default; // Space between the text input and the calendar-icon button.
  2317. $md-datepicker-border-bottom-gap: 5px !default; // Space between input and the grey underline.
  2318. $md-date-arrow-size: 5px !default; // Size of the triangle on the right side of the input.
  2319. $md-datepicker-open-animation-duration: 0.2s !default;
  2320. $md-datepicker-triangle-button-width: 36px !default;
  2321. $md-datepicker-input-mask-height: 40px !default;
  2322. $md-datepicker-button-padding: 8px !default;
  2323. md-datepicker {
  2324. // Don't let linebreaks happen between the open icon-button and the input.
  2325. white-space: nowrap;
  2326. overflow: hidden;
  2327. vertical-align: middle;
  2328. }
  2329. .md-inline-form {
  2330. md-datepicker {
  2331. margin-top: 12px;
  2332. }
  2333. }
  2334. // The calendar icon button used to open the calendar pane.
  2335. .md-datepicker-button {
  2336. display: inline-block;
  2337. box-sizing: border-box;
  2338. background: none;
  2339. vertical-align: middle;
  2340. position: relative;
  2341. // Captures any of the click events. This is necessary, because the button has a SVG
  2342. // icon which doesn't propagate the focus event, causing inconsistent behaviour.
  2343. &:before {
  2344. top: 0;
  2345. left: 0;
  2346. bottom: 0;
  2347. right: 0;
  2348. position: absolute;
  2349. content: '';
  2350. speak: none;
  2351. }
  2352. }
  2353. // The input into which the user can type the date.
  2354. .md-datepicker-input {
  2355. @include md-flat-input();
  2356. min-width: 120px;
  2357. max-width: $md-calendar-width - $md-datepicker-button-gap;
  2358. padding: 0 0 $md-datepicker-border-bottom-gap;
  2359. }
  2360. // If the datepicker is inside of a md-input-container
  2361. ._md-datepicker-floating-label {
  2362. > md-datepicker {
  2363. // Prevents the ripple on the triangle from being clipped.
  2364. overflow: visible;
  2365. .md-datepicker-input-container {
  2366. border: none;
  2367. }
  2368. .md-datepicker-button {
  2369. // Prevents the button from wrapping around, as well as it pushing
  2370. // down the error messages more than they should be.
  2371. @include rtl(float, left, right);
  2372. margin-top: $button-left-right-padding * -2;
  2373. top: $button-left-right-padding * 2 - $md-datepicker-border-bottom-gap / 2;
  2374. }
  2375. }
  2376. .md-input {
  2377. float: none;
  2378. }
  2379. &._md-datepicker-has-calendar-icon {
  2380. > label:not(.md-no-float):not(.md-container-ignore) {
  2381. $width-offset: $md-datepicker-triangle-button-width * 2 + $md-datepicker-button-gap;
  2382. $offset: $md-datepicker-triangle-button-width / 2;
  2383. @include rtl(right, $offset, auto);
  2384. @include rtl(left, auto, $offset);
  2385. width: calc(100% - #{$width-offset});
  2386. }
  2387. .md-input-message-animation {
  2388. $margin: $md-datepicker-triangle-button-width + $md-datepicker-button-padding * 2 + $md-datepicker-button-gap;
  2389. @include rtl-prop(margin-left, margin-right, $margin, auto);
  2390. }
  2391. }
  2392. }
  2393. ._md-datepicker-has-triangle-icon {
  2394. // Leave room for the down-triangle button to "overflow" it's parent without modifying scrollLeft.
  2395. // This prevents the element from shifting right when opening via the triangle button.
  2396. @include rtl-prop(padding-right, padding-left, $md-datepicker-triangle-button-width / 2, 0);
  2397. @include rtl-prop(margin-right, margin-left, -$md-datepicker-triangle-button-width / 2, auto);
  2398. }
  2399. // Container for the datepicker input.
  2400. .md-datepicker-input-container {
  2401. // Position relative in order to absolutely position the down-triangle button within.
  2402. position: relative;
  2403. border-bottom-width: 1px;
  2404. border-bottom-style: solid;
  2405. display: inline-block;
  2406. width: auto;
  2407. .md-icon-button + & {
  2408. @include rtl-prop(margin-left, margin-right, $md-datepicker-button-gap, auto);
  2409. }
  2410. &.md-datepicker-focused {
  2411. border-bottom-width: 2px;
  2412. }
  2413. }
  2414. .md-datepicker-is-showing .md-scroll-mask {
  2415. z-index: $z-index-calendar-pane - 1;
  2416. }
  2417. // Floating pane that contains the calendar at the bottom of the input.
  2418. .md-datepicker-calendar-pane {
  2419. // On most browsers the `scale(0)` below prevents this element from
  2420. // overflowing it's parent, however IE and Edge seem to disregard it.
  2421. // The `left: -100%` pulls the element back in order to ensure that
  2422. // it doesn't cause an overflow.
  2423. position: absolute;
  2424. top: 0;
  2425. left: -100%;
  2426. z-index: $z-index-calendar-pane;
  2427. border-width: 1px;
  2428. border-style: solid;
  2429. background: transparent;
  2430. transform: scale(0);
  2431. transform-origin: 0 0;
  2432. transition: transform $md-datepicker-open-animation-duration $swift-ease-out-timing-function;
  2433. &.md-pane-open {
  2434. transform: scale(1);
  2435. }
  2436. }
  2437. // Portion of the floating panel that sits, invisibly, on top of the input.
  2438. .md-datepicker-input-mask {
  2439. height: $md-datepicker-input-mask-height;
  2440. width: $md-calendar-width;
  2441. position: relative;
  2442. overflow: hidden;
  2443. background: transparent;
  2444. pointer-events: none;
  2445. cursor: text;
  2446. }
  2447. // The calendar portion of the floating pane (vs. the input mask).
  2448. .md-datepicker-calendar {
  2449. opacity: 0;
  2450. // Use a modified timing function (from swift-ease-out) so that the opacity part of the
  2451. // animation doesn't come in as quickly so that the floating pane doesn't ever seem to
  2452. // cover up the trigger input.
  2453. transition: opacity $md-datepicker-open-animation-duration cubic-bezier(0.5, 0, 0.25, 1);
  2454. .md-pane-open & {
  2455. opacity: 1;
  2456. }
  2457. md-calendar:focus {
  2458. outline: none;
  2459. }
  2460. }
  2461. // Down triangle/arrow indicating that the datepicker can be opened.
  2462. // We can do this entirely with CSS without needing to load an icon.
  2463. // See https://css-tricks.com/snippets/css/css-triangle/
  2464. .md-datepicker-expand-triangle {
  2465. // Center the triangle inside of the button so that the
  2466. // ink ripple origin looks correct.
  2467. position: absolute;
  2468. top: 50%;
  2469. left: 50%;
  2470. transform: translate(-50%, -50%);
  2471. width: 0;
  2472. height: 0;
  2473. border-left: $md-date-arrow-size solid transparent;
  2474. border-right: $md-date-arrow-size solid transparent;
  2475. border-top: $md-date-arrow-size solid;
  2476. }
  2477. // Button containing the down "disclosure" triangle/arrow.
  2478. .md-datepicker-triangle-button {
  2479. position: absolute;
  2480. @include rtl-prop(right, left, 0, auto);
  2481. bottom: -$md-date-arrow-size / 2;
  2482. // TODO(jelbourn): This position isn't great on all platforms.
  2483. @include rtl(transform, translateX(45%), translateX(-45%));
  2484. }
  2485. // Need crazy specificity to override .md-button.md-icon-button.
  2486. // Only apply this high specificity to the property we need to override.
  2487. .md-datepicker-triangle-button.md-button.md-icon-button {
  2488. height: $md-datepicker-triangle-button-width;
  2489. width: $md-datepicker-triangle-button-width;
  2490. position: absolute;
  2491. padding: $md-datepicker-button-padding;
  2492. }
  2493. // Disabled state for all elements of the picker.
  2494. md-datepicker[disabled] {
  2495. .md-datepicker-input-container {
  2496. border-bottom-color: transparent;
  2497. }
  2498. .md-datepicker-triangle-button {
  2499. display: none;
  2500. }
  2501. }
  2502. // Open state for all of the elements of the picker.
  2503. .md-datepicker-open {
  2504. overflow: hidden;
  2505. .md-datepicker-input-container,
  2506. input.md-input {
  2507. border-bottom-color: transparent;
  2508. }
  2509. .md-datepicker-triangle-button,
  2510. &.md-input-has-value > label,
  2511. &.md-input-has-placeholder > label {
  2512. display: none;
  2513. }
  2514. }
  2515. // When the position of the floating calendar pane is adjusted to remain inside
  2516. // of the viewport, hide the inputput mask, as the text input will no longer be
  2517. // directly underneath it.
  2518. .md-datepicker-pos-adjusted .md-datepicker-input-mask {
  2519. display: none;
  2520. }
  2521. // Animate the calendar inside of the floating calendar pane such that it appears to "scroll" into
  2522. // view while the pane is opening. This is done as a cue to users that the calendar is scrollable.
  2523. .md-datepicker-calendar-pane {
  2524. .md-calendar {
  2525. transform: translateY(-85px);
  2526. transition: transform 0.65s $swift-ease-out-timing-function;
  2527. transition-delay: 0.125s;
  2528. }
  2529. &.md-pane-open .md-calendar {
  2530. transform: translateY(0);
  2531. }
  2532. }
  2533. $dialog-padding: $baseline-grid * 3 !default;
  2534. .md-dialog-is-showing {
  2535. max-height: 100%;
  2536. }
  2537. .md-dialog-container {
  2538. display: flex;
  2539. justify-content: center;
  2540. align-items: center;
  2541. position: absolute;
  2542. top: 0;
  2543. left: 0;
  2544. width: 100%;
  2545. height: 100%;
  2546. z-index: $z-index-dialog;
  2547. overflow: hidden;
  2548. }
  2549. md-dialog {
  2550. &.md-transition-in {
  2551. opacity: 1;
  2552. transition: $swift-ease-out;
  2553. transform: translate(0,0) scale(1.0);
  2554. }
  2555. &.md-transition-out {
  2556. opacity: 0;
  2557. transition: $swift-ease-out;
  2558. transform: translate(0,100%) scale(0.2);
  2559. }
  2560. opacity: 0;
  2561. min-width: 240px;
  2562. max-width: 80%;
  2563. max-height: 80%;
  2564. position: relative;
  2565. overflow: auto; // stop content from leaking out of dialog parent and fix IE
  2566. box-shadow: $whiteframe-shadow-13dp;
  2567. display: flex;
  2568. flex-direction: column;
  2569. &> form {
  2570. display: flex;
  2571. flex-direction: column;
  2572. overflow: auto;
  2573. }
  2574. .md-dialog-content {
  2575. padding: $dialog-padding;
  2576. }
  2577. md-dialog-content {
  2578. order: 1;
  2579. flex-direction: column;
  2580. overflow: auto;
  2581. -webkit-overflow-scrolling: touch;
  2582. &:not([layout=row]) > *:first-child:not(.md-subheader) {
  2583. margin-top: 0;
  2584. }
  2585. &:focus {
  2586. outline: none;
  2587. }
  2588. .md-subheader {
  2589. margin: 0;
  2590. }
  2591. .md-dialog-content-body {
  2592. width:100%;
  2593. }
  2594. .md-prompt-input-container {
  2595. width: 100%;
  2596. box-sizing: border-box;
  2597. }
  2598. }
  2599. .md-actions, md-dialog-actions {
  2600. display: flex;
  2601. order: 2;
  2602. box-sizing: border-box;
  2603. align-items: center;
  2604. justify-content: flex-end;
  2605. margin-bottom: 0;
  2606. @include rtl(padding-right, $baseline-grid, $baseline-grid * 2);
  2607. @include rtl(padding-left, $baseline-grid * 2, $baseline-grid);
  2608. min-height: $baseline-grid * 6.5;
  2609. overflow: hidden;
  2610. .md-button {
  2611. margin-bottom: $baseline-grid;
  2612. @include rtl(margin-left, $baseline-grid, 0);
  2613. @include rtl(margin-right, 0, $baseline-grid);
  2614. margin-top: $baseline-grid;
  2615. }
  2616. }
  2617. &.md-content-overflow {
  2618. .md-actions, md-dialog-actions {
  2619. border-top-width: 1px;
  2620. border-top-style: solid;
  2621. }
  2622. }
  2623. }
  2624. @media screen and (-ms-high-contrast: active) {
  2625. md-dialog {
  2626. border: 1px solid #fff;
  2627. }
  2628. }
  2629. @media (max-width: $layout-breakpoint-sm - 1) {
  2630. md-dialog.md-dialog-fullscreen {
  2631. min-height: 100%;
  2632. min-width: 100%;
  2633. border-radius: 0;
  2634. }
  2635. }
  2636. md-divider {
  2637. display: block;
  2638. border-top-width: 1px;
  2639. border-top-style: solid;
  2640. margin: 0;
  2641. &[md-inset] {
  2642. @include rtl-prop(margin-left, margin-right, $baseline-grid * 10, auto);
  2643. }
  2644. }
  2645. .layout-row,
  2646. .layout-xs-row, .layout-gt-xs-row,
  2647. .layout-sm-row, .layout-gt-sm-row,
  2648. .layout-md-row, .layout-gt-md-row,
  2649. .layout-lg-row, .layout-gt-lg-row,
  2650. .layout-xl-row {
  2651. & > md-divider {
  2652. border-top-width: 0;
  2653. border-right-width: 1px;
  2654. border-right-style: solid;
  2655. }
  2656. }
  2657. md-fab-speed-dial {
  2658. position: relative;
  2659. display: flex;
  2660. align-items: center;
  2661. // Include the top/left/bottom/right fab positions and set the z-index for absolute positioning
  2662. @include fab-all-positions();
  2663. z-index: $z-index-fab;
  2664. // Allow users to enable/disable hovering over the entire speed dial (i.e. the empty space where
  2665. // items will eventually appear)
  2666. &:not(.md-hover-full) {
  2667. // Turn off pointer events when closed
  2668. pointer-events: none;
  2669. md-fab-trigger, .md-fab-action-item {
  2670. // Always make the trigger and action items always have pointer events (the tooltip looks
  2671. // for the first parent with pointer-events, so we must set this for tooltips to work)
  2672. pointer-events: auto;
  2673. }
  2674. &.md-is-open {
  2675. // Turn on pointer events when open
  2676. pointer-events: auto;
  2677. }
  2678. }
  2679. ._md-css-variables {
  2680. z-index: $z-index-fab;
  2681. }
  2682. &.md-is-open {
  2683. .md-fab-action-item {
  2684. align-items: center;
  2685. }
  2686. }
  2687. md-fab-actions {
  2688. display: flex;
  2689. // Set the height so that the z-index in the JS animation works
  2690. height: auto;
  2691. .md-fab-action-item {
  2692. transition: $swift-ease-in;
  2693. }
  2694. }
  2695. &.md-down {
  2696. flex-direction: column;
  2697. md-fab-trigger {
  2698. order: 1;
  2699. }
  2700. md-fab-actions {
  2701. flex-direction: column;
  2702. order: 2;
  2703. }
  2704. }
  2705. &.md-up {
  2706. flex-direction: column;
  2707. md-fab-trigger {
  2708. order: 2;
  2709. }
  2710. md-fab-actions {
  2711. flex-direction: column-reverse;
  2712. order: 1;
  2713. }
  2714. }
  2715. &.md-left {
  2716. flex-direction: row;
  2717. md-fab-trigger {
  2718. order: 2;
  2719. }
  2720. md-fab-actions {
  2721. flex-direction: row-reverse;
  2722. order: 1;
  2723. .md-fab-action-item {
  2724. transition: $swift-ease-in;
  2725. }
  2726. }
  2727. }
  2728. &.md-right {
  2729. flex-direction: row;
  2730. md-fab-trigger {
  2731. order: 1;
  2732. }
  2733. md-fab-actions {
  2734. flex-direction: row;
  2735. order: 2;
  2736. .md-fab-action-item {
  2737. transition: $swift-ease-in;
  2738. }
  2739. }
  2740. }
  2741. /*
  2742. * Hide some graphics glitches if switching animation types
  2743. */
  2744. &.md-fling-remove, &.md-scale-remove {
  2745. .md-fab-action-item > * {
  2746. visibility: hidden;
  2747. }
  2748. }
  2749. /*
  2750. * Handle the animations
  2751. */
  2752. &.md-fling {
  2753. .md-fab-action-item {
  2754. opacity: 1;
  2755. }
  2756. }
  2757. // For the initial animation, set the duration to be instant
  2758. &.md-fling.md-animations-waiting {
  2759. .md-fab-action-item {
  2760. opacity: 0;
  2761. transition-duration: 0s;
  2762. }
  2763. }
  2764. &.md-scale {
  2765. .md-fab-action-item {
  2766. transform: scale(0);
  2767. transition: $swift-ease-in;
  2768. // Make the scale animation a bit faster since we are delaying each item
  2769. transition-duration: $swift-ease-in-duration / 2.1;
  2770. }
  2771. }
  2772. }
  2773. $button-fab-width: rem(5.600) !default;
  2774. $icon-button-margin: rem(0.600) !default;
  2775. md-fab-toolbar {
  2776. $icon-delay: 200ms;
  2777. // Include the top/left/bottom/right fab positions
  2778. @include fab-all-positions();
  2779. display: block;
  2780. /*
  2781. * Closed styling
  2782. */
  2783. .md-fab-toolbar-wrapper {
  2784. display: block;
  2785. position: relative;
  2786. overflow: hidden;
  2787. // Account for the size of the trigger plus its margin/shadow
  2788. height: $button-fab-width + ($icon-button-margin * 2);
  2789. }
  2790. md-fab-trigger {
  2791. position: absolute;
  2792. z-index: $z-index-fab;
  2793. button {
  2794. overflow: visible !important;
  2795. }
  2796. .md-fab-toolbar-background {
  2797. display: block;
  2798. position: absolute;
  2799. z-index: $z-index-fab + 1;
  2800. opacity: 1;
  2801. transition: $swift-ease-in;
  2802. }
  2803. md-icon {
  2804. position: relative;
  2805. z-index: $z-index-fab + 2;
  2806. opacity: 1;
  2807. // Hide the icon very quickly
  2808. transition: all $icon-delay ease-in;
  2809. }
  2810. }
  2811. &.md-left {
  2812. md-fab-trigger {
  2813. @include rtl-prop(right, left, 0, auto);
  2814. }
  2815. .md-toolbar-tools {
  2816. flex-direction: row-reverse;
  2817. > .md-button:first-child {
  2818. @include rtl-prop(margin-right, margin-left, 0.6rem, auto)
  2819. }
  2820. > .md-button:first-child {
  2821. @include rtl-prop(margin-left, margin-right, -0.8rem, auto);
  2822. }
  2823. > .md-button:last-child {
  2824. @include rtl-prop(margin-right, margin-left, 8px, auto);
  2825. }
  2826. }
  2827. }
  2828. &.md-right {
  2829. md-fab-trigger {
  2830. @include rtl-prop(left, right, 0, auto);
  2831. }
  2832. .md-toolbar-tools {
  2833. flex-direction: row;
  2834. }
  2835. }
  2836. md-toolbar {
  2837. background-color: transparent !important;
  2838. pointer-events: none;
  2839. z-index: $z-index-fab + 3;
  2840. .md-toolbar-tools {
  2841. // Fix some spacing issues with the icons and the trigger
  2842. padding: 0 20px;
  2843. margin-top: 3px;
  2844. }
  2845. .md-fab-action-item {
  2846. opacity: 0;
  2847. transform: scale(0);
  2848. transition: $swift-ease-in;
  2849. // Cut the action item's animation time in half since we delay it in the JS
  2850. transition-duration: $swift-ease-in-duration / 2;
  2851. }
  2852. }
  2853. /*
  2854. * Hover styling
  2855. */
  2856. &.md-is-open {
  2857. md-fab-trigger > button {
  2858. box-shadow: none;
  2859. md-icon {
  2860. opacity: 0;
  2861. }
  2862. }
  2863. .md-fab-action-item {
  2864. opacity: 1;
  2865. transform: scale(1);
  2866. }
  2867. }
  2868. }
  2869. md-grid-list {
  2870. box-sizing: border-box;
  2871. display: block;
  2872. position: relative;
  2873. md-grid-tile,
  2874. md-grid-tile > figure,
  2875. md-grid-tile-header,
  2876. md-grid-tile-footer {
  2877. box-sizing: border-box;
  2878. }
  2879. md-grid-tile {
  2880. display: block;
  2881. position: absolute;
  2882. figure {
  2883. display: flex;
  2884. align-items: center;
  2885. justify-content: center;
  2886. height: 100%;
  2887. position: absolute;
  2888. top: 0;
  2889. right: 0;
  2890. bottom: 0;
  2891. left: 0;
  2892. padding: 0;
  2893. margin: 0;
  2894. }
  2895. // Headers & footers
  2896. md-grid-tile-header,
  2897. md-grid-tile-footer {
  2898. display: flex;
  2899. flex-direction: row;
  2900. align-items: center;
  2901. height: 48px;
  2902. color: #fff;
  2903. background: rgba(0, 0, 0, 0.18);
  2904. overflow: hidden;
  2905. // Positioning
  2906. position: absolute;
  2907. left: 0;
  2908. right: 0;
  2909. h3,
  2910. h4 {
  2911. font-weight: 400;
  2912. margin: 0 0 0 16px;
  2913. }
  2914. h3 {
  2915. font-size: 14px;
  2916. }
  2917. h4 {
  2918. font-size: 12px;
  2919. }
  2920. }
  2921. md-grid-tile-header {
  2922. top: 0;
  2923. }
  2924. md-grid-tile-footer {
  2925. bottom: 0;
  2926. }
  2927. }
  2928. }
  2929. @media screen and (-ms-high-contrast: active) {
  2930. md-grid-tile {
  2931. border: 1px solid #fff;
  2932. }
  2933. md-grid-tile-footer {
  2934. border-top: 1px solid #fff;
  2935. }
  2936. }
  2937. md-icon {
  2938. margin: auto;
  2939. background-repeat: no-repeat no-repeat;
  2940. display: inline-block;
  2941. vertical-align: middle;
  2942. fill: currentColor;
  2943. height: $icon-size;
  2944. width: $icon-size;
  2945. // The icons should not shrink on smaller viewports.
  2946. min-height: $icon-size;
  2947. min-width: $icon-size;
  2948. svg {
  2949. pointer-events: none;
  2950. display: block;
  2951. }
  2952. &[md-font-icon] {
  2953. line-height: $icon-size;
  2954. width: auto;
  2955. }
  2956. }
  2957. //
  2958. //@font-face {
  2959. // font-family:"material";
  2960. // src:url("/dist/material-font/material.eot");
  2961. // font-weight:normal;
  2962. // font-style:normal;
  2963. //}
  2964. //
  2965. //@font-face {
  2966. // font-family:"material";
  2967. // src:url("/dist/material-font/material.eot");
  2968. // src:url("/dist/material-font/material.eot?#iefix") format("embedded-opentype"),
  2969. // url("/dist/material-font/material.woff") format("woff"),
  2970. // url("/dist/material-font/material.ttf") format("truetype"),
  2971. // url("/dist/material-font/material.svg?#material") format("svg");
  2972. // font-weight:normal;
  2973. // font-style:normal;
  2974. //}
  2975. //
  2976. ///* Bootstrap Overrides */
  2977. //[class^="icon-"]:before,
  2978. //[class*=" icon-"]:before {
  2979. // font-family:"material";
  2980. // display:inline-block;
  2981. // vertical-align:middle;
  2982. // line-height:1;
  2983. // font-weight:normal;
  2984. // font-style:normal;
  2985. // speak:none;
  2986. // text-decoration:inherit;
  2987. // text-transform:none;
  2988. // text-rendering:optimizeLegibility;
  2989. // -webkit-font-smoothing:antialiased;
  2990. // -moz-osx-font-smoothing:grayscale;
  2991. //}
  2992. $input-container-padding: 2px !default;
  2993. $input-label-default-offset: 24px !default;
  2994. $input-label-default-scale: 1.0 !default;
  2995. $input-label-float-offset: 6px !default;
  2996. $input-label-float-scale: 0.75 !default;
  2997. $input-label-float-width: $input-container-padding + 16px !default;
  2998. $input-placeholder-offset: $input-label-default-offset !default;
  2999. $input-border-width-default: 1px !default;
  3000. $input-border-width-focused: 2px !default;
  3001. $input-line-height: 26px !default;
  3002. $input-padding-top: 2px !default;
  3003. $input-error-font-size: 12px !default;
  3004. $input-error-height: 24px !default;
  3005. $input-error-line-height: $input-error-font-size + 2px !default;
  3006. $error-padding-top: ($input-error-height - $input-error-line-height) / 2 !default;
  3007. $icon-offset: 36px !default;
  3008. $icon-top-offset: ($icon-offset - $input-padding-top - $input-border-width-focused) / 4 !default;
  3009. $icon-float-focused-top: -8px !default;
  3010. $input-resize-handle-height: 10px !default;
  3011. md-input-container {
  3012. @include pie-clearfix();
  3013. display: inline-block;
  3014. position: relative;
  3015. padding: $input-container-padding;
  3016. margin: 18px 0;
  3017. vertical-align: middle;
  3018. &.md-block {
  3019. display: block;
  3020. }
  3021. // Setup a spacer that is always there as a placeholder for any messages so we don't change
  3022. // height with only 1 message
  3023. .md-errors-spacer {
  3024. @include rtl(float, right, left);
  3025. min-height: $input-error-height;
  3026. // Ensure the element always takes up space, even if empty
  3027. min-width: 1px;
  3028. }
  3029. > md-icon {
  3030. position: absolute;
  3031. top: $icon-top-offset;
  3032. @include rtl(left, 2px, auto);
  3033. @include rtl(right, auto, 2px);
  3034. }
  3035. textarea,
  3036. input[type="text"],
  3037. input[type="password"],
  3038. input[type="datetime"],
  3039. input[type="datetime-local"],
  3040. input[type="date"],
  3041. input[type="month"],
  3042. input[type="time"],
  3043. input[type="week"],
  3044. input[type="number"],
  3045. input[type="email"],
  3046. input[type="url"],
  3047. input[type="search"],
  3048. input[type="tel"],
  3049. input[type="color"] {
  3050. /* remove default appearance from all input/textarea */
  3051. -moz-appearance: none;
  3052. -webkit-appearance: none;
  3053. }
  3054. input[type="date"],
  3055. input[type="datetime-local"],
  3056. input[type="month"],
  3057. input[type="time"],
  3058. input[type="week"] {
  3059. min-height: $input-line-height;
  3060. }
  3061. textarea {
  3062. resize: none;
  3063. overflow: hidden;
  3064. &.md-input {
  3065. min-height: $input-line-height;
  3066. -ms-flex-preferred-size: auto; //IE fix
  3067. }
  3068. // The height usually gets set to 1 line by `.md-input`.
  3069. &[md-no-autogrow] {
  3070. height: auto;
  3071. overflow: auto;
  3072. }
  3073. }
  3074. label:not(.md-container-ignore) {
  3075. position: absolute;
  3076. bottom: 100%;
  3077. @include rtl(left, 0, auto);
  3078. @include rtl(right, auto, 0);
  3079. &.md-required:after {
  3080. content: ' *';
  3081. font-size: 13px;
  3082. vertical-align: top;
  3083. }
  3084. }
  3085. label:not(.md-no-float):not(.md-container-ignore),
  3086. .md-placeholder {
  3087. overflow: hidden;
  3088. text-overflow: ellipsis;
  3089. white-space: nowrap;
  3090. width: 100%;
  3091. order: 1;
  3092. pointer-events: none;
  3093. -webkit-font-smoothing: antialiased;
  3094. @include rtl(padding-left, $input-container-padding + 1px, 0);
  3095. @include rtl(padding-right, 0, $input-container-padding + 1px);
  3096. z-index: 1;
  3097. transform: translate3d(0, $input-label-default-offset + 4, 0) scale($input-label-default-scale);
  3098. transition: transform $swift-ease-out-duration $swift-ease-out-timing-function;
  3099. // The max-width is necessary, because in some browsers, using this together with
  3100. // a calc might cause it to overflow the parent. See #7403
  3101. max-width: 100%;
  3102. @include rtl(transform-origin, left top, right top);
  3103. }
  3104. .md-placeholder {
  3105. position: absolute;
  3106. top: 0;
  3107. opacity: 0;
  3108. transition-property: opacity, transform;
  3109. transform: translate3d(0, $input-placeholder-offset + $baseline-grid * 0.75, 0);
  3110. }
  3111. &.md-input-focused .md-placeholder {
  3112. opacity: 1;
  3113. transform: translate3d(0, $input-placeholder-offset, 0);
  3114. }
  3115. // Placeholder should immediately disappear when the user starts typing
  3116. &.md-input-has-value .md-placeholder {
  3117. transition: none;
  3118. opacity: 0;
  3119. }
  3120. &:not( .md-input-has-value ) input:not( :focus ),
  3121. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-ampm-field,
  3122. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-day-field,
  3123. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-hour-field,
  3124. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-millisecond-field,
  3125. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-minute-field,
  3126. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-month-field,
  3127. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-second-field,
  3128. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-week-field,
  3129. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-year-field,
  3130. &:not( .md-input-has-value ) input:not( :focus )::-webkit-datetime-edit-text {
  3131. color: transparent;
  3132. }
  3133. /*
  3134. * The .md-input class is added to the input/textarea
  3135. */
  3136. .md-input {
  3137. order: 2;
  3138. display: block;
  3139. margin-top: 0;
  3140. background: none;
  3141. padding-top: $input-padding-top;
  3142. padding-bottom: $input-border-width-focused - $input-border-width-default;
  3143. padding-left: 2px;
  3144. padding-right: 2px;
  3145. border-width: 0 0 $input-border-width-default 0;
  3146. line-height: $input-line-height;
  3147. height: $input-line-height + ($input-padding-top * 2);
  3148. -ms-flex-preferred-size: $input-line-height; //IE fix
  3149. border-radius: 0;
  3150. border-style: solid; // Firefox fix
  3151. // Fix number inputs in Firefox to be full-width
  3152. width: 100%;
  3153. box-sizing: border-box;
  3154. // Hacky fix to force vertical alignment between `input` and `textarea`
  3155. // Input and textarea do not align by default:
  3156. // http://jsbin.com/buqomevage/1/edit?html,css,js,output
  3157. @include rtl(float, left, right);
  3158. &:focus {
  3159. outline: none;
  3160. }
  3161. &:invalid {
  3162. outline: none;
  3163. box-shadow: none;
  3164. }
  3165. &.md-no-flex {
  3166. flex: none !important;
  3167. }
  3168. }
  3169. .md-char-counter {
  3170. @include rtl(text-align, right, left);
  3171. @include rtl(padding-right, $input-container-padding, 0);
  3172. @include rtl(padding-left, 0, $input-container-padding);
  3173. }
  3174. //
  3175. // ngMessage base styles - animations moved to input.js
  3176. //
  3177. .md-input-messages-animation {
  3178. position: relative;
  3179. order: 4;
  3180. overflow: hidden;
  3181. @include rtl(clear, left, right);
  3182. &.ng-enter {
  3183. // Upon entering the DOM, messages should be hidden
  3184. .md-input-message-animation {
  3185. opacity: 0;
  3186. margin-top: -100px;
  3187. }
  3188. }
  3189. }
  3190. .md-input-message-animation, .md-char-counter {
  3191. font-size: $input-error-font-size;
  3192. line-height: $input-error-line-height;
  3193. overflow: hidden;
  3194. transition: $swift-ease-in;
  3195. // Default state for messages is to be visible
  3196. opacity: 1;
  3197. margin-top: 0;
  3198. // Add some top padding which is equal to half the difference between the expected height
  3199. // and the actual height
  3200. padding-top: $error-padding-top;
  3201. &:not(.md-char-counter) {
  3202. // Add some padding so that the messages don't touch the character counter
  3203. @include rtl(padding-right, rem(0.5), 0);
  3204. @include rtl(padding-left, 0, rem(0.5));
  3205. }
  3206. }
  3207. &:not(.md-input-invalid) {
  3208. .md-auto-hide {
  3209. .md-input-message-animation {
  3210. opacity: 0;
  3211. margin-top: -100px;
  3212. }
  3213. }
  3214. }
  3215. // Note: This is a workaround to fix an ng-enter flicker bug
  3216. .md-input-message-animation {
  3217. &:not(.ng-animate) {
  3218. opacity: 0;
  3219. margin-top: -100px;
  3220. }
  3221. }
  3222. .md-input-message-animation {
  3223. &.ng-enter {
  3224. opacity: 0;
  3225. margin-top: -100px;
  3226. }
  3227. }
  3228. &.md-input-focused,
  3229. &.md-input-has-placeholder,
  3230. &.md-input-has-value {
  3231. label:not(.md-no-float) {
  3232. transform: translate3d(0, $input-label-float-offset, 0) scale($input-label-float-scale);
  3233. transition: transform $swift-ease-out-timing-function $swift-ease-out-duration,
  3234. width $swift-ease-out-timing-function $swift-ease-out-duration;
  3235. }
  3236. }
  3237. // If we have an existing value; don't animate the transform as it happens on page load and
  3238. // causes erratic/unnecessary animation
  3239. &.md-input-has-value {
  3240. label {
  3241. transition: none;
  3242. }
  3243. }
  3244. // Use wide border in error state or in focused state
  3245. &.md-input-focused .md-input,
  3246. .md-input.ng-invalid.ng-dirty,
  3247. &.md-input-resized .md-input {
  3248. padding-bottom: 0; // Increase border width by 1px, decrease padding by 1
  3249. border-width: 0 0 $input-border-width-focused 0;
  3250. }
  3251. .md-input {
  3252. &[disabled],
  3253. [disabled] & {
  3254. // The negative border width offsets the dotted "border" so
  3255. // it's placed in the same place as the solid one before it.
  3256. background-position: bottom $input-border-width-default * -1 left 0;
  3257. // This background-size is coordinated with a linear-gradient set in input-theme.scss
  3258. // to create a dotted line under the input.
  3259. background-size: 4px 1px;
  3260. background-repeat: repeat-x;
  3261. }
  3262. }
  3263. &.md-icon-float {
  3264. transition: margin-top $swift-ease-out-duration $swift-ease-out-timing-function;
  3265. > label {
  3266. pointer-events: none;
  3267. position: absolute;
  3268. }
  3269. > md-icon {
  3270. top: $icon-top-offset;
  3271. @include rtl(left, 2px, auto);
  3272. @include rtl(right, auto, 2px);
  3273. }
  3274. }
  3275. &.md-icon-left,
  3276. &.md-icon-right {
  3277. > label {
  3278. &:not(.md-no-float):not(.md-container-ignore),
  3279. .md-placeholder {
  3280. width: calc(100% - #{$icon-offset} - #{$input-label-float-width});
  3281. }
  3282. }
  3283. }
  3284. // icon offset should have higher priority as normal label
  3285. &.md-icon-left {
  3286. @include rtl(padding-left, $icon-offset, 0);
  3287. @include rtl(padding-right, 0, $icon-offset);
  3288. > label {
  3289. @include rtl(left, $icon-offset, auto);
  3290. @include rtl(right, auto, $icon-offset);
  3291. }
  3292. }
  3293. &.md-icon-right {
  3294. @include rtl(padding-left, 0, $icon-offset);
  3295. @include rtl(padding-right, $icon-offset, 0);
  3296. > md-icon:last-of-type {
  3297. margin: 0;
  3298. @include rtl(right, 2px, auto);
  3299. @include rtl(left, auto, 2px);
  3300. }
  3301. }
  3302. &.md-icon-left.md-icon-right {
  3303. padding-left: $icon-offset;
  3304. padding-right: $icon-offset;
  3305. > label {
  3306. &:not(.md-no-float):not(.md-container-ignore),
  3307. .md-placeholder {
  3308. width: calc(100% - (#{$icon-offset} * 2));
  3309. }
  3310. }
  3311. }
  3312. }
  3313. .md-resize-wrapper {
  3314. @include pie-clearfix();
  3315. position: relative;
  3316. }
  3317. .md-resize-handle {
  3318. position: absolute;
  3319. bottom: $input-resize-handle-height / -2;
  3320. left: 0;
  3321. height: $input-resize-handle-height;
  3322. background: transparent;
  3323. width: 100%;
  3324. cursor: ns-resize;
  3325. }
  3326. @media screen and (-ms-high-contrast: active) {
  3327. md-input-container.md-default-theme > md-icon {
  3328. fill: #fff;
  3329. }
  3330. }
  3331. $dense-baseline-grid: $baseline-grid / 2 !default;
  3332. $list-h3-margin: 0 0 0px 0 !default;
  3333. $list-h4-margin: 3px 0 1px 0 !default;
  3334. $list-h4-font-weight: 400 !default;
  3335. $list-header-line-height: 1.2em !default;
  3336. $list-p-margin: 0 0 0 0 !default;
  3337. $list-p-line-height: 1.6em !default;
  3338. $list-padding-top: $baseline-grid !default;
  3339. $list-padding-right: 0px !default;
  3340. $list-padding-left: 0px !default;
  3341. $list-padding-bottom: $baseline-grid !default;
  3342. $item-padding-top: 0px !default;
  3343. $item-padding-right: 0px !default;
  3344. $item-padding-left: 0px !default;
  3345. $item-padding-bottom: 0px !default;
  3346. $list-item-padding-vertical: 0px !default;
  3347. $list-item-padding-horizontal: $baseline-grid * 2 !default;
  3348. $list-item-primary-width: $baseline-grid * 7 !default;
  3349. $list-item-primary-avatar-width: $baseline-grid * 5 !default;
  3350. $list-item-primary-icon-width: $baseline-grid * 3 !default;
  3351. $list-item-secondary-left-margin: $baseline-grid * 2 !default;
  3352. $list-item-secondary-button-width: $baseline-grid * 6 !default;
  3353. $list-item-inset-divider-offset: 9 * $baseline-grid !default;
  3354. $list-item-height: 6 * $baseline-grid !default;
  3355. $list-item-two-line-height: 9 * $baseline-grid !default;
  3356. $list-item-three-line-height: 11 * $baseline-grid !default;
  3357. $list-item-dense-height: 12 * $dense-baseline-grid !default;
  3358. $list-item-dense-two-line-height: 15 * $dense-baseline-grid !default;
  3359. $list-item-dense-three-line-height: 19 * $dense-baseline-grid !default;
  3360. $list-item-dense-primary-icon-width: $dense-baseline-grid * 5 !default;
  3361. $list-item-dense-primary-avatar-width: $dense-baseline-grid * 9 !default;
  3362. $list-item-dense-header-font-size: round($subhead-font-size-base * 0.8) !default;
  3363. $list-item-dense-font-size: round($body-font-size-base * 0.85) !default;
  3364. $list-item-dense-line-height: 1.05 !default;
  3365. md-list {
  3366. display: block;
  3367. padding: $list-padding-top $list-padding-right $list-padding-bottom $list-padding-left;
  3368. .md-subheader {
  3369. font-size: $body-font-size-base;
  3370. font-weight: 500;
  3371. letter-spacing: 0.010em;
  3372. line-height: $list-header-line-height;
  3373. }
  3374. &.md-dense {
  3375. md-list-item {
  3376. &,
  3377. .md-list-item-inner {
  3378. min-height: $list-item-dense-height;
  3379. @include ie11-min-height-flexbug($list-item-dense-height);
  3380. // Layout for controls in primary or secondary divs, or auto-infered first child
  3381. md-icon:first-child {
  3382. width: $list-item-dense-primary-icon-width;
  3383. height: $list-item-dense-primary-icon-width;
  3384. }
  3385. > md-icon:first-child:not(.md-avatar-icon) {
  3386. @include rtl-prop(margin-right, margin-left, $list-item-primary-width - $list-item-dense-primary-icon-width, auto);
  3387. }
  3388. .md-avatar, .md-avatar-icon {
  3389. @include rtl-prop(margin-right, margin-left, $list-item-primary-width - $list-item-dense-primary-avatar-width, auto);
  3390. }
  3391. .md-avatar {
  3392. flex: none;
  3393. width: $list-item-dense-primary-avatar-width;
  3394. height: $list-item-dense-primary-avatar-width;
  3395. }
  3396. }
  3397. &.md-2-line,
  3398. &.md-3-line {
  3399. &, & > .md-no-style {
  3400. .md-list-item-text {
  3401. &.md-offset {
  3402. @include rtl-prop(margin-left, margin-right, $list-item-primary-width, auto);
  3403. }
  3404. h3,
  3405. h4,
  3406. p {
  3407. line-height: $list-item-dense-line-height;
  3408. font-size: $list-item-dense-font-size;
  3409. }
  3410. h3 {
  3411. font-size: $list-item-dense-header-font-size;
  3412. }
  3413. }
  3414. }
  3415. }
  3416. &.md-2-line {
  3417. &, & > .md-no-style {
  3418. min-height: $list-item-dense-two-line-height;
  3419. @include ie11-min-height-flexbug($list-item-dense-two-line-height);
  3420. > .md-avatar, .md-avatar-icon {
  3421. margin-top: $baseline-grid * 1.5;
  3422. }
  3423. }
  3424. }
  3425. &.md-3-line {
  3426. &, & > .md-no-style {
  3427. min-height: $list-item-dense-three-line-height;
  3428. @include ie11-min-height-flexbug($list-item-dense-three-line-height);
  3429. > md-icon:first-child,
  3430. > .md-avatar {
  3431. margin-top: $baseline-grid * 2;
  3432. }
  3433. }
  3434. }
  3435. }
  3436. }
  3437. }
  3438. md-list-item {
  3439. // Ensure nested dividers are properly positioned
  3440. position: relative;
  3441. &.md-proxy-focus.md-focused .md-no-style {
  3442. transition: background-color 0.15s linear;
  3443. }
  3444. &._md-button-wrap {
  3445. position: relative;
  3446. > div.md-button:first-child {
  3447. // Layout - Vertically align the item content.
  3448. display: flex;
  3449. align-items: center;
  3450. justify-content: flex-start;
  3451. padding: 0 16px;
  3452. margin: 0;
  3453. font-weight: 400;
  3454. @include rtl(text-align, left, right);
  3455. border: medium none;
  3456. // The button executor should fill the whole list item.
  3457. > .md-button:first-child {
  3458. position: absolute;
  3459. top: 0;
  3460. left: 0;
  3461. height: 100%;
  3462. margin: 0;
  3463. padding: 0;
  3464. }
  3465. .md-list-item-inner {
  3466. // The list item content should fill the complete width.
  3467. width: 100%;
  3468. min-height: inherit;
  3469. }
  3470. }
  3471. }
  3472. &.md-no-proxy,
  3473. .md-no-style {
  3474. position: relative;
  3475. padding: $list-item-padding-vertical $list-item-padding-horizontal;
  3476. // Layout [flex='auto']
  3477. flex: 1 1 auto;
  3478. &.md-button {
  3479. font-size: inherit;
  3480. height: inherit;
  3481. @include rtl(text-align, left, right);
  3482. text-transform: none;
  3483. width: 100%;
  3484. white-space: normal;
  3485. flex-direction: inherit;
  3486. align-items: inherit;
  3487. border-radius: 0;
  3488. margin: 0;
  3489. & > .md-ripple-container {
  3490. border-radius: 0;
  3491. }
  3492. }
  3493. &:focus {
  3494. outline: none
  3495. }
  3496. }
  3497. &.md-clickable:hover {
  3498. cursor: pointer;
  3499. }
  3500. md-divider {
  3501. position: absolute;
  3502. bottom: 0;
  3503. @include rtl-prop(left, right, 0, auto);
  3504. width: 100%;
  3505. &[md-inset] {
  3506. @include rtl-prop(left, right, $list-item-inset-divider-offset, auto);
  3507. width: calc(100% - #{$list-item-inset-divider-offset});
  3508. margin: 0 !important;
  3509. }
  3510. }
  3511. &,
  3512. .md-list-item-inner {
  3513. // Layout [flex layout-align='start center']
  3514. display: flex;
  3515. justify-content: flex-start;
  3516. align-items: center;
  3517. min-height: $list-item-height;
  3518. @include ie11-min-height-flexbug($list-item-height);
  3519. height: auto;
  3520. // Layout for controls in primary or secondary divs, or auto-infered first child
  3521. & > div.md-primary > md-icon:not(.md-avatar-icon),
  3522. & > div.md-secondary > md-icon:not(.md-avatar-icon),
  3523. & > md-icon:first-child:not(.md-avatar-icon),
  3524. > md-icon.md-secondary:not(.md-avatar-icon) {
  3525. width: $list-item-primary-icon-width;
  3526. margin-top: 16px;
  3527. margin-bottom: 12px;
  3528. box-sizing: content-box;
  3529. }
  3530. & > div.md-primary > md-checkbox,
  3531. & > div.md-secondary > md-checkbox,
  3532. & > md-checkbox,
  3533. md-checkbox.md-secondary {
  3534. align-self: center;
  3535. .md-label {
  3536. display: none;
  3537. }
  3538. }
  3539. & > md-icon:first-child:not(.md-avatar-icon) {
  3540. @include rtl-prop(margin-right, margin-left, $list-item-primary-width - $list-item-primary-icon-width, auto);
  3541. }
  3542. & .md-avatar, .md-avatar-icon {
  3543. margin-top: $baseline-grid;
  3544. margin-bottom: $baseline-grid;
  3545. @include rtl-prop(margin-right, margin-left, $list-item-primary-width - $list-item-primary-avatar-width, auto);
  3546. border-radius: 50%;
  3547. box-sizing: content-box;
  3548. }
  3549. & .md-avatar {
  3550. flex: none;
  3551. width: $list-item-primary-avatar-width;
  3552. height: $list-item-primary-avatar-width;
  3553. }
  3554. & .md-avatar-icon {
  3555. padding: 8px;
  3556. // Set the width/height to the same as the icon to fix issue on iOS Safari where the
  3557. // height: 100% was causing it to be larger than it's parent
  3558. svg {
  3559. width: $icon-size;
  3560. height: $icon-size;
  3561. }
  3562. }
  3563. & > md-checkbox {
  3564. width: 3 * $baseline-grid;
  3565. @include rtl(margin-left, 3px, 29px);
  3566. @include rtl(margin-right, 29px, 3px);
  3567. margin-top: 16px;
  3568. }
  3569. .md-secondary-container {
  3570. display: flex;
  3571. align-items: center;
  3572. // Per W3C: https://www.w3.org/TR/css-flexbox/#flex-common
  3573. // By default, flex items won’t shrink below their minimum content size.
  3574. // Safari doesn't follow that specification due to a bug and expects the developer to
  3575. // explicitly disable flex shrinking.
  3576. flex-shrink: 0;
  3577. // Using margin auto to move them to the end of the list item is more elegant, because it has
  3578. // a lower priority than a flex filler and isn't introducing any overflow issues.
  3579. // The margin on the top is important to align multiple secondary items vertically.
  3580. margin: auto;
  3581. @include rtl(margin-right, 0, auto);
  3582. @include rtl(margin-left, auto, 0);
  3583. .md-button, .md-icon-button {
  3584. &:last-of-type {
  3585. // Reset 6px margin for the button.
  3586. @include rtl-prop(margin-right, margin-left, 0, auto);
  3587. }
  3588. }
  3589. md-checkbox {
  3590. margin-top: 0;
  3591. margin-bottom: 0;
  3592. &:last-child {
  3593. width: 3 * $baseline-grid;
  3594. @include rtl-prop(margin-right, margin-left, 0, auto);
  3595. }
  3596. }
  3597. md-switch {
  3598. margin-top: 0;
  3599. margin-bottom: 0;
  3600. @include rtl-prop(margin-right, margin-left, -6px, auto);
  3601. }
  3602. }
  3603. & > p, & > .md-list-item-inner > p {
  3604. flex: 1 1 auto;
  3605. margin: 0;
  3606. }
  3607. }
  3608. &.md-2-line,
  3609. &.md-3-line {
  3610. &, & > .md-no-style {
  3611. align-items: flex-start;
  3612. justify-content: center;
  3613. &.md-long-text {
  3614. margin-top: $baseline-grid;
  3615. margin-bottom: $baseline-grid;
  3616. }
  3617. .md-list-item-text {
  3618. flex: 1 1 auto;
  3619. margin: auto;
  3620. text-overflow: ellipsis;
  3621. overflow: hidden;
  3622. &.md-offset {
  3623. @include rtl-prop(margin-left, margin-right, $list-item-primary-width, auto);
  3624. }
  3625. h3 {
  3626. font-size: $subhead-font-size-base;
  3627. font-weight: 400;
  3628. letter-spacing: 0.010em;
  3629. margin: $list-h3-margin;
  3630. line-height: $list-header-line-height;
  3631. overflow: hidden;
  3632. white-space: nowrap;
  3633. text-overflow: ellipsis;
  3634. }
  3635. h4 {
  3636. font-size: $body-font-size-base;
  3637. letter-spacing: 0.010em;
  3638. margin: $list-h4-margin;
  3639. font-weight: $list-h4-font-weight;
  3640. line-height: $list-header-line-height;
  3641. overflow: hidden;
  3642. white-space: nowrap;
  3643. text-overflow: ellipsis;
  3644. }
  3645. p {
  3646. font-size: $body-font-size-base;
  3647. font-weight: 500;
  3648. letter-spacing: 0.010em;
  3649. margin: $list-p-margin;
  3650. line-height: $list-p-line-height;
  3651. }
  3652. }
  3653. }
  3654. }
  3655. &.md-2-line {
  3656. &, & > .md-no-style {
  3657. height: auto;
  3658. min-height: $list-item-two-line-height;
  3659. @include ie11-min-height-flexbug($list-item-two-line-height);
  3660. > .md-avatar, .md-avatar-icon {
  3661. margin-top: $baseline-grid * 1.5;
  3662. }
  3663. > md-icon:first-child {
  3664. align-self: flex-start;
  3665. }
  3666. .md-list-item-text {
  3667. flex: 1 1 auto;
  3668. }
  3669. }
  3670. }
  3671. &.md-3-line {
  3672. &, & > .md-no-style {
  3673. height: auto;
  3674. min-height: $list-item-three-line-height;
  3675. @include ie11-min-height-flexbug($list-item-three-line-height);
  3676. > md-icon:first-child,
  3677. > .md-avatar {
  3678. margin-top: $baseline-grid * 2;
  3679. }
  3680. }
  3681. }
  3682. }
  3683. $menu-border-radius: 2px !default;
  3684. $max-visible-items: 6 !default;
  3685. $menu-item-height: 6 * $baseline-grid !default;
  3686. $dense-menu-item-height: 4 * $baseline-grid !default;
  3687. $max-menu-height: 2 * $baseline-grid + $max-visible-items * $menu-item-height !default;
  3688. $max-dense-menu-height: 2 * $baseline-grid + $max-visible-items * $dense-menu-item-height !default;
  3689. .md-open-menu-container {
  3690. position: fixed;
  3691. left: 0;
  3692. top: 0;
  3693. z-index: $z-index-menu;
  3694. opacity: 0;
  3695. border-radius: $menu-border-radius;
  3696. md-menu-divider {
  3697. margin-top: $baseline-grid / 2;
  3698. margin-bottom: $baseline-grid / 2;
  3699. height: 1px;
  3700. min-height: 1px;
  3701. max-height: 1px;
  3702. width: 100%;
  3703. }
  3704. md-menu-content > * {
  3705. opacity: 0;
  3706. }
  3707. // Don't let the user click something until it's animated
  3708. &:not(.md-clickable) {
  3709. pointer-events: none;
  3710. }
  3711. // enter: menu scales in, then list fade in.
  3712. &.md-active {
  3713. opacity: 1;
  3714. transition: $swift-ease-out;
  3715. transition-duration: 200ms;
  3716. > md-menu-content > * {
  3717. opacity: 1;
  3718. transition: $swift-ease-in;
  3719. transition-duration: 200ms;
  3720. transition-delay: 100ms;
  3721. }
  3722. }
  3723. // leave: the container fades out
  3724. &.md-leave {
  3725. opacity: 0;
  3726. transition: $swift-ease-in;
  3727. transition-duration: 250ms;
  3728. }
  3729. }
  3730. md-menu-content {
  3731. display: flex;
  3732. flex-direction: column;
  3733. padding: $baseline-grid 0;
  3734. max-height: $max-menu-height;
  3735. overflow-y: auto;
  3736. &.md-dense {
  3737. max-height: $max-dense-menu-height;
  3738. md-menu-item {
  3739. height: $dense-menu-item-height;
  3740. min-height: 0px;
  3741. }
  3742. }
  3743. }
  3744. md-menu-item {
  3745. display: flex;
  3746. flex-direction: row;
  3747. min-height: $menu-item-height;
  3748. height: $menu-item-height;
  3749. align-content: center;
  3750. justify-content: flex-start;
  3751. > * {
  3752. width: 100%;
  3753. margin: auto 0;
  3754. padding-left: 2*$baseline-grid;
  3755. padding-right: 2*$baseline-grid;
  3756. }
  3757. /*
  3758. * We cannot use flex on <button> elements due to a bug in Firefox, so we also can't use it on
  3759. * <a> elements. Add some top padding to fix alignment since buttons automatically align their
  3760. * text vertically.
  3761. */
  3762. > a.md-button {
  3763. padding-top: 5px;
  3764. }
  3765. > .md-button {
  3766. // Firefox-specific reset styling to fix alignment issues (see #8464)
  3767. &::-moz-focus-inner {
  3768. padding: 0;
  3769. border: 0
  3770. }
  3771. @include rtl(text-align, left, right);
  3772. display: inline-block;
  3773. border-radius: 0;
  3774. margin: auto 0;
  3775. font-size: (2*$baseline-grid) - 1;
  3776. text-transform: none;
  3777. font-weight: 400;
  3778. height: 100%;
  3779. padding-left: 2*$baseline-grid;
  3780. padding-right: 2*$baseline-grid;
  3781. width:100%;
  3782. md-icon {
  3783. @include rtl(margin, auto 2*$baseline-grid auto 0, auto 0 auto 2*$baseline-grid);
  3784. }
  3785. p {
  3786. display:inline-block;
  3787. margin: auto;
  3788. }
  3789. span {
  3790. margin-top: auto;
  3791. margin-bottom: auto;
  3792. }
  3793. .md-ripple-container {
  3794. border-radius: inherit;
  3795. }
  3796. }
  3797. }
  3798. md-toolbar {
  3799. .md-menu {
  3800. height: auto;
  3801. margin: auto;
  3802. padding: 0;
  3803. }
  3804. }
  3805. @media (max-width: $layout-breakpoint-sm - 1) {
  3806. md-menu-content {
  3807. min-width: 112px;
  3808. }
  3809. @for $i from 3 through 7 {
  3810. md-menu-content[width="#{$i}"] {
  3811. min-width: $i * 56px;
  3812. }
  3813. }
  3814. }
  3815. @media (min-width: $layout-breakpoint-sm) {
  3816. md-menu-content {
  3817. min-width: 96px;
  3818. }
  3819. @for $i from 3 through 7 {
  3820. md-menu-content[width="#{$i}"] {
  3821. min-width: $i * 64px;
  3822. }
  3823. }
  3824. }
  3825. md-toolbar {
  3826. &.md-menu-toolbar {
  3827. h2.md-toolbar-tools {
  3828. line-height: 1rem;
  3829. height: auto;
  3830. padding: 3.5 * $baseline-grid;
  3831. padding-bottom: 1.5 * $baseline-grid;
  3832. }
  3833. }
  3834. // Used to allow hovering from one menu to the
  3835. // next when inside of a toolbar.
  3836. &.md-has-open-menu {
  3837. position: relative;
  3838. z-index: $z-index-menu;
  3839. }
  3840. }
  3841. md-menu-bar {
  3842. padding: 0 2.5 * $baseline-grid;
  3843. display: block;
  3844. position: relative;
  3845. z-index: 2;
  3846. .md-menu {
  3847. display: inline-block;
  3848. padding: 0;
  3849. position: relative;
  3850. }
  3851. button {
  3852. font-size: rem(1.4);
  3853. padding: 0 1.25 * $baseline-grid;
  3854. margin: 0;
  3855. border: 0;
  3856. background-color: transparent;
  3857. height: 5 * $baseline-grid;
  3858. }
  3859. md-backdrop.md-menu-backdrop {
  3860. z-index: -2;
  3861. }
  3862. }
  3863. md-menu-content.md-menu-bar-menu.md-dense {
  3864. max-height: none;
  3865. padding: 2 * $baseline-grid 0;
  3866. md-menu-item.md-indent {
  3867. position: relative;
  3868. > md-icon {
  3869. position: absolute;
  3870. padding: 0;
  3871. width: 24px;
  3872. top: 0.75 * $baseline-grid;
  3873. @include rtl-prop(left, right, 3 * $baseline-grid, auto);
  3874. }
  3875. > .md-button, .md-menu > .md-button {
  3876. @include rtl(padding, 0 4 * $baseline-grid 0 8 * $baseline-grid, 0 8 * $baseline-grid 0 4 * $baseline-grid);
  3877. }
  3878. }
  3879. .md-button {
  3880. min-height: 0;
  3881. height: 4 * $baseline-grid;
  3882. span {
  3883. @include rtl(float, left, right);
  3884. }
  3885. span.md-alt-text {
  3886. @include rtl(float, right, left);
  3887. margin: 0 $baseline-grid;
  3888. }
  3889. }
  3890. md-menu-divider {
  3891. margin: $baseline-grid 0;
  3892. }
  3893. md-menu-item > .md-button, .md-menu > .md-button {
  3894. @include rtl(text-align, left, right);
  3895. }
  3896. .md-menu {
  3897. padding: 0;
  3898. > .md-button {
  3899. position: relative;
  3900. margin: 0;
  3901. width: 100%;
  3902. text-transform: none;
  3903. font-weight: normal;
  3904. border-radius: 0px;
  3905. @include rtl-prop(padding-left, padding-right, 2 * $baseline-grid, 0);
  3906. &:after {
  3907. display: block;
  3908. content: '\25BC';
  3909. position: absolute;
  3910. top: 0px;
  3911. speak: none;
  3912. @include rtl(transform, rotate(270deg) scaleY(0.45) scaleX(0.9), rotate(90deg) scaleY(0.45) scaleX(0.9));
  3913. @include rtl-prop(right, left, 3.5 * $baseline-grid, auto);
  3914. }
  3915. }
  3916. }
  3917. }
  3918. /** Matches "md-tabs md-tabs-wrapper" style. */
  3919. $md-nav-bar-height: 48px;
  3920. .md-nav-bar {
  3921. border-style: solid;
  3922. border-width: 0 0 1px;
  3923. height: $md-nav-bar-height;
  3924. position: relative;
  3925. }
  3926. ._md-nav-bar-list {
  3927. outline: none;
  3928. list-style: none;
  3929. margin: 0;
  3930. padding: 0;
  3931. // Layout [layout='row']
  3932. box-sizing: border-box;
  3933. display: flex;
  3934. flex-direction: row;
  3935. }
  3936. .md-nav-item:first-of-type {
  3937. margin-left: 8px;
  3938. }
  3939. // override button styles to look more like tabs
  3940. .md-button._md-nav-button {
  3941. line-height: 24px;
  3942. margin: 0 4px;
  3943. padding: 12px 16px;
  3944. transition: background-color 0.35s $swift-ease-in-out-timing-function;
  3945. &:focus {
  3946. outline: none;
  3947. }
  3948. &:hover {
  3949. background-color: inherit;
  3950. }
  3951. }
  3952. md-nav-ink-bar {
  3953. $duration: $swift-ease-in-out-duration * 0.5;
  3954. $multiplier: 0.5;
  3955. bottom: 0;
  3956. height: 2px;
  3957. left: auto;
  3958. position: absolute;
  3959. right: auto;
  3960. background-color: black;
  3961. &._md-left {
  3962. transition: left ($duration * $multiplier) $swift-ease-in-out-timing-function,
  3963. right $duration $swift-ease-in-out-timing-function;
  3964. }
  3965. &._md-right {
  3966. transition: left $duration $swift-ease-in-out-timing-function,
  3967. right ($duration * $multiplier) $swift-ease-in-out-timing-function;
  3968. }
  3969. // By default $ngAnimate looks for transition durations on the element, when using ng-hide, ng-if, ng-show.
  3970. // The ink bar has a transition duration applied, which means, that $ngAnimate delays the hide process.
  3971. // To avoid this, we need to reset the transition, when $ngAnimate looks for the duration.
  3972. &.ng-animate {
  3973. transition: none;
  3974. }
  3975. }
  3976. md-nav-extra-content {
  3977. min-height: 48px;
  3978. padding-right: 12px;
  3979. }
  3980. $progress-circular-indeterminate-duration: 1568.63ms !default;
  3981. @keyframes indeterminate-rotate {
  3982. 0% { transform: rotate(0deg); }
  3983. 100% { transform: rotate(360deg); }
  3984. }
  3985. // Used to avoid unnecessary layout
  3986. md-progress-circular {
  3987. position: relative;
  3988. display: block;
  3989. &._md-progress-circular-disabled {
  3990. visibility: hidden;
  3991. }
  3992. &.md-mode-indeterminate svg {
  3993. animation: indeterminate-rotate $progress-circular-indeterminate-duration linear infinite;
  3994. }
  3995. svg {
  3996. position: absolute;
  3997. overflow: visible;
  3998. top: 0;
  3999. left: 0;
  4000. }
  4001. }
  4002. $progress-linear-bar-height: 5px !default;
  4003. md-progress-linear {
  4004. display: block;
  4005. position: relative;
  4006. width: 100%;
  4007. height: $progress-linear-bar-height;
  4008. padding-top: 0 !important;
  4009. margin-bottom: 0 !important;
  4010. &._md-progress-linear-disabled {
  4011. visibility: hidden;
  4012. }
  4013. .md-container {
  4014. display:block;
  4015. position: relative;
  4016. overflow: hidden;
  4017. width:100%;
  4018. height: $progress-linear-bar-height;
  4019. transform: translate(0, 0) scale(1, 1);
  4020. .md-bar {
  4021. position: absolute;
  4022. left: 0;
  4023. top: 0;
  4024. bottom: 0;
  4025. width: 100%;
  4026. height: $progress-linear-bar-height;
  4027. }
  4028. .md-dashed:before {
  4029. content: "";
  4030. display: none;
  4031. position: absolute;
  4032. margin-top: 0;
  4033. height: $progress-linear-bar-height;
  4034. width: 100%;
  4035. background-color: transparent;
  4036. background-size: 10px 10px !important;
  4037. background-position: 0px -23px;
  4038. }
  4039. .md-bar1, .md-bar2 {
  4040. // Just set the transition information here.
  4041. // Note: the actual transform values are calculated in JS
  4042. transition: transform 0.2s linear;
  4043. }
  4044. // ************************************************************
  4045. // Animations for modes: Determinate, InDeterminate, and Query
  4046. // ************************************************************
  4047. &.md-mode-query {
  4048. .md-bar1 {
  4049. display: none;
  4050. }
  4051. .md-bar2 {
  4052. transition: all 0.2s linear;
  4053. animation: query .8s infinite cubic-bezier(0.390, 0.575, 0.565, 1.000);
  4054. }
  4055. }
  4056. &.md-mode-determinate {
  4057. .md-bar1 {
  4058. display: none;
  4059. }
  4060. }
  4061. &.md-mode-indeterminate {
  4062. .md-bar1 {
  4063. animation: md-progress-linear-indeterminate-scale-1 4s infinite,
  4064. md-progress-linear-indeterminate-1 4s infinite;
  4065. }
  4066. .md-bar2 {
  4067. animation: md-progress-linear-indeterminate-scale-2 4s infinite,
  4068. md-progress-linear-indeterminate-2 4s infinite;
  4069. }
  4070. }
  4071. &.ng-hide
  4072. ._md-progress-linear-disabled & {
  4073. animation: none;
  4074. .md-bar1 {
  4075. animation-name: none;
  4076. }
  4077. .md-bar2 {
  4078. animation-name: none;
  4079. }
  4080. }
  4081. }
  4082. // Special animations for the `buffer` mode
  4083. .md-container.md-mode-buffer {
  4084. background-color: transparent !important;
  4085. transition: all 0.2s linear;
  4086. .md-dashed:before {
  4087. display: block;
  4088. animation: buffer 3s infinite linear;
  4089. }
  4090. }
  4091. }
  4092. @keyframes query {
  4093. 0% {
  4094. opacity: 1;
  4095. transform: translateX(35%) scale(.3, 1);
  4096. }
  4097. 100% {
  4098. opacity: 0;
  4099. transform: translateX(-50%) scale(0, 1);
  4100. }
  4101. }
  4102. @keyframes buffer {
  4103. 0% {
  4104. opacity: 1;
  4105. background-position: 0px -23px;
  4106. }
  4107. 50% {
  4108. opacity: 0;
  4109. }
  4110. 100% {
  4111. opacity: 1;
  4112. background-position: -200px -23px;
  4113. }
  4114. }
  4115. @keyframes md-progress-linear-indeterminate-scale-1 {
  4116. 0% {
  4117. transform: scaleX(0.1);
  4118. animation-timing-function: linear;
  4119. }
  4120. 36.6% {
  4121. transform: scaleX(0.1);
  4122. animation-timing-function: cubic-bezier(0.334731432, 0.124819821, 0.785843996, 1);
  4123. }
  4124. 69.15% {
  4125. transform: scaleX(0.83);
  4126. animation-timing-function: cubic-bezier(0.225732004, 0, 0.233648906, 1.3709798);
  4127. }
  4128. 100% {
  4129. transform: scaleX(0.1);
  4130. }
  4131. }
  4132. @keyframes md-progress-linear-indeterminate-1 {
  4133. 0% {
  4134. left: -378.6 * 100% / 360;
  4135. animation-timing-function: linear;
  4136. }
  4137. 20% {
  4138. left: -378.6 * 100% / 360;
  4139. animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495818703);
  4140. }
  4141. 69.15% {
  4142. left: 77.4 * 100% / 360;
  4143. animation-timing-function: cubic-bezier(0.302435, 0.38135197, 0.55, 0.956352125);
  4144. }
  4145. 100% {
  4146. left: 343.6 * 100% / 360;
  4147. }
  4148. }
  4149. @keyframes md-progress-linear-indeterminate-scale-2 {
  4150. 0% {
  4151. transform: scaleX(0.1);
  4152. animation-timing-function: cubic-bezier(0.205028172, 0.057050836, 0.57660995, 0.453970841);
  4153. }
  4154. 19.15% {
  4155. transform: scaleX(0.57);
  4156. animation-timing-function: cubic-bezier(0.152312994, 0.196431957, 0.648373778, 1.00431535);
  4157. }
  4158. 44.15% {
  4159. transform: scaleX(0.91);
  4160. animation-timing-function: cubic-bezier(0.25775882, -0.003163357, 0.211761916, 1.38178961);
  4161. }
  4162. 100% {
  4163. transform: scaleX(0.1);
  4164. }
  4165. }
  4166. @keyframes md-progress-linear-indeterminate-2 {
  4167. 0% {
  4168. left: -197.6 * 100% / 360;
  4169. animation-timing-function: cubic-bezier(0.15, 0, 0.5150584, 0.409684966);
  4170. }
  4171. 25% {
  4172. left: -62.1 * 100% / 360;
  4173. animation-timing-function: cubic-bezier(0.3103299, 0.284057684, 0.8, 0.733718979);
  4174. }
  4175. 48.35% {
  4176. left: 106.2 * 100% / 360;
  4177. animation-timing-function: cubic-bezier(0.4, 0.627034903, 0.6, 0.902025796);
  4178. }
  4179. 100% {
  4180. left: 422.6 * 100% / 360;
  4181. }
  4182. }
  4183. $radio-width: 20px !default;
  4184. $radio-height: $radio-width !default;
  4185. $radio-text-margin: 10px !default;
  4186. $radio-top-left: 12px !default;
  4187. $radio-margin: 16px !default;
  4188. @mixin md-radio-button-disabled {
  4189. cursor: default;
  4190. .md-container {
  4191. cursor: default;
  4192. }
  4193. }
  4194. md-radio-button {
  4195. box-sizing: border-box;
  4196. display: block;
  4197. margin-bottom: $radio-margin;
  4198. white-space: nowrap;
  4199. cursor: pointer;
  4200. position: relative;
  4201. // When the radio-button is disabled.
  4202. &[disabled] {
  4203. @include md-radio-button-disabled();
  4204. }
  4205. .md-container {
  4206. position: absolute;
  4207. top: 50%;
  4208. transform: translateY(-50%);
  4209. box-sizing: border-box;
  4210. display: inline-block;
  4211. width: $radio-width;
  4212. height: $radio-width;
  4213. cursor: pointer;
  4214. @include rtl(left, 0, auto);
  4215. @include rtl(right, auto, 0);
  4216. .md-ripple-container {
  4217. position: absolute;
  4218. display: block;
  4219. width: auto;
  4220. height: auto;
  4221. left: -15px;
  4222. top: -15px;
  4223. right: -15px;
  4224. bottom: -15px;
  4225. }
  4226. &:before {
  4227. box-sizing: border-box;
  4228. background-color: transparent;
  4229. border-radius: 50%;
  4230. content: '';
  4231. position: absolute;
  4232. display: block;
  4233. height: auto;
  4234. left: 0;
  4235. top: 0;
  4236. right: 0;
  4237. bottom: 0;
  4238. transition: all 0.5s;
  4239. width: auto;
  4240. }
  4241. }
  4242. &.md-align-top-left > div.md-container {
  4243. top: $radio-top-left;
  4244. }
  4245. .md-off {
  4246. box-sizing: border-box;
  4247. position: absolute;
  4248. top: 0;
  4249. left: 0;
  4250. width: $radio-width;
  4251. height: $radio-width;
  4252. border-style: solid;
  4253. border-width: 2px;
  4254. border-radius: 50%;
  4255. transition: border-color ease 0.28s;
  4256. }
  4257. .md-on {
  4258. box-sizing: border-box;
  4259. position: absolute;
  4260. top: 0;
  4261. left: 0;
  4262. width: $radio-width;
  4263. height: $radio-width;
  4264. border-radius: 50%;
  4265. transition: transform ease 0.28s;
  4266. transform: scale(0);
  4267. }
  4268. &.md-checked .md-on {
  4269. transform: scale(0.50);
  4270. }
  4271. .md-label {
  4272. box-sizing: border-box;
  4273. position: relative;
  4274. display: inline-block;
  4275. @include rtl(margin-left, $radio-text-margin + $radio-width, 0);
  4276. @include rtl(margin-right, 0, $radio-text-margin + $radio-width);
  4277. vertical-align: middle;
  4278. white-space: normal;
  4279. pointer-events: none;
  4280. width: auto;
  4281. }
  4282. }
  4283. md-radio-group {
  4284. /** Layout adjustments for the radio group. */
  4285. &.layout-column,
  4286. &.layout-xs-column, &.layout-gt-xs-column,
  4287. &.layout-sm-column, &.layout-gt-sm-column,
  4288. &.layout-md-column, &.layout-gt-md-column,
  4289. &.layout-lg-column, &.layout-gt-lg-column,
  4290. &.layout-xl-column {
  4291. md-radio-button {
  4292. margin-bottom: $radio-margin;
  4293. }
  4294. }
  4295. &.layout-row,
  4296. &.layout-xs-row, &.layout-gt-xs-row,
  4297. &.layout-sm-row, &.layout-gt-sm-row,
  4298. &.layout-md-row, &.layout-gt-md-row,
  4299. &.layout-lg-row, &.layout-gt-lg-row,
  4300. &.layout-xl-row {
  4301. md-radio-button {
  4302. margin-top: 0;
  4303. margin-bottom: 0;
  4304. @include rtl(margin-left, 0, $radio-margin);
  4305. @include rtl(margin-right, $radio-margin, 0);
  4306. &:last-of-type {
  4307. margin-left: 0;
  4308. margin-right: 0;
  4309. }
  4310. }
  4311. }
  4312. &:focus {
  4313. outline: none;
  4314. }
  4315. &.md-focused {
  4316. .md-checked .md-container:before {
  4317. left: -8px;
  4318. top: -8px;
  4319. right: -8px;
  4320. bottom: -8px;
  4321. }
  4322. }
  4323. &[disabled] md-radio-button {
  4324. @include md-radio-button-disabled();
  4325. }
  4326. }
  4327. .md-inline-form {
  4328. md-radio-group {
  4329. margin: 18px 0 19px;
  4330. md-radio-button {
  4331. display: inline-block;
  4332. height: 30px;
  4333. padding: 2px;
  4334. box-sizing: border-box;
  4335. margin-top: 0;
  4336. margin-bottom: 0;
  4337. }
  4338. }
  4339. }
  4340. @media screen and (-ms-high-contrast: active) {
  4341. md-radio-button.md-default-theme .md-on {
  4342. background-color: #fff;
  4343. }
  4344. }
  4345. $select-checkbox-border-radius: 2px !default;
  4346. $select-checkbox-border-width: 2px !default;
  4347. $select-checkbox-width: rem(1.4) !default;
  4348. $select-option-height: 48px !default;
  4349. $select-option-padding: 16px !default;
  4350. $select-container-padding: 16px !default;
  4351. $select-container-transition-duration: 350ms !default;
  4352. $select-max-visible-options: 5 !default;
  4353. // Fixes the animations with the floating label when select is inside an input container
  4354. md-input-container {
  4355. &:not([md-no-float]) {
  4356. .md-select-placeholder span:first-child {
  4357. transition: transform $swift-ease-out-duration $swift-ease-out-timing-function;
  4358. @include rtl(transform-origin, left top, right top);
  4359. }
  4360. }
  4361. &.md-input-focused {
  4362. &:not([md-no-float]) {
  4363. .md-select-placeholder span:first-child {
  4364. transform: translateY(-22px) translateX(-2px) scale(0.75);
  4365. }
  4366. }
  4367. }
  4368. }
  4369. .md-select-menu-container {
  4370. position: fixed;
  4371. left: 0;
  4372. top: 0;
  4373. z-index: $z-index-select;
  4374. opacity: 0;
  4375. display: none;
  4376. // Fix 1px alignment issue to line up with text inputs (and spec)
  4377. transform: translateY(-1px);
  4378. // Don't let the user select a new choice while it's animating
  4379. &:not(.md-clickable) {
  4380. pointer-events: none;
  4381. }
  4382. md-progress-circular {
  4383. display: table;
  4384. margin: 3*$baseline-grid auto !important;
  4385. }
  4386. // enter: md-select scales in, then options fade in.
  4387. &.md-active {
  4388. display: block;
  4389. opacity: 1;
  4390. md-select-menu {
  4391. transition: $swift-ease-out;
  4392. transition-duration: 150ms;
  4393. > * {
  4394. opacity: 1;
  4395. transition: $swift-ease-in;
  4396. transition-duration: 150ms;
  4397. transition-delay: 100ms;
  4398. }
  4399. }
  4400. }
  4401. // leave: the container fades out
  4402. &.md-leave {
  4403. opacity: 0;
  4404. transition: $swift-ease-in;
  4405. transition-duration: 250ms;
  4406. }
  4407. }
  4408. md-input-container > md-select {
  4409. margin: 0;
  4410. order: 2;
  4411. }
  4412. // Show the asterisk on the placeholder if the element is required
  4413. //
  4414. // NOTE: When the input has a value and uses a floating label, the floating label will show the
  4415. // asterisk denoting that it is required
  4416. md-input-container:not(.md-input-has-value) {
  4417. md-select[required]:not(.md-no-asterisk), md-select.ng-required:not(.md-no-asterisk) {
  4418. .md-select-value span:first-child:after {
  4419. content: ' *';
  4420. font-size: 13px;
  4421. vertical-align: top;
  4422. }
  4423. }
  4424. }
  4425. md-input-container.md-input-invalid {
  4426. md-select {
  4427. .md-select-value {
  4428. border-bottom-style: solid;
  4429. padding-bottom: 1px;
  4430. }
  4431. }
  4432. }
  4433. md-select {
  4434. display: flex;
  4435. margin: 2.5*$baseline-grid 0 3*$baseline-grid + 2 0;
  4436. &[required], &.ng-required {
  4437. &.ng-invalid:not(.md-no-asterisk) {
  4438. .md-select-value span:first-child:after {
  4439. content: ' *';
  4440. font-size: 13px;
  4441. vertical-align: top;
  4442. }
  4443. }
  4444. }
  4445. &[disabled] .md-select-value {
  4446. background-position: 0 bottom;
  4447. // This background-size is coordinated with a linear-gradient set in select-theme.scss
  4448. // to create a dotted line under the input.
  4449. background-size: 4px 1px;
  4450. background-repeat: repeat-x;
  4451. margin-bottom: -1px; // Shift downward so dotted line is positioned the same as other bottom borders
  4452. }
  4453. &:focus {
  4454. outline: none;
  4455. }
  4456. &[disabled]:hover {
  4457. cursor: default;
  4458. }
  4459. &:not([disabled]) {
  4460. &:hover {
  4461. cursor: pointer
  4462. }
  4463. &.ng-invalid.ng-touched {
  4464. .md-select-value {
  4465. border-bottom-style: solid;
  4466. padding-bottom: 1px;
  4467. }
  4468. }
  4469. &:focus {
  4470. .md-select-value {
  4471. border-bottom-width: 2px;
  4472. border-bottom-style: solid;
  4473. padding-bottom: 0;
  4474. }
  4475. &.ng-invalid.ng-touched {
  4476. .md-select-value {
  4477. padding-bottom: 0;
  4478. }
  4479. }
  4480. }
  4481. }
  4482. }
  4483. // Fix value by 1px to align with standard text inputs (and spec)
  4484. md-input-container.md-input-has-value .md-select-value {
  4485. > span:not(.md-select-icon) {
  4486. transform: translate3d(0, 1px, 0);
  4487. }
  4488. }
  4489. .md-select-value {
  4490. display: flex;
  4491. align-items: center;
  4492. padding: 2px 2px 1px;
  4493. border-bottom-width: 1px;
  4494. border-bottom-style: solid;
  4495. background-color: rgba(0,0,0,0);
  4496. position: relative;
  4497. box-sizing: content-box;
  4498. min-width: 8 * $baseline-grid;
  4499. min-height: 26px;
  4500. flex-grow: 1;
  4501. > span:not(.md-select-icon) {
  4502. max-width: 100%;
  4503. flex: 1 1 auto;
  4504. text-overflow: ellipsis;
  4505. white-space: nowrap;
  4506. overflow: hidden;
  4507. .md-text {
  4508. display: inline;
  4509. }
  4510. }
  4511. .md-select-icon {
  4512. display: block;
  4513. align-items: flex-end;
  4514. text-align: end;
  4515. width: 3 * $baseline-grid;
  4516. margin: 0 .5 * $baseline-grid;
  4517. transform: translate3d(0, -2px, 0);
  4518. font-size: 1.2rem;
  4519. }
  4520. .md-select-icon:after {
  4521. display: block;
  4522. content: '\25BC';
  4523. position: relative;
  4524. top: 2px;
  4525. speak: none;
  4526. font-size: 13px;
  4527. transform: scaleY(0.5) scaleX(1);
  4528. }
  4529. &.md-select-placeholder {
  4530. display: flex;
  4531. order: 1;
  4532. pointer-events: none;
  4533. -webkit-font-smoothing: antialiased;
  4534. padding-left: 2px;
  4535. z-index: 1;
  4536. }
  4537. }
  4538. md-select-menu {
  4539. display: flex;
  4540. flex-direction: column;
  4541. &.md-reverse {
  4542. flex-direction: column-reverse;
  4543. }
  4544. &:not(.md-overflow) {
  4545. md-content {
  4546. padding-top: $baseline-grid;
  4547. padding-bottom: $baseline-grid;
  4548. }
  4549. }
  4550. box-shadow: $whiteframe-shadow-1dp;
  4551. max-height: ($select-option-height * $select-max-visible-options) + 2 * $baseline-grid;
  4552. min-height: $select-option-height;
  4553. overflow-y: hidden;
  4554. @include rtl(transform-origin, left top, right top);
  4555. transform: scale(1.0);
  4556. md-content {
  4557. min-width: 136px;
  4558. min-height: $select-option-height;
  4559. max-height: ($select-option-height * $select-max-visible-options) + 2 * $baseline-grid;
  4560. overflow-y: auto;
  4561. }
  4562. > * {
  4563. opacity: 0;
  4564. }
  4565. }
  4566. md-option {
  4567. cursor: pointer;
  4568. position: relative;
  4569. display: flex;
  4570. align-items: center;
  4571. width: auto;
  4572. transition: background 0.15s linear;
  4573. &[disabled] {
  4574. cursor: default;
  4575. }
  4576. &:focus {
  4577. outline: none;
  4578. }
  4579. .md-text {
  4580. @include not-selectable();
  4581. width: auto;
  4582. white-space: nowrap;
  4583. overflow: hidden;
  4584. text-overflow: ellipsis;
  4585. }
  4586. padding: 0 $select-option-padding 0 $select-option-padding;
  4587. height: $select-option-height;
  4588. }
  4589. md-optgroup {
  4590. display: block;
  4591. label {
  4592. display: block;
  4593. font-size: rem(1.4);
  4594. text-transform: uppercase;
  4595. padding: $baseline-grid * 2;
  4596. font-weight: 500;
  4597. }
  4598. md-option {
  4599. padding-left: $select-option-padding * 2;
  4600. padding-right: $select-option-padding * 2;
  4601. }
  4602. }
  4603. @media screen and (-ms-high-contrast: active) {
  4604. .md-select-backdrop {
  4605. background-color: transparent;
  4606. }
  4607. md-select-menu {
  4608. border: 1px solid #fff;
  4609. }
  4610. }
  4611. md-select-menu[multiple] {
  4612. md-option.md-checkbox-enabled {
  4613. @include rtl(padding-left, $select-option-padding * 2.5, $select-option-padding);
  4614. @include rtl(padding-right, $select-option-padding, $select-option-padding * 2.5);
  4615. @include checkbox-container('[selected]');
  4616. .md-container {
  4617. @include rtl(margin-left, $select-option-padding * (2 / 3), auto);
  4618. @include rtl(margin-right, auto, $select-option-padding * (2 / 3));
  4619. }
  4620. }
  4621. }
  4622. $sidenav-mobile-width: 320px !default;
  4623. $sidenav-desktop-width: 400px !default;
  4624. $sidenav-min-space: 56px !default;
  4625. md-sidenav {
  4626. box-sizing: border-box;
  4627. position: absolute;
  4628. flex-direction: column;
  4629. z-index: $z-index-sidenav;
  4630. width: $sidenav-mobile-width;
  4631. max-width: $sidenav-mobile-width;
  4632. bottom: 0;
  4633. overflow: auto;
  4634. -webkit-overflow-scrolling: touch;
  4635. ul {
  4636. list-style: none;
  4637. }
  4638. // Animation Comment Syntax: [mdLockedOpen]|[mdClosed]
  4639. // mdLockedOpen states: unlocked, locked, any
  4640. // mdClosed states: open, closed, any
  4641. // Default state: unlocked|open
  4642. // unlocked|closed
  4643. &.md-closed {
  4644. display: none;
  4645. }
  4646. // any|open <=> any|closed
  4647. &.md-closed-add,
  4648. &.md-closed-remove {
  4649. display: flex;
  4650. transition: 0.2s ease-in all;
  4651. }
  4652. // any|open <=> any|closed (animating)
  4653. &.md-closed-add.md-closed-add-active,
  4654. &.md-closed-remove.md-closed-remove-active {
  4655. transition: $swift-ease-out;
  4656. }
  4657. // unlocked|any <=> locked|any
  4658. &.md-locked-open-add,
  4659. &.md-locked-open-remove {
  4660. position: static;
  4661. display: flex;
  4662. transform: translate3d(0, 0, 0);
  4663. }
  4664. // locked|any
  4665. &.md-locked-open,
  4666. &.md-locked-open.md-closed,
  4667. &.md-locked-open.md-closed.md-sidenav-left,
  4668. &.md-locked-open.md-closed.md-sidenav-right {
  4669. position: static;
  4670. display: flex;
  4671. transform: translate3d(0, 0, 0);
  4672. }
  4673. // locked|closed => unlock|closed
  4674. &.md-locked-open-remove.md-closed {
  4675. position: static;
  4676. display: flex;
  4677. transform: translate3d(0, 0, 0);
  4678. }
  4679. // unlocked|closed => locked|closed
  4680. &.md-closed.md-locked-open-add {
  4681. position: static;
  4682. display: flex;
  4683. transform: translate3d(0%, 0, 0);
  4684. }
  4685. // unlocked|closed => locked|closed (pre-animation)
  4686. &.md-closed.md-locked-open-add:not(.md-locked-open-add-active) {
  4687. transition: width $swift-ease-in-duration $swift-ease-in-timing-function,
  4688. min-width $swift-ease-in-duration $swift-ease-in-timing-function;
  4689. width: 0 !important;
  4690. min-width: 0 !important;
  4691. }
  4692. // unlocked|closed => locked|closed (animating)
  4693. &.md-closed.md-locked-open-add-active {
  4694. transition: width $swift-ease-in-duration $swift-ease-in-timing-function,
  4695. min-width $swift-ease-in-duration $swift-ease-in-timing-function;
  4696. }
  4697. // locked|any => unlocked|any (animating)
  4698. &.md-locked-open-remove-active {
  4699. transition: width $swift-ease-in-duration $swift-ease-in-timing-function,
  4700. min-width $swift-ease-in-duration $swift-ease-in-timing-function;
  4701. width: 0 !important;
  4702. min-width: 0 !important;
  4703. }
  4704. @extend .md-sidenav-left;
  4705. }
  4706. .md-sidenav-backdrop.md-locked-open {
  4707. display: none;
  4708. }
  4709. .md-sidenav-left {
  4710. left: 0;
  4711. top: 0;
  4712. transform: translate3d(0%, 0, 0);
  4713. &.md-closed {
  4714. transform: translate3d(-100%, 0, 0);
  4715. }
  4716. }
  4717. .md-sidenav-right {
  4718. left: 100%;
  4719. top: 0;
  4720. transform: translate(-100%, 0);
  4721. &.md-closed {
  4722. transform: translate(0%, 0);
  4723. }
  4724. }
  4725. @media (min-width: $layout-breakpoint-xs) {
  4726. md-sidenav {
  4727. max-width: $sidenav-desktop-width;
  4728. }
  4729. }
  4730. @media (max-width: $sidenav-desktop-width + $sidenav-min-space) {
  4731. md-sidenav {
  4732. width: calc(100% - #{$sidenav-min-space});
  4733. min-width: calc(100% - #{$sidenav-min-space});
  4734. max-width: calc(100% - #{$sidenav-min-space});
  4735. }
  4736. }
  4737. // IE Only
  4738. @media screen and (-ms-high-contrast: active) {
  4739. .md-sidenav-left {
  4740. border-right: 1px solid #fff;
  4741. }
  4742. .md-sidenav-right {
  4743. border-left: 1px solid #fff;
  4744. }
  4745. }
  4746. $slider-background-color: rgb(200, 200, 200) !default;
  4747. $slider-size: 48px !default;
  4748. $slider-min-size: 128px !default;
  4749. $slider-track-height: 2px !default;
  4750. $slider-thumb-width: 20px !default;
  4751. $slider-thumb-height: $slider-thumb-width !default;
  4752. $slider-thumb-default-scale: 0.7 !default;
  4753. $slider-thumb-hover-scale: 0.8 !default;
  4754. $slider-thumb-focus-scale: 1 !default;
  4755. $slider-thumb-disabled-scale: 0.5 !default;
  4756. $slider-thumb-disabled-border: 4px !default;
  4757. $slider-thumb-focus-duration: .7s !default;
  4758. $slider-focus-thumb-width: 34px !default;
  4759. $slider-focus-thumb-height: $slider-focus-thumb-width !default;
  4760. $slider-focus-ring-border-width: 3px !default;
  4761. $slider-arrow-height: 16px !default;
  4762. $slider-arrow-width: 28px !default;
  4763. $slider-sign-height: 28px !default;
  4764. $slider-sign-width: 28px !default;
  4765. $slider-sign-top: ($slider-size / 2) - ($slider-thumb-default-scale * $slider-thumb-height / 2) - ($slider-sign-height) - ($slider-arrow-height) + 10px !default;
  4766. @keyframes sliderFocusThumb {
  4767. 0% {
  4768. transform: scale($slider-thumb-default-scale);
  4769. }
  4770. 30% {
  4771. transform: scale($slider-thumb-focus-scale);
  4772. }
  4773. 100% {
  4774. transform: scale($slider-thumb-default-scale);
  4775. }
  4776. }
  4777. @keyframes sliderDiscreteFocusThumb {
  4778. 0% {
  4779. transform: scale($slider-thumb-default-scale);
  4780. }
  4781. 50% {
  4782. transform: scale($slider-thumb-hover-scale);
  4783. }
  4784. 100% {
  4785. transform: scale(0);
  4786. }
  4787. }
  4788. @keyframes sliderDiscreteFocusRing {
  4789. 0% {
  4790. transform: scale(0.7);
  4791. opacity: 0;
  4792. }
  4793. 50% {
  4794. transform: scale(1);
  4795. opacity: 1;
  4796. }
  4797. 100% {
  4798. transform: scale(0);
  4799. }
  4800. }
  4801. @mixin slider-thumb-position($width: $slider-thumb-width, $height: $slider-thumb-height) {
  4802. position: absolute;
  4803. @include rtl-prop(left, right, (-$width / 2), auto);
  4804. top: ($slider-size / 2) - ($height / 2);
  4805. width: $width;
  4806. height: $height;
  4807. border-radius: max($width, $height);
  4808. }
  4809. md-slider {
  4810. height: $slider-size;
  4811. min-width: $slider-min-size;
  4812. position: relative;
  4813. margin-left: 4px;
  4814. margin-right: 4px;
  4815. padding: 0;
  4816. display: block;
  4817. flex-direction: row;
  4818. *, *:after {
  4819. box-sizing: border-box;
  4820. }
  4821. .md-slider-wrapper {
  4822. outline: none;
  4823. width: 100%;
  4824. height: 100%;
  4825. }
  4826. .md-slider-content {
  4827. position: relative;
  4828. }
  4829. /**
  4830. * Track
  4831. */
  4832. .md-track-container {
  4833. width: 100%;
  4834. position: absolute;
  4835. top: ($slider-size / 2) - ($slider-track-height) / 2;
  4836. height: $slider-track-height;
  4837. }
  4838. .md-track {
  4839. position: absolute;
  4840. left: 0;
  4841. right: 0;
  4842. height: 100%;
  4843. }
  4844. .md-track-fill {
  4845. transition: all .4s cubic-bezier(.25,.8,.25,1);
  4846. transition-property: width, height;
  4847. }
  4848. .md-track-ticks {
  4849. position: absolute;
  4850. left: 0;
  4851. right: 0;
  4852. height: 100%;
  4853. }
  4854. .md-track-ticks canvas {
  4855. // Restrict the width and the height of the canvas so that ticks are rendered correctly
  4856. // when parent elements are resized. Else, the position of the ticks might
  4857. // be incorrect as we only update the canvas width attribute on window resize.
  4858. width: 100%;
  4859. height: 100%;
  4860. }
  4861. /**
  4862. * Slider thumb
  4863. */
  4864. .md-thumb-container {
  4865. position: absolute;
  4866. @include rtl-prop(left, right, 0, auto);
  4867. top: 50%;
  4868. transform: translate3d(-50%,-50%,0);
  4869. transition: all .4s cubic-bezier(.25,.8,.25,1);
  4870. transition-property: left, right, bottom;
  4871. }
  4872. .md-thumb {
  4873. z-index: 1;
  4874. @include slider-thumb-position($slider-thumb-width, $slider-thumb-height);
  4875. // We render thumb in an :after selector to fix an obscure problem with the
  4876. // thumb being clipped by the focus-ring and focus-thumb while running the focus
  4877. // animation.
  4878. &:after {
  4879. content: '';
  4880. position: absolute;
  4881. width: $slider-thumb-width;
  4882. height: $slider-thumb-height;
  4883. border-radius: max($slider-thumb-width, $slider-thumb-height);
  4884. border-width: 3px;
  4885. border-style: solid;
  4886. transition: inherit;
  4887. }
  4888. transform: scale($slider-thumb-default-scale);
  4889. transition: all .4s cubic-bezier(.25,.8,.25,1);
  4890. }
  4891. /* The sign that's focused in discrete mode */
  4892. .md-sign {
  4893. /* Center the children (slider-thumb-text) */
  4894. display: flex;
  4895. align-items: center;
  4896. justify-content: center;
  4897. position: absolute;
  4898. left: -($slider-sign-height / 2);
  4899. top: $slider-sign-top;
  4900. width: $slider-sign-width;
  4901. height: $slider-sign-height;
  4902. border-radius: max($slider-sign-height, $slider-sign-width);
  4903. transform: scale(0.4) translate3d(0,(-$slider-sign-top + 10) / 0.4,0);
  4904. transition: all 0.3s $swift-ease-in-out-timing-function;
  4905. /* The arrow pointing down under the sign */
  4906. &:after {
  4907. position: absolute;
  4908. content: '';
  4909. @include rtl-prop(left, right, -($slider-sign-width / 2 - $slider-arrow-width / 2), auto);
  4910. border-radius: $slider-arrow-height;
  4911. top: 19px;
  4912. border-left: $slider-arrow-width / 2 solid transparent;
  4913. border-right: $slider-arrow-width / 2 solid transparent;
  4914. border-top-width: $slider-arrow-height;
  4915. border-top-style: solid;
  4916. opacity: 0;
  4917. transform: translate3d(0,-8px,0);
  4918. transition: all 0.2s $swift-ease-in-out-timing-function;
  4919. }
  4920. .md-thumb-text {
  4921. z-index: 1;
  4922. font-size: 12px;
  4923. font-weight: bold;
  4924. }
  4925. }
  4926. /**
  4927. * The border/background that comes in when focused in non-discrete mode
  4928. */
  4929. .md-focus-ring {
  4930. @include slider-thumb-position($slider-focus-thumb-width, $slider-focus-thumb-height);
  4931. transform: scale(.7);
  4932. opacity: 0;
  4933. // using a custom duration to match the spec example video
  4934. transition: all ($slider-thumb-focus-duration / 2) $swift-ease-in-out-timing-function;
  4935. }
  4936. .md-disabled-thumb {
  4937. @include slider-thumb-position(
  4938. $slider-thumb-width + $slider-thumb-disabled-border * 2,
  4939. $slider-thumb-height + $slider-thumb-disabled-border * 2
  4940. );
  4941. transform: scale($slider-thumb-disabled-scale);
  4942. border-width: $slider-thumb-disabled-border;
  4943. border-style: solid;
  4944. display: none;
  4945. }
  4946. &.md-min {
  4947. .md-sign {
  4948. opacity: 0;
  4949. }
  4950. }
  4951. &:focus {
  4952. outline: none;
  4953. }
  4954. /* Don't animate left/right while panning */
  4955. &.md-dragging {
  4956. .md-thumb-container,
  4957. .md-track-fill {
  4958. transition: none;
  4959. }
  4960. }
  4961. &:not([md-discrete]) {
  4962. /* Hide the sign and ticks in non-discrete mode */
  4963. .md-track-ticks,
  4964. .md-sign {
  4965. display: none;
  4966. }
  4967. &:not([disabled]) {
  4968. .md-slider-wrapper {
  4969. .md-thumb:hover {
  4970. transform: scale($slider-thumb-hover-scale);
  4971. }
  4972. &.md-focused {
  4973. .md-focus-ring {
  4974. transform: scale(1);
  4975. opacity: 1;
  4976. }
  4977. .md-thumb {
  4978. animation: sliderFocusThumb $slider-thumb-focus-duration $swift-ease-in-out-timing-function;
  4979. }
  4980. }
  4981. }
  4982. &.md-active {
  4983. .md-slider-wrapper {
  4984. .md-thumb {
  4985. transform: scale($slider-thumb-focus-scale);
  4986. }
  4987. }
  4988. }
  4989. }
  4990. }
  4991. &[md-discrete] {
  4992. &:not([disabled]) {
  4993. .md-slider-wrapper {
  4994. &.md-focused {
  4995. .md-focus-ring {
  4996. transform: scale(0);
  4997. animation: sliderDiscreteFocusRing .5s $swift-ease-in-out-timing-function;
  4998. }
  4999. .md-thumb {
  5000. animation: sliderDiscreteFocusThumb .5s $swift-ease-in-out-timing-function;
  5001. }
  5002. }
  5003. }
  5004. .md-slider-wrapper.md-focused,
  5005. &.md-active {
  5006. .md-thumb {
  5007. transform: scale(0);
  5008. }
  5009. .md-sign,
  5010. .md-sign:after {
  5011. opacity: 1;
  5012. transform: translate3d(0,0,0) scale(1.0);
  5013. }
  5014. }
  5015. }
  5016. &[disabled][readonly] {
  5017. .md-thumb {
  5018. transform: scale(0);
  5019. }
  5020. .md-sign,
  5021. .md-sign:after {
  5022. opacity: 1;
  5023. transform: translate3d(0,0,0) scale(1.0);
  5024. }
  5025. }
  5026. }
  5027. &[disabled] {
  5028. .md-track-fill {
  5029. display: none;
  5030. }
  5031. .md-track-ticks {
  5032. opacity: 0;
  5033. }
  5034. &:not([readonly]) .md-sign {
  5035. opacity: 0;
  5036. }
  5037. .md-thumb {
  5038. transform: scale($slider-thumb-disabled-scale);
  5039. }
  5040. .md-disabled-thumb {
  5041. display: block;
  5042. }
  5043. }
  5044. &[md-vertical] {
  5045. flex-direction: column;
  5046. min-height: $slider-min-size;
  5047. min-width: 0;
  5048. .md-slider-wrapper {
  5049. flex: 1;
  5050. padding-top: 12px;
  5051. padding-bottom: 12px;
  5052. width: $slider-size;
  5053. align-self: center;
  5054. display: flex;
  5055. justify-content: center;
  5056. }
  5057. .md-track-container {
  5058. height: 100%;
  5059. width: $slider-track-height;
  5060. top: 0;
  5061. left: calc(50% - (#{$slider-track-height} / 2));
  5062. }
  5063. .md-thumb-container {
  5064. top: auto;
  5065. margin-bottom: ($slider-size / 2) - ($slider-track-height) / 2;
  5066. left: calc(50% - 1px);
  5067. bottom: 0;
  5068. .md-thumb:after {
  5069. left: 1px;
  5070. }
  5071. .md-focus-ring {
  5072. left: -(($slider-focus-thumb-width / 2) - ($slider-track-height / 2));
  5073. }
  5074. }
  5075. .md-track-fill {
  5076. bottom: 0;
  5077. }
  5078. &[md-discrete] {
  5079. .md-sign {
  5080. $sign-top: -($slider-sign-top / 2) + 1;
  5081. left: -$slider-sign-height - 12;
  5082. top: $sign-top;
  5083. transform: scale(0.4) translate3d((-$slider-sign-top + 10) / 0.4, 0 ,0);
  5084. /* The arrow pointing left next the sign */
  5085. &:after {
  5086. top: $sign-top;
  5087. left: 19px;
  5088. border-top: $slider-arrow-width / 2 solid transparent;
  5089. border-right: 0;
  5090. border-bottom: $slider-arrow-width / 2 solid transparent;
  5091. border-left-width: $slider-arrow-height;
  5092. border-left-style: solid;
  5093. opacity: 0;
  5094. transform: translate3d(0,-8px,0);
  5095. transition: all 0.2s ease-in-out;
  5096. }
  5097. .md-thumb-text {
  5098. z-index: 1;
  5099. font-size: 12px;
  5100. font-weight: bold;
  5101. }
  5102. }
  5103. &.md-active,
  5104. .md-focused,
  5105. &[disabled][readonly]{
  5106. .md-sign:after {
  5107. top: 0;
  5108. }
  5109. }
  5110. }
  5111. &[disabled][readonly] {
  5112. .md-thumb {
  5113. transform: scale(0);
  5114. }
  5115. .md-sign,
  5116. .md-sign:after {
  5117. opacity: 1;
  5118. transform: translate3d(0,0,0) scale(1.0);
  5119. }
  5120. }
  5121. }
  5122. &[md-invert] {
  5123. &:not([md-vertical]) .md-track-fill {
  5124. @include rtl(left, auto, 0);
  5125. @include rtl(right, 0, auto);
  5126. }
  5127. &[md-vertical] {
  5128. .md-track-fill {
  5129. bottom: auto;
  5130. top: 0;
  5131. }
  5132. }
  5133. }
  5134. }
  5135. md-slider-container {
  5136. display: flex;
  5137. align-items: center;
  5138. flex-direction: row;
  5139. $items-width: 25px;
  5140. $items-height: $items-width;
  5141. $items-margin: 16px;
  5142. & > *:first-child,
  5143. & > *:last-child {
  5144. &:not(md-slider){
  5145. min-width: $items-width;
  5146. max-width: ($items-width * 2) - 8;
  5147. height: $items-height;
  5148. transition: $swift-ease-out;
  5149. transition-property: color, max-width;
  5150. }
  5151. }
  5152. & > *:first-child:not(md-slider) {
  5153. @include rtl-prop(margin-right, margin-left, $items-margin, auto);
  5154. }
  5155. & > *:last-child:not(md-slider) {
  5156. @include rtl-prop(margin-left, margin-right, $items-margin, auto);
  5157. }
  5158. &[md-vertical] {
  5159. flex-direction: column;
  5160. & > *:first-child:not(md-slider),
  5161. & > *:last-child:not(md-slider) {
  5162. margin-right: 0;
  5163. margin-left: 0;
  5164. text-align: center;
  5165. }
  5166. }
  5167. md-input-container {
  5168. input[type="number"] {
  5169. text-align: center;
  5170. @include rtl-prop(padding-left, padding-right, 15px, 0); // size of arrows
  5171. height: $items-height * 2;
  5172. margin-top: -$items-height;
  5173. }
  5174. }
  5175. }
  5176. @media screen and (-ms-high-contrast: active) {
  5177. md-slider.md-default-theme .md-track {
  5178. border-bottom: 1px solid #fff;
  5179. }
  5180. }
  5181. .md-sticky-clone {
  5182. z-index: 2;
  5183. top: 0;
  5184. left: 0;
  5185. right: 0;
  5186. position: absolute !important;
  5187. transform: translate3d(-9999px,-9999px,0);
  5188. &[sticky-state="active"] {
  5189. transform: translate3d(0, 0, 0);
  5190. &:not(.md-sticky-no-effect) .md-subheader-inner {
  5191. animation: subheaderStickyHoverIn 0.3s ease-out both;
  5192. }
  5193. }
  5194. }
  5195. $subheader-line-height: 1em !default;
  5196. $subheader-font-size: rem(1.4) !default;
  5197. $subheader-padding: ($baseline-grid * 2) !default;
  5198. $subheader-font-weight: 500 !default;
  5199. $subheader-margin: 0 0 0 0 !default;
  5200. $subheader-sticky-shadow: 0px 2px 4px 0 rgba(0,0,0,0.16) !default;
  5201. @keyframes subheaderStickyHoverIn {
  5202. 0% {
  5203. box-shadow: 0 0 0 0 transparent;
  5204. }
  5205. 100% {
  5206. box-shadow: $subheader-sticky-shadow;
  5207. }
  5208. }
  5209. @keyframes subheaderStickyHoverOut {
  5210. 0% {
  5211. box-shadow: $subheader-sticky-shadow;
  5212. }
  5213. 100% {
  5214. box-shadow: 0 0 0 0 transparent;
  5215. }
  5216. }
  5217. .md-subheader-wrapper {
  5218. &:not(.md-sticky-no-effect) {
  5219. .md-subheader {
  5220. margin: 0;
  5221. }
  5222. transition: 0.2s ease-out margin;
  5223. &.md-sticky-clone {
  5224. z-index: 2;
  5225. }
  5226. &[sticky-state="active"] {
  5227. margin-top: -2px;
  5228. }
  5229. &:not(.md-sticky-clone)[sticky-prev-state="active"] .md-subheader-inner:after {
  5230. animation: subheaderStickyHoverOut 0.3s ease-out both;
  5231. }
  5232. }
  5233. }
  5234. .md-subheader {
  5235. display: block;
  5236. font-size: $subheader-font-size;
  5237. font-weight: $subheader-font-weight;
  5238. line-height: $subheader-line-height;
  5239. margin: $subheader-margin;
  5240. position: relative;
  5241. .md-subheader-inner {
  5242. display: block;
  5243. padding: $subheader-padding;
  5244. }
  5245. .md-subheader-content {
  5246. display: block;
  5247. z-index: 1;
  5248. position: relative;
  5249. }
  5250. }
  5251. $switch-width: 36px !default;
  5252. $switch-height: $baseline-grid * 3 !default;
  5253. $switch-bar-height: 14px !default;
  5254. $switch-thumb-size: 20px !default;
  5255. $switch-margin: 16px !default;
  5256. .md-inline-form {
  5257. md-switch {
  5258. margin-top: 18px;
  5259. margin-bottom: 19px;
  5260. }
  5261. }
  5262. md-switch {
  5263. margin: $switch-margin 0;
  5264. white-space: nowrap;
  5265. cursor: pointer;
  5266. outline: none;
  5267. user-select: none;
  5268. height: 30px;
  5269. line-height: 28px;
  5270. align-items: center;
  5271. display: flex;
  5272. @include rtl(margin-left, inherit, $switch-margin);
  5273. @include rtl(margin-right, $switch-margin, inherit);
  5274. &:last-of-type {
  5275. @include rtl(margin-left, inherit, 0);
  5276. @include rtl(margin-right, 0, inherit);
  5277. }
  5278. &[disabled] {
  5279. cursor: default;
  5280. .md-container {
  5281. cursor: default;
  5282. }
  5283. }
  5284. .md-container {
  5285. cursor: grab;
  5286. width: $switch-width;
  5287. height: $switch-height;
  5288. position: relative;
  5289. user-select: none;
  5290. @include rtl-prop(margin-right, margin-left, 8px, 0px);
  5291. float: left;
  5292. }
  5293. &.md-inverted .md-container {
  5294. @include rtl(margin-right, initial, 8px);
  5295. @include rtl(margin-left, 8px, initial);
  5296. }
  5297. // If the user moves his mouse off the switch, stil display grabbing cursor
  5298. &:not([disabled]) {
  5299. .md-dragging,
  5300. &.md-dragging .md-container {
  5301. cursor: grabbing;
  5302. }
  5303. }
  5304. &.md-focused:not([disabled]) {
  5305. .md-thumb:before {
  5306. left: -8px;
  5307. top: -8px;
  5308. right: -8px;
  5309. bottom: -8px;
  5310. }
  5311. &:not(.md-checked) {
  5312. .md-thumb:before {
  5313. background-color: rgba(0, 0, 0, 0.12);
  5314. }
  5315. }
  5316. }
  5317. .md-label {
  5318. border-color: transparent;
  5319. border-width: 0;
  5320. float: left;
  5321. }
  5322. .md-bar {
  5323. left: 1px;
  5324. width: $switch-width - 2px;
  5325. top: $switch-height / 2 - $switch-bar-height / 2;
  5326. height: $switch-bar-height;
  5327. border-radius: 8px;
  5328. position: absolute;
  5329. }
  5330. .md-thumb-container {
  5331. top: $switch-height / 2 - $switch-thumb-size / 2;
  5332. left: 0;
  5333. width: $switch-width - $switch-thumb-size;
  5334. position: absolute;
  5335. transform: translate3d(0,0,0);
  5336. z-index: 1;
  5337. }
  5338. &.md-checked .md-thumb-container {
  5339. transform: translate3d(100%,0,0);
  5340. }
  5341. .md-thumb {
  5342. position: absolute;
  5343. margin: 0;
  5344. left: 0;
  5345. top: 0;
  5346. outline: none;
  5347. height: $switch-thumb-size;
  5348. width: $switch-thumb-size;
  5349. border-radius: 50%;
  5350. box-shadow: $whiteframe-shadow-1dp;
  5351. &:before {
  5352. background-color: transparent;
  5353. border-radius: 50%;
  5354. content: '';
  5355. position: absolute;
  5356. display: block;
  5357. height: auto;
  5358. left: 0;
  5359. top: 0;
  5360. right: 0;
  5361. bottom: 0;
  5362. transition: all 0.5s;
  5363. width: auto;
  5364. }
  5365. .md-ripple-container {
  5366. position: absolute;
  5367. display: block;
  5368. width: auto;
  5369. height: auto;
  5370. left: -$switch-thumb-size;
  5371. top: -$switch-thumb-size;
  5372. right: -$switch-thumb-size;
  5373. bottom: -$switch-thumb-size;
  5374. }
  5375. }
  5376. &:not(.md-dragging) {
  5377. .md-bar,
  5378. .md-thumb-container,
  5379. .md-thumb {
  5380. transition: $swift-linear;
  5381. transition-property: transform, background-color;
  5382. }
  5383. .md-bar,
  5384. .md-thumb {
  5385. transition-delay: 0.05s;
  5386. }
  5387. }
  5388. }
  5389. @media screen and (-ms-high-contrast: active) {
  5390. md-switch.md-default-theme .md-bar {
  5391. background-color: #666;
  5392. }
  5393. md-switch.md-default-theme.md-checked .md-bar {
  5394. background-color: #9E9E9E;
  5395. }
  5396. md-switch.md-default-theme .md-thumb {
  5397. background-color: #fff;
  5398. }
  5399. }
  5400. // See height set globally, depended on by buttons
  5401. $md-toast-content-padding: 3 * $baseline-grid - $button-left-right-padding !default;
  5402. $md-toast-button-left-margin: 3 * $baseline-grid - 2 * $button-left-right-padding !default;
  5403. $md-toast-text-padding: $button-left-right-padding !default;
  5404. .md-toast-text {
  5405. padding: 0 $md-toast-text-padding;
  5406. }
  5407. md-toast {
  5408. position: absolute;
  5409. z-index: $z-index-toast;
  5410. box-sizing: border-box;
  5411. cursor: default;
  5412. overflow: hidden;
  5413. // Add some padding to the outer toast container so that the wrapper's box shadow is visible
  5414. padding: $toast-margin;
  5415. // Setup opacity transition on whole toast
  5416. opacity: 1;
  5417. transition: $swift-ease-out;
  5418. .md-toast-content {
  5419. display: flex;
  5420. direction: row;
  5421. align-items: center;
  5422. max-height: 7 * $toast-height;
  5423. max-width: 100%;
  5424. min-height: 48px;
  5425. // Since we're vertically centering our text by using flexbox and having a min-height, we need to apply
  5426. // a fix for an IE11 flexbug, otherwise the text won't be centered vertically.
  5427. @include ie11-min-height-flexbug(48px);
  5428. padding: 0 $md-toast-content-padding;
  5429. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  5430. border-radius: 2px;
  5431. font-size: 14px;
  5432. overflow: hidden;
  5433. // Setup for transform transitions on inner content
  5434. transform: translate3d(0, 0, 0) rotateZ(0deg);
  5435. transition: $swift-ease-out;
  5436. @include rtl(justify-content, flex-start, flex-end);
  5437. span {
  5438. // Layout [flex]
  5439. flex:1 1 0%;
  5440. box-sizing:border-box;
  5441. min-width :0;
  5442. }
  5443. }
  5444. &.md-capsule {
  5445. border-radius: 24px;
  5446. .md-toast-content {
  5447. border-radius: 24px;
  5448. }
  5449. }
  5450. &.ng-leave-active {
  5451. .md-toast-content {
  5452. transition: $swift-ease-in;
  5453. }
  5454. }
  5455. /* Transition differently when swiping */
  5456. &.md-swipeleft,
  5457. &.md-swiperight,
  5458. &.md-swipeup,
  5459. &.md-swipedown {
  5460. .md-toast-content {
  5461. transition: $swift-ease-out;
  5462. }
  5463. }
  5464. &.ng-enter {
  5465. opacity: 0;
  5466. .md-toast-content {
  5467. transform: translate3d(0, 100%, 0);
  5468. }
  5469. &.md-top {
  5470. .md-toast-content {
  5471. transform: translate3d(0, -100%, 0);
  5472. }
  5473. }
  5474. &.ng-enter-active {
  5475. opacity: 1;
  5476. .md-toast-content {
  5477. transform: translate3d(0, 0, 0);
  5478. }
  5479. }
  5480. }
  5481. /*
  5482. * When the toast doesn't take up the whole screen,
  5483. * make it rotate when the user swipes it away
  5484. */
  5485. &.ng-leave.ng-leave-active {
  5486. .md-toast-content {
  5487. opacity: 0;
  5488. transform: translate3d(0, 100%, 0);
  5489. }
  5490. &.md-swipeup {
  5491. .md-toast-content {
  5492. transform: translate3d(0, -50%, 0);
  5493. }
  5494. }
  5495. &.md-swipedown {
  5496. .md-toast-content {
  5497. transform: translate3d(0, 50%, 0);
  5498. }
  5499. }
  5500. &.md-top {
  5501. .md-toast-content {
  5502. transform: translate3d(0, -100%, 0);
  5503. }
  5504. }
  5505. }
  5506. .md-action {
  5507. line-height: 19px;
  5508. margin-left: 24px;
  5509. margin-right: 0;
  5510. cursor: pointer;
  5511. text-transform: uppercase;
  5512. float: right;
  5513. }
  5514. .md-button {
  5515. min-width: 0;
  5516. @include rtl(margin-right, 0, $md-toast-button-left-margin);
  5517. @include rtl(margin-left, $md-toast-button-left-margin, 0);
  5518. }
  5519. }
  5520. @media (max-width: $layout-breakpoint-sm - 1) {
  5521. md-toast {
  5522. left: 0;
  5523. right: 0;
  5524. width: 100%;
  5525. max-width: 100%;
  5526. min-width: 0;
  5527. border-radius: 0;
  5528. bottom: 0;
  5529. padding: 0;
  5530. &.ng-leave.ng-leave-active {
  5531. &.md-swipeup {
  5532. .md-toast-content {
  5533. transform: translate3d(0, -50%, 0);
  5534. }
  5535. }
  5536. &.md-swipedown {
  5537. .md-toast-content {
  5538. transform: translate3d(0, 50%, 0);
  5539. }
  5540. }
  5541. }
  5542. }
  5543. }
  5544. @media (min-width: $layout-breakpoint-sm) {
  5545. md-toast {
  5546. min-width: 288px + $toast-margin * 2;
  5547. &.md-bottom {
  5548. bottom: 0;
  5549. }
  5550. &.md-left {
  5551. left: 0;
  5552. }
  5553. &.md-right {
  5554. right: 0;
  5555. }
  5556. &.md-top {
  5557. top: 0;
  5558. }
  5559. // Support for RTL alignment
  5560. &._md-start {
  5561. @include rtl-prop(left, right, 0, auto);
  5562. }
  5563. &._md-end {
  5564. @include rtl-prop(right, left, 0, auto);
  5565. }
  5566. /*
  5567. * When the toast doesn't take up the whole screen,
  5568. * make it rotate when the user swipes it away
  5569. */
  5570. &.ng-leave.ng-leave-active {
  5571. &.md-swipeleft {
  5572. .md-toast-content {
  5573. transform: translate3d(-50%, 0, 0);
  5574. }
  5575. }
  5576. &.md-swiperight {
  5577. .md-toast-content {
  5578. transform: translate3d(50%, 0, 0);
  5579. }
  5580. }
  5581. }
  5582. }
  5583. }
  5584. @media (min-width: $layout-breakpoint-lg) {
  5585. md-toast {
  5586. .md-toast-content {
  5587. max-width: $baseline-grid * 71;
  5588. }
  5589. }
  5590. }
  5591. @media screen and (-ms-high-contrast: active) {
  5592. md-toast {
  5593. border: 1px solid #fff;
  5594. }
  5595. }
  5596. // While animating, set the toast parent's overflow to hidden so scrollbars do not appear
  5597. .md-toast-animating {
  5598. overflow: hidden !important;
  5599. }
  5600. $tabs-paginator-width: $baseline-grid * 4 !default;
  5601. $tabs-tab-width: $baseline-grid * 12 !default;
  5602. $tabs-header-height: 48px !default;
  5603. @keyframes md-tab-content-hide {
  5604. 0% { opacity: 1; }
  5605. 50% { opacity: 1; }
  5606. 100% { opacity: 0; }
  5607. }
  5608. md-tab-data {
  5609. position: absolute;
  5610. top: 0;
  5611. left: 0;
  5612. right: 0;
  5613. bottom: 0;
  5614. z-index: -1;
  5615. opacity: 0;
  5616. }
  5617. md-tabs {
  5618. display: block;
  5619. margin: 0;
  5620. border-radius: 2px;
  5621. overflow: hidden;
  5622. position: relative;
  5623. flex-shrink: 0;
  5624. &:not(.md-no-tab-content):not(.md-dynamic-height) {
  5625. min-height: 200 + $tabs-header-height;
  5626. }
  5627. &[md-align-tabs="bottom"] {
  5628. padding-bottom: $tabs-header-height;
  5629. md-tabs-wrapper {
  5630. position: absolute;
  5631. bottom: 0;
  5632. left: 0;
  5633. right: 0;
  5634. height: $tabs-header-height;
  5635. z-index: 2;
  5636. }
  5637. md-tabs-content-wrapper {
  5638. top: 0;
  5639. bottom: $tabs-header-height;
  5640. }
  5641. }
  5642. &.md-dynamic-height {
  5643. md-tabs-content-wrapper {
  5644. min-height: 0;
  5645. position: relative;
  5646. top: auto;
  5647. left: auto;
  5648. right: auto;
  5649. bottom: auto;
  5650. overflow: visible;
  5651. }
  5652. md-tab-content {
  5653. &.md-active {
  5654. position: relative;
  5655. }
  5656. }
  5657. }
  5658. &[md-border-bottom] {
  5659. md-tabs-wrapper {
  5660. border-width: 0 0 1px;
  5661. border-style: solid;
  5662. }
  5663. &:not(.md-dynamic-height) {
  5664. md-tabs-content-wrapper {
  5665. top: $tabs-header-height + 1;
  5666. }
  5667. }
  5668. }
  5669. }
  5670. md-tabs-wrapper {
  5671. display: block;
  5672. position: relative;
  5673. // transform is needed for iOS Safari to prevent content from disappearing on scroll
  5674. transform: translate3d(0, 0, 0);
  5675. md-prev-button, md-next-button {
  5676. height: 100%;
  5677. width: $tabs-paginator-width;
  5678. position: absolute;
  5679. top: 50%;
  5680. transform: translateY(-50%);
  5681. line-height: 1em;
  5682. z-index: 2;
  5683. cursor: pointer;
  5684. font-size: 16px;
  5685. background: transparent no-repeat center center;
  5686. transition: $swift-ease-in-out;
  5687. &:focus {
  5688. outline: none;
  5689. }
  5690. &.md-disabled {
  5691. opacity: 0.25;
  5692. cursor: default;
  5693. }
  5694. &.ng-leave {
  5695. transition: none;
  5696. }
  5697. md-icon {
  5698. position: absolute;
  5699. top: 50%;
  5700. left: 50%;
  5701. transform: translate3d(-50%, -50%, 0);
  5702. }
  5703. }
  5704. md-prev-button {
  5705. @include rtl-prop(left, right, 0, auto);
  5706. background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMjA4IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyIAkJIiBzdHlsZT0iZmlsbDp3aGl0ZTsiLz4gPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+IDwvZz4gPC9nPiA8ZyBpZD0iR3JpZCIgZGlzcGxheT0ibm9uZSI+IDxnIGRpc3BsYXk9ImlubGluZSI+IDwvZz4gPC9nPiA8L3N2Zz4NCg==');
  5707. }
  5708. md-next-button {
  5709. @include rtl-prop(right, left, 0, auto);
  5710. background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMzM2IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTAsNiA4LjYsNy40IDEzLjIsMTIgOC42LDE2LjYgMTAsMTggMTYsMTIgCQkiIHN0eWxlPSJmaWxsOndoaXRlOyIvPiA8cmVjdCBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz4gPC9nPiA8L2c+IDxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4gPGcgZGlzcGxheT0iaW5saW5lIj4gPC9nPiA8L2c+IDwvc3ZnPg0K');
  5711. md-icon {
  5712. transform: translate3d(-50%, -50%, 0) rotate(180deg);
  5713. }
  5714. }
  5715. &.md-stretch-tabs {
  5716. md-pagination-wrapper {
  5717. width: 100%;
  5718. flex-direction: row;
  5719. md-tab-item {
  5720. flex-grow: 1;
  5721. }
  5722. }
  5723. }
  5724. }
  5725. md-tabs-canvas {
  5726. @include pie-clearfix;
  5727. position: relative;
  5728. overflow: hidden;
  5729. display: block;
  5730. height: $tabs-header-height;
  5731. .md-dummy-wrapper {
  5732. position: absolute;
  5733. top: 0;
  5734. @include rtl-prop(left, right, 0, auto);
  5735. }
  5736. &.md-paginated {
  5737. margin: 0 $tabs-paginator-width;
  5738. }
  5739. &.md-center-tabs {
  5740. display: flex;
  5741. flex-direction: column;
  5742. text-align: center;
  5743. .md-tab {
  5744. float: none;
  5745. display: inline-block;
  5746. }
  5747. }
  5748. }
  5749. md-pagination-wrapper {
  5750. @include pie-clearfix;
  5751. height: $tabs-header-height;
  5752. display: flex;
  5753. transition: transform $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
  5754. position: absolute;
  5755. @include rtl-prop(left, right, 0, auto);
  5756. transform: translate3d(0, 0, 0);
  5757. &.md-center-tabs {
  5758. position: relative;
  5759. justify-content: center;
  5760. }
  5761. }
  5762. md-tabs-content-wrapper {
  5763. display: block;
  5764. position: absolute;
  5765. top: $tabs-header-height;
  5766. left: 0;
  5767. right: 0;
  5768. bottom: 0;
  5769. overflow: hidden;
  5770. }
  5771. md-tab-content {
  5772. display: flex;
  5773. position: absolute;
  5774. top: 0;
  5775. left: 0;
  5776. right: 0;
  5777. bottom: 0;
  5778. transition: transform $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
  5779. overflow: auto;
  5780. // transform is needed for iOS Safari to prevent content from disappearing on scroll
  5781. transform: translate3d(0, 0, 0);
  5782. &.md-no-scroll {
  5783. bottom: auto;
  5784. overflow: hidden;
  5785. }
  5786. &.ng-leave, &.md-no-transition {
  5787. transition: none;
  5788. }
  5789. &.md-left:not(.md-active) {
  5790. @include rtl(transform, translateX(-100%), translateX(+100%));
  5791. animation: 2 * $swift-ease-in-out-duration md-tab-content-hide;
  5792. opacity: 0;
  5793. * {
  5794. transition: visibility 0s linear;
  5795. transition-delay: $swift-ease-in-out-duration;
  5796. visibility: hidden;
  5797. }
  5798. }
  5799. &.md-right:not(.md-active) {
  5800. @include rtl(transform, translateX(100%), translateX(-100%));
  5801. animation: 2 * $swift-ease-in-out-duration md-tab-content-hide;
  5802. opacity: 0;
  5803. * {
  5804. transition: visibility 0s linear;
  5805. transition-delay: $swift-ease-in-out-duration;
  5806. visibility: hidden;
  5807. }
  5808. }
  5809. > div {
  5810. flex: 1 0 100%;
  5811. min-width: 0;
  5812. &.ng-leave {
  5813. animation: 2 * $swift-ease-in-out-duration md-tab-content-hide;
  5814. }
  5815. }
  5816. }
  5817. md-ink-bar {
  5818. $duration: $swift-ease-in-out-duration * 0.5;
  5819. $multiplier: 0.5;
  5820. position: absolute;
  5821. left: auto;
  5822. right: auto;
  5823. bottom: 0;
  5824. height: 2px;
  5825. &.md-left {
  5826. transition: left ($duration * $multiplier) $swift-ease-in-out-timing-function,
  5827. right $duration $swift-ease-in-out-timing-function;
  5828. }
  5829. &.md-right {
  5830. transition: left $duration $swift-ease-in-out-timing-function,
  5831. right ($duration * $multiplier) $swift-ease-in-out-timing-function;
  5832. }
  5833. }
  5834. md-tab {
  5835. position: absolute;
  5836. z-index: -1;
  5837. left: -9999px;
  5838. }
  5839. .md-tab {
  5840. font-size: 14px;
  5841. text-align: center;
  5842. line-height: $tabs-header-height - 24;
  5843. padding: 12px 24px;
  5844. transition: background-color 0.35s $swift-ease-in-out-timing-function;
  5845. cursor: pointer;
  5846. white-space: nowrap;
  5847. position: relative;
  5848. text-transform: uppercase;
  5849. @include rtl(float, left, right);
  5850. font-weight: 500;
  5851. box-sizing: border-box;
  5852. overflow: hidden;
  5853. text-overflow: ellipsis;
  5854. &.md-focused {
  5855. box-shadow: none;
  5856. outline: none;
  5857. }
  5858. &.md-active {
  5859. cursor: default;
  5860. }
  5861. &.md-disabled {
  5862. pointer-events: none;
  5863. touch-action: pan-y;
  5864. user-select: none;
  5865. -webkit-user-drag: none;
  5866. opacity: 0.5;
  5867. cursor: default;
  5868. }
  5869. &.ng-leave {
  5870. transition: none;
  5871. }
  5872. }
  5873. md-toolbar + md-tabs {
  5874. border-top-left-radius: 0;
  5875. border-top-right-radius: 0;
  5876. }
  5877. // Standard/Desktop Heights
  5878. $md-toolbar-height: $baseline-grid * 8 !default;
  5879. $md-toolbar-medium-tall-height: 88px !default;
  5880. $md-toolbar-tall-height: 128px !default;
  5881. // Mobile device heights
  5882. $md-toolbar-height-mobile-portrait: 56px !default;
  5883. $md-toolbar-height-mobile-landscape: 48px !default;
  5884. $md-toolbar-indent-margin: 64px !default;
  5885. $md-toolbar-padding: 16px !default;
  5886. $icon-button-margin-offset: rem(-0.800) !default;
  5887. md-toolbar {
  5888. box-sizing: border-box;
  5889. display: flex;
  5890. flex-direction: column;
  5891. position: relative;
  5892. z-index: 2;
  5893. font-size: rem(2.0);
  5894. min-height: $md-toolbar-height;
  5895. width: 100%;
  5896. &._md-toolbar-transitions {
  5897. transition-duration: $swift-ease-in-out-duration;
  5898. transition-timing-function: $swift-ease-in-out-timing-function;
  5899. transition-property: background-color, fill, color;
  5900. }
  5901. &.md-whiteframe-z1-add, &.md-whiteframe-z1-remove {
  5902. transition: box-shadow $swift-ease-in-out-duration linear;
  5903. }
  5904. md-toolbar-filler {
  5905. width: 9 * $baseline-grid;
  5906. }
  5907. *,
  5908. *:before,
  5909. *:after {
  5910. box-sizing: border-box;
  5911. }
  5912. // By default $ngAnimate looks for transition durations on the element, when using ng-hide, ng-if, ng-show.
  5913. // The toolbar has a transition duration applied, which means, that $ngAnimate delays the hide process.
  5914. // To avoid this, we need to reset the transition, when $ngAnimate looks for the duration.
  5915. &.ng-animate {
  5916. transition: none;
  5917. }
  5918. &.md-tall {
  5919. height: $md-toolbar-tall-height;
  5920. min-height: $md-toolbar-tall-height;
  5921. max-height: $md-toolbar-tall-height;
  5922. }
  5923. &.md-medium-tall {
  5924. height: $md-toolbar-medium-tall-height;
  5925. min-height: $md-toolbar-medium-tall-height;
  5926. max-height: $md-toolbar-medium-tall-height;
  5927. .md-toolbar-tools {
  5928. height: 48px;
  5929. min-height: 48px;
  5930. max-height: 48px;
  5931. }
  5932. }
  5933. > .md-indent {
  5934. @include rtl-prop(margin-left, margin-right, $md-toolbar-indent-margin, auto);
  5935. }
  5936. ~ md-content {
  5937. > md-list {
  5938. padding: 0;
  5939. md-list-item:last-child {
  5940. md-divider {
  5941. display: none;
  5942. }
  5943. }
  5944. }
  5945. }
  5946. }
  5947. .md-toolbar-tools {
  5948. font-size: $title-font-size-base;
  5949. letter-spacing: 0.005em;
  5950. box-sizing: border-box;
  5951. font-weight: 400;
  5952. display: flex;
  5953. align-items: center;
  5954. flex-direction: row;
  5955. width: 100%;
  5956. height: $md-toolbar-height;
  5957. max-height: $md-toolbar-height;
  5958. padding: 0 $md-toolbar-padding;
  5959. margin: 0;
  5960. h1, h2, h3 {
  5961. font-size: inherit;
  5962. font-weight: inherit;
  5963. margin: inherit;
  5964. }
  5965. a {
  5966. color: inherit;
  5967. text-decoration: none;
  5968. }
  5969. .fill-height {
  5970. display: flex;
  5971. align-items: center;
  5972. }
  5973. md-checkbox {
  5974. margin: inherit;
  5975. }
  5976. .md-button {
  5977. margin-top: 0;
  5978. margin-bottom: 0;
  5979. &, &.md-icon-button md-icon {
  5980. transition-duration: $swift-ease-in-out-duration;
  5981. transition-timing-function: $swift-ease-in-out-timing-function;
  5982. transition-property: background-color, fill, color;
  5983. // Normally .md-button is already resetting the transition, when $ngAnimate looks for the duration,
  5984. // but in this case, the selector has a higher specificity than the `reset selector`, which means, that
  5985. // we need to reset the transition our self.
  5986. &.ng-animate {
  5987. transition: none;
  5988. }
  5989. }
  5990. }
  5991. &> .md-button:first-child {
  5992. @include rtl-prop(margin-left, margin-right, $icon-button-margin-offset, auto);
  5993. }
  5994. &> .md-button:last-child {
  5995. @include rtl-prop(margin-right, margin-left, $icon-button-margin-offset, auto);
  5996. }
  5997. &> md-menu:last-child {
  5998. @include rtl-prop(margin-right, margin-left, $icon-button-margin-offset, auto);
  5999. & > .md-button {
  6000. @include rtl-prop(margin-right, margin-left, 0, auto);
  6001. }
  6002. }
  6003. @media screen and (-ms-high-contrast: active) {
  6004. border-bottom: 1px solid #fff;
  6005. }
  6006. }
  6007. // Handle mobile portrait
  6008. @media (min-width: 0) and (max-width: $layout-breakpoint-sm - 1) and (orientation: portrait) {
  6009. md-toolbar {
  6010. min-height: $md-toolbar-height-mobile-portrait;
  6011. }
  6012. .md-toolbar-tools {
  6013. height: $md-toolbar-height-mobile-portrait;
  6014. max-height: $md-toolbar-height-mobile-portrait;
  6015. }
  6016. }
  6017. // Handle mobile landscape
  6018. @media (min-width: 0) and (max-width: $layout-breakpoint-sm - 1) and (orientation: landscape) {
  6019. md-toolbar {
  6020. min-height: $md-toolbar-height-mobile-landscape;
  6021. }
  6022. .md-toolbar-tools {
  6023. height: $md-toolbar-height-mobile-landscape;
  6024. max-height: $md-toolbar-height-mobile-landscape;
  6025. }
  6026. }
  6027. $tooltip-fontsize-lg: 10px !default;
  6028. $tooltip-fontsize-sm: 14px !default;
  6029. $tooltip-height-lg: 22px !default;
  6030. $tooltip-height-sm: 32px !default;
  6031. $tooltip-top-margin-lg: 14px !default;
  6032. $tooltip-top-margin-sm: 24px !default;
  6033. $tooltip-lr-padding-lg: 8px !default;
  6034. $tooltip-lr-padding-sm: 16px !default;
  6035. $tooltip-max-width: 32px !default;
  6036. .md-tooltip {
  6037. pointer-events: none;
  6038. border-radius: 4px;
  6039. overflow: hidden;
  6040. opacity: 0;
  6041. font-weight: 500;
  6042. font-size: $tooltip-fontsize-sm;
  6043. white-space: nowrap;
  6044. text-overflow: ellipsis;
  6045. height: $tooltip-height-sm;
  6046. line-height: $tooltip-height-sm;
  6047. padding-right: $tooltip-lr-padding-sm;
  6048. padding-left: $tooltip-lr-padding-sm;
  6049. &.md-origin-top {
  6050. transform-origin: center bottom;
  6051. margin-top: -$tooltip-top-margin-sm;
  6052. }
  6053. &.md-origin-right {
  6054. transform-origin: left center;
  6055. margin-left: $tooltip-top-margin-sm;
  6056. }
  6057. &.md-origin-bottom {
  6058. transform-origin: center top;
  6059. margin-top: $tooltip-top-margin-sm;
  6060. }
  6061. &.md-origin-left {
  6062. transform-origin: right center;
  6063. margin-left: -$tooltip-top-margin-sm;
  6064. }
  6065. @media (min-width: $layout-breakpoint-sm) {
  6066. font-size: $tooltip-fontsize-lg;
  6067. height: $tooltip-height-lg;
  6068. line-height: $tooltip-height-lg;
  6069. padding-right: $tooltip-lr-padding-lg;
  6070. padding-left: $tooltip-lr-padding-lg;
  6071. &.md-origin-top { margin-top: -$tooltip-top-margin-lg; }
  6072. &.md-origin-right { margin-left: $tooltip-top-margin-lg; }
  6073. &.md-origin-bottom { margin-top: $tooltip-top-margin-lg; }
  6074. &.md-origin-left { margin-left: -$tooltip-top-margin-lg; }
  6075. }
  6076. &.md-show-add {
  6077. transform: scale(0);
  6078. }
  6079. &.md-show {
  6080. transition: $swift-ease-out;
  6081. transform: scale(1);
  6082. opacity: 0.9;
  6083. }
  6084. &.md-hide {
  6085. transition: $swift-ease-in;
  6086. transition-duration: .1s;
  6087. transform: scale(0);
  6088. opacity: 0;
  6089. }
  6090. }
  6091. .md-truncate {
  6092. overflow: hidden;
  6093. white-space: nowrap;
  6094. // Default overflow is ellipsis
  6095. text-overflow: ellipsis;
  6096. // Allow override to use clipping
  6097. &.md-clip {
  6098. text-overflow: clip;
  6099. }
  6100. // This is a flex-specific hack that forces the element to only take up available space.
  6101. &.flex {
  6102. width: 0;
  6103. }
  6104. }
  6105. $virtual-repeat-scrollbar-width: 16px !default;
  6106. .md-virtual-repeat-container {
  6107. box-sizing: border-box;
  6108. display: block;
  6109. margin: 0;
  6110. overflow: hidden;
  6111. padding: 0;
  6112. position: relative;
  6113. .md-virtual-repeat-scroller {
  6114. bottom: 0;
  6115. box-sizing: border-box;
  6116. left: 0;
  6117. margin: 0;
  6118. overflow-x: hidden;
  6119. padding: 0;
  6120. position: absolute;
  6121. right: 0;
  6122. top: 0;
  6123. -webkit-overflow-scrolling: touch;
  6124. }
  6125. .md-virtual-repeat-sizer {
  6126. box-sizing: border-box;
  6127. height: 1px;
  6128. display: block;
  6129. margin: 0;
  6130. padding: 0;
  6131. width: 1px;
  6132. }
  6133. .md-virtual-repeat-offsetter {
  6134. box-sizing: border-box;
  6135. left: 0;
  6136. margin: 0;
  6137. padding: 0;
  6138. position: absolute;
  6139. right: 0;
  6140. top: 0;
  6141. }
  6142. }
  6143. .md-virtual-repeat-container.md-orient-horizontal {
  6144. .md-virtual-repeat-scroller {
  6145. overflow-x: auto;
  6146. overflow-y: hidden;
  6147. }
  6148. .md-virtual-repeat-offsetter {
  6149. // Leave room for the scroll bar.
  6150. // TODO: Will probably need to perform measurements at runtime.
  6151. bottom: $virtual-repeat-scrollbar-width;
  6152. @include rtl-prop(right, left, auto, auto);
  6153. white-space: nowrap;
  6154. }
  6155. }
  6156. .md-whiteframe-1dp, .md-whiteframe-z1 {
  6157. box-shadow: $whiteframe-shadow-1dp;
  6158. }
  6159. .md-whiteframe-2dp {
  6160. box-shadow: $whiteframe-shadow-2dp;
  6161. }
  6162. .md-whiteframe-3dp {
  6163. box-shadow: $whiteframe-shadow-3dp;
  6164. }
  6165. .md-whiteframe-4dp, .md-whiteframe-z2{
  6166. box-shadow: $whiteframe-shadow-4dp;
  6167. }
  6168. .md-whiteframe-5dp {
  6169. box-shadow: $whiteframe-shadow-5dp;
  6170. }
  6171. .md-whiteframe-6dp {
  6172. box-shadow: $whiteframe-shadow-6dp;
  6173. }
  6174. .md-whiteframe-7dp, .md-whiteframe-z3 {
  6175. box-shadow: $whiteframe-shadow-7dp;
  6176. }
  6177. .md-whiteframe-8dp {
  6178. box-shadow: $whiteframe-shadow-8dp;
  6179. }
  6180. .md-whiteframe-9dp {
  6181. box-shadow: $whiteframe-shadow-9dp;
  6182. }
  6183. .md-whiteframe-10dp, .md-whiteframe-z4 {
  6184. box-shadow: $whiteframe-shadow-10dp;
  6185. }
  6186. .md-whiteframe-11dp {
  6187. box-shadow: $whiteframe-shadow-11dp;
  6188. }
  6189. .md-whiteframe-12dp {
  6190. box-shadow: $whiteframe-shadow-12dp;
  6191. }
  6192. .md-whiteframe-13dp, .md-whiteframe-z5{
  6193. box-shadow: $whiteframe-shadow-13dp;
  6194. }
  6195. .md-whiteframe-14dp {
  6196. box-shadow: $whiteframe-shadow-14dp;
  6197. }
  6198. .md-whiteframe-15dp {
  6199. box-shadow: $whiteframe-shadow-15dp;
  6200. }
  6201. .md-whiteframe-16dp {
  6202. box-shadow: $whiteframe-shadow-16dp;
  6203. }
  6204. .md-whiteframe-17dp {
  6205. box-shadow: $whiteframe-shadow-17dp;
  6206. }
  6207. .md-whiteframe-18dp {
  6208. box-shadow: $whiteframe-shadow-18dp;
  6209. }
  6210. .md-whiteframe-19dp {
  6211. box-shadow: $whiteframe-shadow-19dp;
  6212. }
  6213. .md-whiteframe-20dp {
  6214. box-shadow: $whiteframe-shadow-20dp;
  6215. }
  6216. .md-whiteframe-21dp {
  6217. box-shadow: $whiteframe-shadow-21dp;
  6218. }
  6219. .md-whiteframe-22dp {
  6220. box-shadow: $whiteframe-shadow-22dp;
  6221. }
  6222. .md-whiteframe-23dp {
  6223. box-shadow: $whiteframe-shadow-23dp;
  6224. }
  6225. .md-whiteframe-24dp {
  6226. box-shadow: $whiteframe-shadow-24dp;
  6227. }
  6228. @media screen and (-ms-high-contrast: active) {
  6229. md-whiteframe {
  6230. border: 1px solid #fff;
  6231. }
  6232. }
  6233. @media print {
  6234. md-whiteframe, [md-whiteframe] {
  6235. background-color: #ffffff;
  6236. }
  6237. }
  6238. /*
  6239. * Since Layout API uses ng-cloak to hide the dom elements while layouts are adjusted
  6240. *
  6241. */
  6242. [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
  6243. display: none !important;
  6244. }
  6245. /*
  6246. *
  6247. * Responsive attributes
  6248. *
  6249. * References:
  6250. * 1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex
  6251. * 2) https://css-tricks.com/almanac/properties/f/flex/
  6252. * 3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/
  6253. * 4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
  6254. * 5) http://godban.com.ua/projects/flexgrid
  6255. *
  6256. *
  6257. */
  6258. @-moz-document url-prefix() {
  6259. .layout-fill {
  6260. margin: 0;
  6261. width: 100%;
  6262. min-height: 100%;
  6263. height: 100%;
  6264. }
  6265. }
  6266. /*
  6267. * Apply Mixins to create Layout/Flexbox styles
  6268. *
  6269. */
  6270. @include layouts_for_breakpoint();
  6271. @include layout-padding-margin();
  6272. /**
  6273. * `hide-gt-sm show-gt-lg` should hide from 600px to 1200px
  6274. * `show-md hide-gt-sm` should show from 0px to 960px and hide at >960px
  6275. * `hide-gt-md show-gt-sm` should show everywhere (show overrides hide)`
  6276. *
  6277. * hide means hide everywhere
  6278. * Sizes:
  6279. * $layout-breakpoint-xs: 600px !default;
  6280. * $layout-breakpoint-sm: 960px !default;
  6281. * $layout-breakpoint-md: 1280px !default;
  6282. * $layout-breakpoint-lg: 1920px !default;
  6283. */
  6284. @media (max-width: $layout-breakpoint-xs - 1) {
  6285. // Xtra-SMALL SCREEN
  6286. .hide-xs, .hide {
  6287. &:not(.show-xs):not(.show) {
  6288. display: none;
  6289. }
  6290. }
  6291. @include layouts_for_breakpoint(xs);
  6292. }
  6293. @media (min-width: $layout-breakpoint-xs) {
  6294. // BIGGER THAN Xtra-SMALL SCREEN
  6295. @include layouts_for_breakpoint(gt-xs);
  6296. }
  6297. @media (min-width: $layout-breakpoint-xs) and (max-width: $layout-breakpoint-sm - 1) {
  6298. .hide, .hide-gt-xs {
  6299. &:not(.show-gt-xs):not(.show-sm):not(.show) {
  6300. display: none;
  6301. }
  6302. }
  6303. .hide-sm:not(.show-gt-xs):not(.show-sm):not(.show) {
  6304. display: none;
  6305. }
  6306. @include layouts_for_breakpoint(sm);
  6307. }
  6308. @media (min-width: $layout-breakpoint-sm) {
  6309. // BIGGER THAN SMALL SCREEN
  6310. @include layouts_for_breakpoint(gt-sm);
  6311. }
  6312. @media (min-width: $layout-breakpoint-sm) and (max-width: $layout-breakpoint-md - 1) {
  6313. // MEDIUM SCREEN
  6314. .hide, .hide-gt-xs, .hide-gt-sm {
  6315. &:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show) {
  6316. display: none;
  6317. }
  6318. }
  6319. .hide-md:not(.show-md):not(.show-gt-sm):not(.show-gt-xs):not(.show) {
  6320. display: none;
  6321. }
  6322. @include layouts_for_breakpoint(md);
  6323. }
  6324. @media (min-width: $layout-breakpoint-md) {
  6325. // BIGGER THAN MEDIUM SCREEN
  6326. @include layouts_for_breakpoint(gt-md);
  6327. }
  6328. @media (min-width: $layout-breakpoint-md) and (max-width: $layout-breakpoint-lg - 1) {
  6329. // LARGE SCREEN
  6330. .hide,.hide-gt-xs, .hide-gt-sm, .hide-gt-md {
  6331. &:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show) {
  6332. display: none;
  6333. }
  6334. }
  6335. .hide-lg:not(.show-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show) {
  6336. display: none;
  6337. }
  6338. @include layouts_for_breakpoint(lg);
  6339. }
  6340. @media (min-width: $layout-breakpoint-lg) {
  6341. @include layouts_for_breakpoint(gt-lg);
  6342. @include layouts_for_breakpoint(xl);
  6343. // BIGGER THAN LARGE SCREEN
  6344. .hide, .hide-gt-xs, .hide-gt-sm, .hide-gt-md, .hide-gt-lg {
  6345. &:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show) {
  6346. display: none;
  6347. }
  6348. }
  6349. .hide-xl:not(.show-xl):not(.show-gt-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show) {
  6350. display: none;
  6351. }
  6352. }
  6353. // General printing Rules
  6354. @media print {
  6355. .hide-print:not(.show-print):not(.show) {
  6356. display: none !important;
  6357. }
  6358. }