[6a3a178] | 1 | /*!
|
---|
| 2 | * AngularJS Material Design
|
---|
| 3 | * https://github.com/angular/material
|
---|
| 4 | * @license MIT
|
---|
| 5 | * v1.2.3
|
---|
| 6 | */
|
---|
| 7 | $font-family: Roboto, 'Helvetica Neue', sans-serif !default;
|
---|
| 8 | $font-size: 10px !default;
|
---|
| 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 | $baseline-grid: 8px !default;
|
---|
| 19 | $layout-gutter-width: ($baseline-grid * 2) !default;
|
---|
| 20 | $layout-breakpoint-xs: 600px !default;
|
---|
| 21 | $layout-breakpoint-sm: 960px !default;
|
---|
| 22 | $layout-breakpoint-md: 1280px !default;
|
---|
| 23 | $layout-breakpoint-lg: 1920px !default;
|
---|
| 24 | $icon-size: rem(2.400) !default;
|
---|
| 25 | $app-bar-height: 64px !default;
|
---|
| 26 | $toast-height: $baseline-grid * 3 !default;
|
---|
| 27 | $toast-margin: $baseline-grid * 1 !default;
|
---|
| 28 | $shadow-key-umbra-opacity: 0.2 !default;
|
---|
| 29 | $shadow-key-penumbra-opacity: 0.14 !default;
|
---|
| 30 | $shadow-ambient-shadow-opacity: 0.12 !default;
|
---|
| 31 | $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;
|
---|
| 32 | $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;
|
---|
| 33 | $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;
|
---|
| 34 | $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;
|
---|
| 35 | $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;
|
---|
| 36 | $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;
|
---|
| 37 | $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;
|
---|
| 38 | $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;
|
---|
| 39 | $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;
|
---|
| 40 | $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;
|
---|
| 41 | $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;
|
---|
| 42 | $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;
|
---|
| 43 | $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;
|
---|
| 44 | $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;
|
---|
| 45 | $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;
|
---|
| 46 | $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;
|
---|
| 47 | $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;
|
---|
| 48 | $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;
|
---|
| 49 | $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;
|
---|
| 50 | $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;
|
---|
| 51 | $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;
|
---|
| 52 | $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;
|
---|
| 53 | $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;
|
---|
| 54 | $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;
|
---|
| 55 | $z-index-toast: 105 !default;
|
---|
| 56 | $z-index-tooltip: 100 !default;
|
---|
| 57 | $z-index-menu: 100 !default;
|
---|
| 58 | $z-index-calendar-pane: 100 !default;
|
---|
| 59 | $z-index-select: 90 !default;
|
---|
| 60 | $z-index-dialog: 80 !default;
|
---|
| 61 | $z-index-bottom-sheet: 70 !default;
|
---|
| 62 | $z-index-scroll-mask: 50 !default;
|
---|
| 63 | $z-index-scroll-mask-bar: 65 !default;
|
---|
| 64 | $z-index-sidenav: 60 !default;
|
---|
| 65 | $z-index-backdrop: 50 !default;
|
---|
| 66 | $z-index-fab: 20 !default;
|
---|
| 67 | $z-index-progress-circular: 2 !default; // Used to fix animation bug in Chrome
|
---|
| 68 | $swift-ease-out-duration: 0.4s !default;
|
---|
| 69 | $swift-ease-out-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;
|
---|
| 70 | $swift-ease-out: all $swift-ease-out-duration $swift-ease-out-timing-function !default;
|
---|
| 71 | $swift-ease-in-duration: 0.3s !default;
|
---|
| 72 | $swift-ease-in-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2) !default;
|
---|
| 73 | $swift-ease-in: all $swift-ease-in-duration $swift-ease-in-timing-function !default;
|
---|
| 74 | $swift-ease-in-out-duration: 0.5s !default;
|
---|
| 75 | $swift-ease-in-out-timing-function: cubic-bezier(0.35, 0, 0.25, 1) !default;
|
---|
| 76 | $swift-ease-in-out: all $swift-ease-in-out-duration $swift-ease-in-out-timing-function !default;
|
---|
| 77 | $swift-linear-duration: 0.08s !default;
|
---|
| 78 | $swift-linear-timing-function: linear !default;
|
---|
| 79 | $swift-linear: all $swift-linear-duration $swift-linear-timing-function !default;
|
---|
| 80 | $material-enter-duration: 0.3s;
|
---|
| 81 | $material-enter-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
|
---|
| 82 | $material-enter: all $material-enter-duration $material-enter-timing-function;
|
---|
| 83 | $material-leave-duration: 0.3s;
|
---|
| 84 | $material-leave-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
|
---|
| 85 | $material-leave: all $material-leave-duration $material-leave-timing-function;
|
---|
| 86 | $button-left-right-padding: rem(0.800) !default;
|
---|
| 87 | $icon-button-height: rem(4.000) !default;
|
---|
| 88 | $icon-button-width: rem(4.000) !default;
|
---|
| 89 | $button-fab-width: rem(5.600) !default;
|
---|
| 90 | $button-fab-height: rem(5.600) !default;
|
---|
| 91 | $button-fab-padding: rem(1.60) !default;
|
---|
| 92 | $checkbox-width: 18px !default;
|
---|
| 93 | $checkbox-height: $checkbox-width !default;
|
---|
| 94 | $checkbox-border-radius: 2px !default;
|
---|
| 95 | $checkbox-border-width: 2px !default;
|
---|
| 96 | $default-horizontal-margin: 16px !default;
|
---|
| 97 | // Typography
|
---|
| 98 | // ------------------------------
|
---|
| 99 |
|
---|
| 100 | //-- Must be defined after $font-size and before variables that depend on the function.
|
---|
| 101 | @function rem($multiplier) {
|
---|
| 102 | @return $multiplier * $font-size;
|
---|
| 103 | }
|
---|
| 104 |
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 | // Layout
|
---|
| 108 | // ------------------------------
|
---|
| 109 |
|
---|
| 110 |
|
---|
| 111 |
|
---|
| 112 | // Icon
|
---|
| 113 |
|
---|
| 114 | // App bar variables
|
---|
| 115 |
|
---|
| 116 |
|
---|
| 117 | // Whiteframes
|
---|
| 118 |
|
---|
| 119 |
|
---|
| 120 | // NOTE(shyndman): gulp-sass seems to be failing if I split the shadow defs across
|
---|
| 121 | // multiple lines. Ugly. Sorry.
|
---|
| 122 |
|
---|
| 123 | // Z-indexes
|
---|
| 124 | //--------------------------------------------
|
---|
| 125 |
|
---|
| 126 |
|
---|
| 127 | // Easing Curves
|
---|
| 128 | //--------------------------------------------
|
---|
| 129 |
|
---|
| 130 |
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 |
|
---|
| 135 |
|
---|
| 136 | // Button
|
---|
| 137 |
|
---|
| 138 | // Fab Buttons (shared between buttons.scss and fab*.scss)
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | // Shared Checkbox variables
|
---|
| 142 |
|
---|
| 143 | // Shared Horizontal Margin Variables
|
---|
| 144 |
|
---|
| 145 | @mixin margin-selectors($before:1em, $after:1em, $start:0px, $end:0px) {
|
---|
| 146 | -webkit-margin-before: $before;
|
---|
| 147 | -webkit-margin-after: $after;
|
---|
| 148 | -webkit-margin-start: $start;
|
---|
| 149 | -webkit-margin-end: $end;
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 | @mixin not-selectable($value:none) {
|
---|
| 153 | -webkit-touch-callout: $value;
|
---|
| 154 | -webkit-user-select: $value;
|
---|
| 155 | -khtml-user-select: $value;
|
---|
| 156 | -moz-user-select: $value;
|
---|
| 157 | -ms-user-select: $value;
|
---|
| 158 | user-select: $value;
|
---|
| 159 | }
|
---|
| 160 |
|
---|
| 161 | @mixin input-placeholder-color($color) {
|
---|
| 162 | $pseudos: '::-webkit-input-placeholder', // For QQ Browser
|
---|
| 163 | ':-ms-input-placeholder', // For IE
|
---|
| 164 | '::-ms-input-placeholder', // For Edge
|
---|
| 165 | '::placeholder';
|
---|
| 166 | $firefox-pseudos: ':-moz-placeholder', '::-moz-placeholder';
|
---|
| 167 |
|
---|
| 168 | // It is important to export every pseudo within its own block, because otherwise the placeholder
|
---|
| 169 | // won't be set on the most browsers.
|
---|
| 170 | @each $pseudo in $pseudos {
|
---|
| 171 | &#{$pseudo} {
|
---|
| 172 | color: unquote($color);
|
---|
| 173 | }
|
---|
| 174 | }
|
---|
| 175 | // Firefox reduces the opacity of placeholders so we need to keep them opaque to avoid applying
|
---|
| 176 | // double the transparency and causing a11y failures due to text contrast.
|
---|
| 177 | @each $pseudo in $firefox-pseudos {
|
---|
| 178 | &#{$pseudo} {
|
---|
| 179 | color: unquote($color);
|
---|
| 180 | opacity: 1;
|
---|
| 181 | }
|
---|
| 182 | }
|
---|
| 183 | }
|
---|
| 184 |
|
---|
| 185 | @mixin pie-clearfix {
|
---|
| 186 | &:after {
|
---|
| 187 | content: '';
|
---|
| 188 | display: table;
|
---|
| 189 | clear: both;
|
---|
| 190 | }
|
---|
| 191 | }
|
---|
| 192 |
|
---|
| 193 | @mixin md-shadow-bottom-z-1() {
|
---|
| 194 | box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
|
---|
| 195 | }
|
---|
| 196 |
|
---|
| 197 | @mixin md-shadow-bottom-z-2() {
|
---|
| 198 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
|
---|
| 199 | }
|
---|
| 200 |
|
---|
| 201 | // Mixin for a "flat" input that can be used for components that contain an input
|
---|
| 202 | // (datepicker, autocomplete).
|
---|
| 203 | @mixin md-flat-input() {
|
---|
| 204 | font-size: 14px;
|
---|
| 205 |
|
---|
| 206 | box-sizing: border-box;
|
---|
| 207 | border: none;
|
---|
| 208 | box-shadow: none;
|
---|
| 209 | outline: none;
|
---|
| 210 | background: transparent;
|
---|
| 211 |
|
---|
| 212 | // The "clear X" that IE adds to input[type="search"]
|
---|
| 213 | &::-ms-clear {
|
---|
| 214 | display: none;
|
---|
| 215 | }
|
---|
| 216 | }
|
---|
| 217 |
|
---|
| 218 | // Typography mixins
|
---|
| 219 |
|
---|
| 220 | @mixin md-title() {
|
---|
| 221 | font-size: $title-font-size-base;
|
---|
| 222 | font-weight: 500;
|
---|
| 223 | letter-spacing: 0.005em;
|
---|
| 224 | }
|
---|
| 225 |
|
---|
| 226 | @mixin md-body-1() {
|
---|
| 227 | font-size: $body-font-size-base;
|
---|
| 228 | font-weight: 400;
|
---|
| 229 | letter-spacing: 0.010em;
|
---|
| 230 | line-height: rem(2);
|
---|
| 231 | }
|
---|
| 232 |
|
---|
| 233 | @mixin md-body-2() {
|
---|
| 234 | font-size: $body-font-size-base;
|
---|
| 235 | font-weight: 500;
|
---|
| 236 | letter-spacing: 0.010em;
|
---|
| 237 | line-height: rem(2.4);
|
---|
| 238 | }
|
---|
| 239 |
|
---|
| 240 | @mixin md-subhead() {
|
---|
| 241 | font-size: $subhead-font-size-base;
|
---|
| 242 | font-weight: 400;
|
---|
| 243 | letter-spacing: 0.010em;
|
---|
| 244 | line-height: rem(2.4);
|
---|
| 245 | }
|
---|
| 246 |
|
---|
| 247 | @function map-to-string($map) {
|
---|
| 248 | $map-str: '{';
|
---|
| 249 | $keys: map-keys($map);
|
---|
| 250 | $len: length($keys);
|
---|
| 251 | @for $i from 1 through $len {
|
---|
| 252 | $key: nth($keys, $i);
|
---|
| 253 | $value: map-get($map, $key);
|
---|
| 254 | $map-str: $map-str + '_' + $key + '_: _' + map-get($map, $key) + '_';
|
---|
| 255 | @if $i != $len {
|
---|
| 256 | $map-str: $map-str + ',';
|
---|
| 257 | }
|
---|
| 258 | }
|
---|
| 259 | @return $map-str + '}';
|
---|
| 260 | }
|
---|
| 261 |
|
---|
| 262 | // This is a mixin, which fixes IE11's vertical alignment issue, when using `min-height`.
|
---|
| 263 | // See https://connect.microsoft.com/IE/feedback/details/816293/
|
---|
| 264 | @mixin ie11-min-height-flexbug($min-height) {
|
---|
| 265 | &::before {
|
---|
| 266 | content: '';
|
---|
| 267 | min-height: $min-height;
|
---|
| 268 | visibility: hidden;
|
---|
| 269 | display: inline-block;
|
---|
| 270 | }
|
---|
| 271 | }
|
---|
| 272 |
|
---|
| 273 | // mixin definition ; sets LTR and RTL within the same style call
|
---|
| 274 | // @see https://css-tricks.com/almanac/properties/d/direction/
|
---|
| 275 |
|
---|
| 276 | @mixin rtl($prop, $ltr-value, $rtl-value) {
|
---|
| 277 | #{$prop}: $ltr-value;
|
---|
| 278 | [dir=rtl] & {
|
---|
| 279 | #{$prop}: $rtl-value;
|
---|
| 280 | }
|
---|
| 281 | }
|
---|
| 282 |
|
---|
| 283 | @mixin rtl-prop($ltr-prop, $rtl-prop, $value, $reset-value) {
|
---|
| 284 | #{$ltr-prop}: $value;
|
---|
| 285 | [dir=rtl] & {
|
---|
| 286 | #{$ltr-prop}: $reset-value;
|
---|
| 287 | #{$rtl-prop}: $value;
|
---|
| 288 | }
|
---|
| 289 | }
|
---|
| 290 |
|
---|
| 291 | // To reverse padding (top left bottom right) -> (top right bottom left)
|
---|
| 292 | @function rtl-value($list) {
|
---|
| 293 | @if length($list) == 4 {
|
---|
| 294 | @return nth($list, 1) nth($list, 4) nth($list, 3) nth($list, 2)
|
---|
| 295 | }
|
---|
| 296 | @if length($list) == 5 {
|
---|
| 297 | @return nth($list, 1) nth($list, 4) nth($list, 3) nth($list, 2) nth($list, 5)
|
---|
| 298 | }
|
---|
| 299 | @return $list;
|
---|
| 300 | }
|
---|
| 301 |
|
---|
| 302 | // Position a FAB button.
|
---|
| 303 | @mixin fab-position($spot, $top: auto, $right: auto, $bottom: auto, $left: auto) {
|
---|
| 304 | &.md-fab-#{$spot} {
|
---|
| 305 | top: $top;
|
---|
| 306 | right: $right;
|
---|
| 307 | bottom: $bottom;
|
---|
| 308 | left: $left;
|
---|
| 309 | position: absolute;
|
---|
| 310 | }
|
---|
| 311 | }
|
---|
| 312 |
|
---|
| 313 | @mixin fab-all-positions() {
|
---|
| 314 | @include fab-position(bottom-right, auto, ($button-fab-width - $button-fab-padding)/2, ($button-fab-height - $button-fab-padding)/2, auto);
|
---|
| 315 | @include fab-position(bottom-left, auto, auto, ($button-fab-height - $button-fab-padding)/2, ($button-fab-width - $button-fab-padding)/2);
|
---|
| 316 | @include fab-position(top-right, ($button-fab-height - $button-fab-padding)/2, ($button-fab-width - $button-fab-padding)/2, auto, auto);
|
---|
| 317 | @include fab-position(top-left, ($button-fab-height - $button-fab-padding)/2, auto, auto, ($button-fab-width - $button-fab-padding)/2);
|
---|
| 318 | }
|
---|
| 319 |
|
---|
| 320 | // This mixin allows a user to use the md-checkbox css outside of the
|
---|
| 321 | // md-checkbox directive.
|
---|
| 322 | // See src/components/select/select.scss for an example.
|
---|
| 323 | @mixin checkbox-container(
|
---|
| 324 | $checkedSelector: '.md-checked',
|
---|
| 325 | $width: $checkbox-width,
|
---|
| 326 | $height: $checkbox-height,
|
---|
| 327 | $border-width: $checkbox-border-width,
|
---|
| 328 | $border-radius: $checkbox-border-radius) {
|
---|
| 329 | .md-container {
|
---|
| 330 | position: absolute;
|
---|
| 331 | top: 50%;
|
---|
| 332 | transform: translateY(-50%);
|
---|
| 333 |
|
---|
| 334 | box-sizing: border-box;
|
---|
| 335 | display: inline-block;
|
---|
| 336 |
|
---|
| 337 | width: $width;
|
---|
| 338 | height: $height;
|
---|
| 339 | @include rtl(left, 0, auto);
|
---|
| 340 | @include rtl(right, auto, 0);
|
---|
| 341 |
|
---|
| 342 | &:before {
|
---|
| 343 | box-sizing: border-box;
|
---|
| 344 | background-color: transparent;
|
---|
| 345 | border-radius: 50%;
|
---|
| 346 | content: '';
|
---|
| 347 | position: absolute;
|
---|
| 348 | display: block;
|
---|
| 349 | height: auto;
|
---|
| 350 | left: 0;
|
---|
| 351 | top: 0;
|
---|
| 352 | right: 0;
|
---|
| 353 | bottom: 0;
|
---|
| 354 | transition: all 0.5s;
|
---|
| 355 | width: auto;
|
---|
| 356 | }
|
---|
| 357 |
|
---|
| 358 | &:after {
|
---|
| 359 | box-sizing: border-box;
|
---|
| 360 | content: '';
|
---|
| 361 | position: absolute;
|
---|
| 362 | top: -10px;
|
---|
| 363 | right: -10px;
|
---|
| 364 | bottom: -10px;
|
---|
| 365 | left: -10px;
|
---|
| 366 | }
|
---|
| 367 |
|
---|
| 368 | .md-ripple-container {
|
---|
| 369 | position: absolute;
|
---|
| 370 | display: block;
|
---|
| 371 | width: auto;
|
---|
| 372 | height: auto;
|
---|
| 373 | left: -15px;
|
---|
| 374 | top: -15px;
|
---|
| 375 | right: -15px;
|
---|
| 376 | bottom: -15px;
|
---|
| 377 | }
|
---|
| 378 | }
|
---|
| 379 |
|
---|
| 380 | // unchecked
|
---|
| 381 | .md-icon {
|
---|
| 382 | box-sizing: border-box;
|
---|
| 383 | transition: 240ms;
|
---|
| 384 | position: absolute;
|
---|
| 385 | top: 0;
|
---|
| 386 | left: 0;
|
---|
| 387 | width: $width;
|
---|
| 388 | height: $height;
|
---|
| 389 | border-width: $border-width;
|
---|
| 390 | border-style: solid;
|
---|
| 391 | border-radius: $border-radius;
|
---|
| 392 | }
|
---|
| 393 |
|
---|
| 394 | &#{$checkedSelector} .md-icon {
|
---|
| 395 | border-color: transparent;
|
---|
| 396 |
|
---|
| 397 | &:after {
|
---|
| 398 | box-sizing: border-box;
|
---|
| 399 | transform: rotate(45deg);
|
---|
| 400 | position: absolute;
|
---|
| 401 | left: $width / 3 - $border-width;
|
---|
| 402 | top: $width / 9 - $border-width;
|
---|
| 403 | display: table;
|
---|
| 404 | width: $width / 3;
|
---|
| 405 | height: $width * 2 / 3;
|
---|
| 406 | border-width: $border-width;
|
---|
| 407 | border-style: solid;
|
---|
| 408 | border-top: 0;
|
---|
| 409 | border-left: 0;
|
---|
| 410 | content: '';
|
---|
| 411 | }
|
---|
| 412 | }
|
---|
| 413 |
|
---|
| 414 | // disabled
|
---|
| 415 | &[disabled] {
|
---|
| 416 | cursor: default;
|
---|
| 417 | }
|
---|
| 418 |
|
---|
| 419 | &.md-indeterminate .md-icon {
|
---|
| 420 | &:after {
|
---|
| 421 | box-sizing: border-box;
|
---|
| 422 | position: absolute;
|
---|
| 423 | top: 50%;
|
---|
| 424 | left: 50%;
|
---|
| 425 | transform: translate(-50%, -50%);
|
---|
| 426 | display: table;
|
---|
| 427 | width: $width * 0.6;
|
---|
| 428 | height: $border-width;
|
---|
| 429 | border-width: $border-width;
|
---|
| 430 | border-style: solid;
|
---|
| 431 | border-top: 0;
|
---|
| 432 | border-left: 0;
|
---|
| 433 | content: '';
|
---|
| 434 | }
|
---|
| 435 | }
|
---|
| 436 | }
|
---|
| 437 |
|
---|
| 438 | // Mixin to create a primary checkbox.
|
---|
| 439 | // Used by the checkbox and select component.
|
---|
| 440 | @mixin checkbox-primary($checkedSelector: '.md-checked') {
|
---|
| 441 | .md-ripple {
|
---|
| 442 | color: '{{primary-600}}';
|
---|
| 443 | }
|
---|
| 444 |
|
---|
| 445 | &#{$checkedSelector} .md-ripple {
|
---|
| 446 | color: '{{background-600}}';
|
---|
| 447 | }
|
---|
| 448 |
|
---|
| 449 | .md-ink-ripple {
|
---|
| 450 | color: '{{foreground-2}}';
|
---|
| 451 | }
|
---|
| 452 |
|
---|
| 453 | &#{$checkedSelector} .md-ink-ripple {
|
---|
| 454 | color: '{{primary-color-0.87}}';
|
---|
| 455 | }
|
---|
| 456 |
|
---|
| 457 | &:not(.md-checked) .md-icon {
|
---|
| 458 | border-color: '{{foreground-2}}';
|
---|
| 459 | }
|
---|
| 460 |
|
---|
| 461 | &#{$checkedSelector} .md-icon {
|
---|
| 462 | background-color: '{{primary-color-0.87}}';
|
---|
| 463 | }
|
---|
| 464 |
|
---|
| 465 | &#{$checkedSelector}.md-focused .md-container:before {
|
---|
| 466 | background-color: '{{primary-color-0.26}}';
|
---|
| 467 | }
|
---|
| 468 |
|
---|
| 469 | &#{$checkedSelector} .md-icon:after {
|
---|
| 470 | border-color: '{{primary-contrast-0.87}}';
|
---|
| 471 | }
|
---|
| 472 |
|
---|
| 473 | & .md-indeterminate[disabled] {
|
---|
| 474 | .md-container {
|
---|
| 475 | color: '{{foreground-3}}';
|
---|
| 476 | }
|
---|
| 477 | }
|
---|
| 478 | }
|
---|
| 479 |
|
---|
| 480 | @mixin dense($prop, $normal, $dense) {
|
---|
| 481 | #{$prop}: $normal;
|
---|
| 482 | .md-dense > &:not(.md-dense-disabled),
|
---|
| 483 | .md-dense :not(.md-dense-disabled) &:not(.md-dense-disabled) {
|
---|
| 484 | #{$prop}: $dense;
|
---|
| 485 | }
|
---|
| 486 | }
|
---|
| 487 |
|
---|
| 488 | @mixin dense-rtl($prop, $ltr-normal, $rtl-normal, $ltr-dense, $rtl-dense) {
|
---|
| 489 | @include rtl($prop, $ltr-normal, $rtl-normal);
|
---|
| 490 | .md-dense > &:not(.md-dense-disabled),
|
---|
| 491 | .md-dense :not(.md-dense-disabled) &:not(.md-dense-disabled) {
|
---|
| 492 | @include rtl($prop, $ltr-dense, $rtl-dense);
|
---|
| 493 | }
|
---|
| 494 | }
|
---|
| 495 |
|
---|
| 496 | // Only use when in row layout
|
---|
| 497 | @mixin when-layout-row($element) {
|
---|
| 498 | @media (max-width: $layout-breakpoint-xs - 1) {
|
---|
| 499 | .layout-row:not(.layout-xs-column),
|
---|
| 500 | .layout-xs-row {
|
---|
| 501 | & > #{$element} { @content; }
|
---|
| 502 | }
|
---|
| 503 | }
|
---|
| 504 | @media (min-width: $layout-breakpoint-xs) and (max-width: $layout-breakpoint-sm - 1) {
|
---|
| 505 | .layout-row:not(.layout-gt-xs-column),
|
---|
| 506 | .layout-gt-xs-row,
|
---|
| 507 | .layout-sm-row {
|
---|
| 508 | &:not(.layout-sm-column) > #{$element} { @content; }
|
---|
| 509 | }
|
---|
| 510 | }
|
---|
| 511 | @media (min-width: $layout-breakpoint-sm) and (max-width: $layout-breakpoint-md - 1) {
|
---|
| 512 | .layout-row:not(.layout-gt-xs-column):not(.layout-gt-sm-column),
|
---|
| 513 | .layout-gt-xs-row:not(.layout-gt-sm-column),
|
---|
| 514 | .layout-gt-sm-row,
|
---|
| 515 | .layout-md-row {
|
---|
| 516 | &:not(.layout-md-column) > #{$element} { @content; }
|
---|
| 517 | }
|
---|
| 518 | }
|
---|
| 519 | @media (min-width: $layout-breakpoint-md) and (max-width: $layout-breakpoint-lg - 1) {
|
---|
| 520 | .layout-row:not(.layout-gt-xs-column):not(.layout-gt-sm-column):not(.layout-gt-md-column),
|
---|
| 521 | .layout-gt-xs-row:not(.layout-gt-sm-column):not(.layout-gt-md-column),
|
---|
| 522 | .layout-gt-sm-row:not(.layout-gt-md-column),
|
---|
| 523 | .layout-gt-md-row,
|
---|
| 524 | .layout-lg-row {
|
---|
| 525 | &:not(.layout-lg-column) > #{$element} { @content; }
|
---|
| 526 | }
|
---|
| 527 | }
|
---|
| 528 | @media (min-width: $layout-breakpoint-lg) {
|
---|
| 529 | .layout-row:not(.layout-gt-xs-column):not(.layout-gt-sm-column):not(.layout-gt-md-column),
|
---|
| 530 | .layout-gt-xs-row:not(.layout-gt-sm-column):not(.layout-gt-md-column),
|
---|
| 531 | .layout-gt-sm-row:not(.layout-gt-md-column),
|
---|
| 532 | .layout-gt-md-row,
|
---|
| 533 | .layout-gt-lg-row,
|
---|
| 534 | .layout-xl-row {
|
---|
| 535 | &:not(.layout-gt-lg-column):not(.layout-xl-column) > #{$element} { @content; }
|
---|
| 536 | }
|
---|
| 537 | }
|
---|
| 538 | }
|
---|
| 539 |
|
---|
| 540 | // Auto insert object margin
|
---|
| 541 | @mixin auto-horizontal-margin($selector) {
|
---|
| 542 | @include when-layout-row($selector) {
|
---|
| 543 | &:not(:first-child) {
|
---|
| 544 | @include rtl-prop(margin-left, margin-right, $default-horizontal-margin, 0);
|
---|
| 545 | }
|
---|
| 546 | }
|
---|
| 547 | }
|
---|
| 548 |
|
---|
| 549 | /*
|
---|
| 550 | * Responsive attributes
|
---|
| 551 | *
|
---|
| 552 | * References:
|
---|
| 553 | * 1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex
|
---|
| 554 | * 2) https://css-tricks.com/almanac/properties/f/flex/
|
---|
| 555 | * 3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/
|
---|
| 556 | * 4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
|
---|
| 557 | * 5) http://godban.com.ua/projects/flexgrid
|
---|
| 558 | */
|
---|
| 559 | @mixin flex-order-for-name($sizes:null) {
|
---|
| 560 | @if $sizes == null {
|
---|
| 561 | $sizes : '';
|
---|
| 562 |
|
---|
| 563 | .flex-order {
|
---|
| 564 | order : 0;
|
---|
| 565 | }
|
---|
| 566 | }
|
---|
| 567 |
|
---|
| 568 | @for $i from -20 through 20 {
|
---|
| 569 | $order : '';
|
---|
| 570 | $suffix : '';
|
---|
| 571 |
|
---|
| 572 | @each $s in $sizes {
|
---|
| 573 | @if $s != '' { $suffix : '#{$s}-#{$i}'; }
|
---|
| 574 | @else { $suffix : '#{$i}'; }
|
---|
| 575 |
|
---|
| 576 | $order : '.flex-order-#{$suffix}';
|
---|
| 577 | }
|
---|
| 578 |
|
---|
| 579 | #{$order} {
|
---|
| 580 | order: #{$i};
|
---|
| 581 | }
|
---|
| 582 | }
|
---|
| 583 | }
|
---|
| 584 |
|
---|
| 585 | @mixin offset-for-name($sizes:null) {
|
---|
| 586 | @if $sizes == null { $sizes : ''; }
|
---|
| 587 |
|
---|
| 588 | @for $i from 0 through 19 {
|
---|
| 589 | $offsets : '';
|
---|
| 590 | $suffix : '';
|
---|
| 591 |
|
---|
| 592 | @each $s in $sizes {
|
---|
| 593 | @if $s != '' { $suffix : '#{$s}-#{$i * 5}'; }
|
---|
| 594 | @else { $suffix : '#{$i * 5}'; }
|
---|
| 595 |
|
---|
| 596 | $offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
|
---|
| 597 | }
|
---|
| 598 |
|
---|
| 599 | #{$offsets} {
|
---|
| 600 | @if $i != 0 { @include rtl-prop(margin-left, margin-right, #{$i * 5 + '%'}, auto); }
|
---|
| 601 | @else { @include rtl-prop(margin-left, margin-right, 0, auto); }
|
---|
| 602 | }
|
---|
| 603 | }
|
---|
| 604 |
|
---|
| 605 | @each $i in 33 {
|
---|
| 606 | $offsets : '';
|
---|
| 607 | $suffix : '';
|
---|
| 608 |
|
---|
| 609 | @each $s in $sizes {
|
---|
| 610 | @if $s != '' { $suffix : '#{$s}-#{$i}'; }
|
---|
| 611 | @else { $suffix : '#{$i}'; }
|
---|
| 612 |
|
---|
| 613 | $offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
|
---|
| 614 | }
|
---|
| 615 |
|
---|
| 616 | #{$offsets} {
|
---|
| 617 | margin-left: calc(100% / 3);
|
---|
| 618 | }
|
---|
| 619 | }
|
---|
| 620 |
|
---|
| 621 | @each $i in 66 {
|
---|
| 622 | $offsets : '';
|
---|
| 623 | $suffix : '';
|
---|
| 624 |
|
---|
| 625 | @each $s in $sizes {
|
---|
| 626 | @if $s != '' { $suffix : '#{$s}-#{$i}'; }
|
---|
| 627 | @else { $suffix : '#{$i}'; }
|
---|
| 628 |
|
---|
| 629 | $offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
|
---|
| 630 | }
|
---|
| 631 |
|
---|
| 632 | #{$offsets} {
|
---|
| 633 | @include rtl-prop(margin-left, margin-right, calc(200% / 3), auto);
|
---|
| 634 | }
|
---|
| 635 | }
|
---|
| 636 | }
|
---|
| 637 |
|
---|
| 638 | @mixin layout-for-name($name: null) {
|
---|
| 639 | @if $name == null { $name : ''; }
|
---|
| 640 | @if $name != '' { $name : '-#{$name}'; }
|
---|
| 641 |
|
---|
| 642 | .layout#{$name}, .layout#{$name}-column, .layout#{$name}-row {
|
---|
| 643 | box-sizing: border-box;
|
---|
| 644 | display: -webkit-box;
|
---|
| 645 | display: -webkit-flex;
|
---|
| 646 | display: -moz-box;
|
---|
| 647 | display: -ms-flexbox;
|
---|
| 648 | display: flex;
|
---|
| 649 | }
|
---|
| 650 | .layout#{$name}-column { flex-direction: column; }
|
---|
| 651 | .layout#{$name}-row { flex-direction: row; }
|
---|
| 652 | }
|
---|
| 653 |
|
---|
| 654 | @mixin flex-properties-for-name($name: null) {
|
---|
| 655 | $flexName: 'flex';
|
---|
| 656 | // $name would be something like xs, sm, md, lg, xl
|
---|
| 657 | @if $name != null {
|
---|
| 658 | $flexName: 'flex-#{$name}';
|
---|
| 659 | $name : '-#{$name}';
|
---|
| 660 | } @else {
|
---|
| 661 | $name : '';
|
---|
| 662 | }
|
---|
| 663 |
|
---|
| 664 | .#{$flexName} { flex: 1; box-sizing: border-box; } // === flex: 1 1 0%;
|
---|
| 665 |
|
---|
| 666 | .#{$flexName}-grow { flex: 1 1 100%; box-sizing: border-box; }
|
---|
| 667 | .#{$flexName}-initial { flex: 0 1 auto; box-sizing: border-box; }
|
---|
| 668 | .#{$flexName}-auto { flex: 1 1 auto; box-sizing: border-box; }
|
---|
| 669 | .#{$flexName}-none { flex: 0 0 auto; box-sizing: border-box; }
|
---|
| 670 | .#{$flexName}-noshrink { flex: 1 0 auto; box-sizing: border-box; }
|
---|
| 671 | .#{$flexName}-nogrow { flex: 0 1 auto; box-sizing: border-box; }
|
---|
| 672 |
|
---|
| 673 | // (1-20) * 5 = 0-100%
|
---|
| 674 | @for $i from 0 through 20 {
|
---|
| 675 | $value : #{$i * 5 + '%'};
|
---|
| 676 |
|
---|
| 677 | .#{$flexName}-#{$i * 5} {
|
---|
| 678 | flex: 1 1 100%;
|
---|
| 679 | max-width: #{$value};
|
---|
| 680 | max-height: 100%;
|
---|
| 681 | box-sizing: border-box;
|
---|
| 682 | }
|
---|
| 683 |
|
---|
| 684 | .layout-row > .#{$flexName}-#{$i * 5} {
|
---|
| 685 | flex: 1 1 100%;
|
---|
| 686 | max-width: #{$value};
|
---|
| 687 | max-height: 100%;
|
---|
| 688 | box-sizing: border-box;
|
---|
| 689 |
|
---|
| 690 | // Required by Chrome M48+ due to http://crbug.com/546034
|
---|
| 691 | @if $i == 0 { min-width: 0; }
|
---|
| 692 | }
|
---|
| 693 |
|
---|
| 694 | .layout-column > .#{$flexName}-#{$i * 5} {
|
---|
| 695 | flex: 1 1 100%;
|
---|
| 696 | max-width: 100%;
|
---|
| 697 | max-height: #{$value};
|
---|
| 698 | box-sizing: border-box;
|
---|
| 699 | }
|
---|
| 700 |
|
---|
| 701 | @if ($name != '') {
|
---|
| 702 | .layout#{$name}-row > .#{$flexName}-#{$i * 5} {
|
---|
| 703 | flex: 1 1 100%;
|
---|
| 704 | max-width: #{$value};
|
---|
| 705 | max-height: 100%;
|
---|
| 706 | box-sizing: border-box;
|
---|
| 707 |
|
---|
| 708 | // Required by Chrome M48+ due to http://crbug.com/546034
|
---|
| 709 | @if $i == 0 { min-width: 0; }
|
---|
| 710 | }
|
---|
| 711 |
|
---|
| 712 | .layout#{$name}-column > .#{$flexName}-#{$i * 5} {
|
---|
| 713 | flex: 1 1 100%;
|
---|
| 714 | max-width: 100%;
|
---|
| 715 | max-height: #{$value};
|
---|
| 716 | box-sizing: border-box;
|
---|
| 717 |
|
---|
| 718 | // Required by Chrome M48+ due to http://crbug.com/546034
|
---|
| 719 | @if $i == 0 { min-height: 0; }
|
---|
| 720 | }
|
---|
| 721 | }
|
---|
| 722 | }
|
---|
| 723 |
|
---|
| 724 | @if ($name == '') {
|
---|
| 725 | .flex-33 { flex: 1 1 100%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
|
---|
| 726 | .flex-66 { flex: 1 1 100%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
|
---|
| 727 | }
|
---|
| 728 |
|
---|
| 729 | .layout-row {
|
---|
| 730 | > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
|
---|
| 731 | > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
|
---|
| 732 | }
|
---|
| 733 |
|
---|
| 734 | .layout-column {
|
---|
| 735 | > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
|
---|
| 736 | > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
|
---|
| 737 | }
|
---|
| 738 |
|
---|
| 739 | .layout#{$name}-row {
|
---|
| 740 | > .#{$flexName}-33 { flex: 1 1 100%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
|
---|
| 741 | > .#{$flexName}-66 { flex: 1 1 100%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
|
---|
| 742 |
|
---|
| 743 | // Required by Chrome M48+ due to http://crbug.com/546034
|
---|
| 744 | > .flex { min-width: 0; }
|
---|
| 745 | }
|
---|
| 746 |
|
---|
| 747 | .layout#{$name}-column {
|
---|
| 748 | > .#{$flexName}-33 { flex: 1 1 100%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
|
---|
| 749 | > .#{$flexName}-66 { flex: 1 1 100%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
|
---|
| 750 |
|
---|
| 751 | // Required by Chrome M48+ due to http://crbug.com/546034
|
---|
| 752 | > .flex { min-height: 0; }
|
---|
| 753 | }
|
---|
| 754 | }
|
---|
| 755 |
|
---|
| 756 | @mixin layout-align-for-name($suffix: null) {
|
---|
| 757 |
|
---|
| 758 | // Alignment attributes for layout containers' children
|
---|
| 759 | // Arrange on the Main Axis
|
---|
| 760 | // center, start, end, space-between, space-around
|
---|
| 761 | // flex-start is the default for justify-content
|
---|
| 762 | // ------------------------------
|
---|
| 763 |
|
---|
| 764 | $name: 'layout-align';
|
---|
| 765 | @if $suffix != null {
|
---|
| 766 | $name: 'layout-align-#{$suffix}';
|
---|
| 767 | }
|
---|
| 768 |
|
---|
| 769 | .#{$name},
|
---|
| 770 | .#{$name}-start-stretch // defaults
|
---|
| 771 | {
|
---|
| 772 | justify-content : flex-start;
|
---|
| 773 | align-content : stretch;
|
---|
| 774 | align-items: stretch;
|
---|
| 775 | }
|
---|
| 776 |
|
---|
| 777 | // Main Axis Center
|
---|
| 778 | .#{$name}-start,
|
---|
| 779 | .#{$name}-start-start,
|
---|
| 780 | .#{$name}-start-center,
|
---|
| 781 | .#{$name}-start-end,
|
---|
| 782 | .#{$name}-start-stretch
|
---|
| 783 | {
|
---|
| 784 | justify-content: flex-start;
|
---|
| 785 | }
|
---|
| 786 |
|
---|
| 787 | // Main Axis Center
|
---|
| 788 | .#{$name}-center, //stretch
|
---|
| 789 | .#{$name}-center-start,
|
---|
| 790 | .#{$name}-center-center,
|
---|
| 791 | .#{$name}-center-end,
|
---|
| 792 | .#{$name}-center-stretch
|
---|
| 793 | {
|
---|
| 794 | justify-content: center;
|
---|
| 795 | }
|
---|
| 796 |
|
---|
| 797 | // Main Axis End
|
---|
| 798 | .#{$name}-end, //stretch
|
---|
| 799 | .#{$name}-end-start,
|
---|
| 800 | .#{$name}-end-center,
|
---|
| 801 | .#{$name}-end-end,
|
---|
| 802 | .#{$name}-end-stretch
|
---|
| 803 | {
|
---|
| 804 | justify-content: flex-end;
|
---|
| 805 | }
|
---|
| 806 |
|
---|
| 807 | // Main Axis Space Around
|
---|
| 808 | .#{$name}-space-around, //stretch
|
---|
| 809 | .#{$name}-space-around-center,
|
---|
| 810 | .#{$name}-space-around-start,
|
---|
| 811 | .#{$name}-space-around-end,
|
---|
| 812 | .#{$name}-space-around-stretch
|
---|
| 813 | {
|
---|
| 814 | justify-content: space-around;
|
---|
| 815 | }
|
---|
| 816 |
|
---|
| 817 | // Main Axis Space Between
|
---|
| 818 | .#{$name}-space-between, //stretch
|
---|
| 819 | .#{$name}-space-between-center,
|
---|
| 820 | .#{$name}-space-between-start,
|
---|
| 821 | .#{$name}-space-between-end,
|
---|
| 822 | .#{$name}-space-between-stretch
|
---|
| 823 | {
|
---|
| 824 | justify-content: space-between;
|
---|
| 825 | }
|
---|
| 826 |
|
---|
| 827 |
|
---|
| 828 | // Arrange on the Cross Axis
|
---|
| 829 | // center, start, end
|
---|
| 830 | // stretch is the default for align-items
|
---|
| 831 | // ------------------------------
|
---|
| 832 |
|
---|
| 833 | // Cross Axis Start
|
---|
| 834 | .#{$name}-start-start,
|
---|
| 835 | .#{$name}-center-start,
|
---|
| 836 | .#{$name}-end-start,
|
---|
| 837 | .#{$name}-space-between-start,
|
---|
| 838 | .#{$name}-space-around-start
|
---|
| 839 | {
|
---|
| 840 | align-items: flex-start;
|
---|
| 841 | align-content: flex-start;
|
---|
| 842 | }
|
---|
| 843 |
|
---|
| 844 | // Cross Axis Center
|
---|
| 845 | .#{$name}-start-center,
|
---|
| 846 | .#{$name}-center-center,
|
---|
| 847 | .#{$name}-end-center,
|
---|
| 848 | .#{$name}-space-between-center,
|
---|
| 849 | .#{$name}-space-around-center
|
---|
| 850 | {
|
---|
| 851 | align-items: center;
|
---|
| 852 | align-content: center;
|
---|
| 853 | max-width: 100%;
|
---|
| 854 | }
|
---|
| 855 |
|
---|
| 856 | // Cross Axis Center IE overflow fix
|
---|
| 857 | .#{$name}-start-center > *,
|
---|
| 858 | .#{$name}-center-center > *,
|
---|
| 859 | .#{$name}-end-center > *,
|
---|
| 860 | .#{$name}-space-between-center > *,
|
---|
| 861 | .#{$name}-space-around-center > *
|
---|
| 862 | {
|
---|
| 863 | max-width: 100%;
|
---|
| 864 | box-sizing: border-box;
|
---|
| 865 | }
|
---|
| 866 |
|
---|
| 867 | // Cross Axis End
|
---|
| 868 | .#{$name}-start-end,
|
---|
| 869 | .#{$name}-center-end,
|
---|
| 870 | .#{$name}-end-end,
|
---|
| 871 | .#{$name}-space-between-end,
|
---|
| 872 | .#{$name}-space-around-end
|
---|
| 873 | {
|
---|
| 874 | align-items: flex-end;
|
---|
| 875 | align-content: flex-end;
|
---|
| 876 | }
|
---|
| 877 |
|
---|
| 878 | // Cross Axis Start
|
---|
| 879 | .#{$name}-start-stretch,
|
---|
| 880 | .#{$name}-center-stretch,
|
---|
| 881 | .#{$name}-end-stretch,
|
---|
| 882 | .#{$name}-space-between-stretch,
|
---|
| 883 | .#{$name}-space-around-stretch
|
---|
| 884 | {
|
---|
| 885 | align-items: stretch;
|
---|
| 886 | align-content: stretch;
|
---|
| 887 | }
|
---|
| 888 | }
|
---|
| 889 |
|
---|
| 890 | @mixin layout-padding-margin() {
|
---|
| 891 |
|
---|
| 892 | // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
|
---|
| 893 | .layout-padding-sm > *,
|
---|
| 894 | .layout-padding > .flex-sm
|
---|
| 895 | {
|
---|
| 896 | padding: $layout-gutter-width / 4;
|
---|
| 897 | }
|
---|
| 898 |
|
---|
| 899 | .layout-padding,
|
---|
| 900 | .layout-padding-gt-sm,
|
---|
| 901 | .layout-padding-md,
|
---|
| 902 |
|
---|
| 903 | // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
|
---|
| 904 | .layout-padding > *,
|
---|
| 905 | .layout-padding-gt-sm > *,
|
---|
| 906 | .layout-padding-md > *,
|
---|
| 907 |
|
---|
| 908 | .layout-padding > .flex,
|
---|
| 909 | .layout-padding > .flex-gt-sm,
|
---|
| 910 | .layout-padding > .flex-md
|
---|
| 911 | {
|
---|
| 912 | padding: $layout-gutter-width / 2;
|
---|
| 913 | }
|
---|
| 914 |
|
---|
| 915 | // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
|
---|
| 916 | .layout-padding-gt-md > *,
|
---|
| 917 | .layout-padding-lg > *,
|
---|
| 918 | .layout-padding-gt-lg > *,
|
---|
| 919 |
|
---|
| 920 | .layout-padding > .flex-gt-md,
|
---|
| 921 | .layout-padding > .flex-lg,
|
---|
| 922 | .layout-padding > .flex-lg,
|
---|
| 923 | .layout-padding > .flex-gt-lg
|
---|
| 924 | {
|
---|
| 925 | padding: $layout-gutter-width / 1;
|
---|
| 926 | }
|
---|
| 927 |
|
---|
| 928 | // Margin enhancements
|
---|
| 929 |
|
---|
| 930 | .layout-margin-sm > *,
|
---|
| 931 | .layout-margin > .flex-sm
|
---|
| 932 | {
|
---|
| 933 | margin: $layout-gutter-width / 4;
|
---|
| 934 | }
|
---|
| 935 |
|
---|
| 936 | .layout-margin,
|
---|
| 937 | .layout-margin-gt-sm,
|
---|
| 938 | .layout-margin-md,
|
---|
| 939 |
|
---|
| 940 | // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
|
---|
| 941 | .layout-margin > *,
|
---|
| 942 | .layout-margin-gt-sm > *,
|
---|
| 943 | .layout-margin-md > *,
|
---|
| 944 |
|
---|
| 945 | .layout-margin > .flex,
|
---|
| 946 | .layout-margin > .flex-gt-sm,
|
---|
| 947 | .layout-margin > .flex-md
|
---|
| 948 | {
|
---|
| 949 | margin: $layout-gutter-width / 2;
|
---|
| 950 | }
|
---|
| 951 |
|
---|
| 952 | // NOTE: these`> *` selectors should only be applied for layout="row" or layout="column" children !!
|
---|
| 953 | .layout-margin-gt-md > *,
|
---|
| 954 | .layout-margin-lg > *,
|
---|
| 955 | .layout-margin-gt-lg > *,
|
---|
| 956 |
|
---|
| 957 | .layout-margin > .flex-gt-md,
|
---|
| 958 | .layout-margin > .flex-lg,
|
---|
| 959 | .layout-margin > .flex-gt-lg
|
---|
| 960 | {
|
---|
| 961 | margin: $layout-gutter-width / 1;
|
---|
| 962 | }
|
---|
| 963 |
|
---|
| 964 | .layout-wrap {
|
---|
| 965 | flex-wrap: wrap;
|
---|
| 966 | }
|
---|
| 967 |
|
---|
| 968 | .layout-nowrap {
|
---|
| 969 | flex-wrap: nowrap;
|
---|
| 970 | }
|
---|
| 971 |
|
---|
| 972 | .layout-fill {
|
---|
| 973 | margin: 0;
|
---|
| 974 | width: 100%;
|
---|
| 975 | min-height: 100%;
|
---|
| 976 | height: 100%;
|
---|
| 977 | }
|
---|
| 978 | }
|
---|
| 979 |
|
---|
| 980 | @mixin layouts_for_breakpoint($name:null) {
|
---|
| 981 | @include flex-order-for-name($name);
|
---|
| 982 | @include offset-for-name($name);
|
---|
| 983 | @include layout-align-for-name($name);
|
---|
| 984 |
|
---|
| 985 | @include flex-properties-for-name($name);
|
---|
| 986 | @include layout-for-name($name);
|
---|
| 987 | }
|
---|
| 988 |
|
---|
| 989 | /*
|
---|
| 990 | * Since Layout API uses ng-cloak to hide the dom elements while layouts are adjusted
|
---|
| 991 | */
|
---|
| 992 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
|
---|
| 993 | display: none !important;
|
---|
| 994 | }
|
---|
| 995 |
|
---|
| 996 | /*
|
---|
| 997 | * Responsive attributes
|
---|
| 998 | *
|
---|
| 999 | * References:
|
---|
| 1000 | * 1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex
|
---|
| 1001 | * 2) https://css-tricks.com/almanac/properties/f/flex/
|
---|
| 1002 | * 3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/
|
---|
| 1003 | * 4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
|
---|
| 1004 | * 5) http://godban.com.ua/projects/flexgrid
|
---|
| 1005 | */
|
---|
| 1006 | @-moz-document url-prefix() {
|
---|
| 1007 | .layout-fill {
|
---|
| 1008 | margin: 0;
|
---|
| 1009 | width: 100%;
|
---|
| 1010 | min-height: 100%;
|
---|
| 1011 | height: 100%;
|
---|
| 1012 | }
|
---|
| 1013 | }
|
---|
| 1014 |
|
---|
| 1015 | /*
|
---|
| 1016 | * Apply Mixins to create Layout/Flexbox styles
|
---|
| 1017 | */
|
---|
| 1018 | @include layouts_for_breakpoint();
|
---|
| 1019 | @include layout-padding-margin();
|
---|
| 1020 |
|
---|
| 1021 | /**
|
---|
| 1022 | * `hide-gt-sm show-gt-lg` should hide from 600px to 1200px
|
---|
| 1023 | * `show-md hide-gt-sm` should show from 0px to 960px and hide at >960px
|
---|
| 1024 | * `hide-gt-md show-gt-sm` should show everywhere (show overrides hide)`
|
---|
| 1025 | *
|
---|
| 1026 | * hide means hide everywhere
|
---|
| 1027 | * Sizes:
|
---|
| 1028 | * $layout-breakpoint-xs: 600px !default;
|
---|
| 1029 | * $layout-breakpoint-sm: 960px !default;
|
---|
| 1030 | * $layout-breakpoint-md: 1280px !default;
|
---|
| 1031 | * $layout-breakpoint-lg: 1920px !default;
|
---|
| 1032 | */
|
---|
| 1033 | @media (max-width: $layout-breakpoint-xs - 1) {
|
---|
| 1034 | // Xtra-SMALL SCREEN
|
---|
| 1035 | .hide-xs, .hide {
|
---|
| 1036 | &:not(.show-xs):not(.show) {
|
---|
| 1037 | display: none;
|
---|
| 1038 | }
|
---|
| 1039 | }
|
---|
| 1040 | @include layouts_for_breakpoint(xs);
|
---|
| 1041 | }
|
---|
| 1042 |
|
---|
| 1043 | @media (min-width: $layout-breakpoint-xs) {
|
---|
| 1044 | // BIGGER THAN Xtra-SMALL SCREEN
|
---|
| 1045 | @include layouts_for_breakpoint(gt-xs);
|
---|
| 1046 |
|
---|
| 1047 | }
|
---|
| 1048 |
|
---|
| 1049 | @media (min-width: $layout-breakpoint-xs) and (max-width: $layout-breakpoint-sm - 1) {
|
---|
| 1050 | .hide, .hide-gt-xs {
|
---|
| 1051 | &:not(.show-gt-xs):not(.show-sm):not(.show) {
|
---|
| 1052 | display: none;
|
---|
| 1053 | }
|
---|
| 1054 | }
|
---|
| 1055 | .hide-sm:not(.show-gt-xs):not(.show-sm):not(.show) {
|
---|
| 1056 | display: none;
|
---|
| 1057 | }
|
---|
| 1058 |
|
---|
| 1059 | @include layouts_for_breakpoint(sm);
|
---|
| 1060 | }
|
---|
| 1061 |
|
---|
| 1062 | @media (min-width: $layout-breakpoint-sm) {
|
---|
| 1063 | // BIGGER THAN SMALL SCREEN
|
---|
| 1064 | @include layouts_for_breakpoint(gt-sm);
|
---|
| 1065 |
|
---|
| 1066 | }
|
---|
| 1067 |
|
---|
| 1068 | @media (min-width: $layout-breakpoint-sm) and (max-width: $layout-breakpoint-md - 1) {
|
---|
| 1069 | // MEDIUM SCREEN
|
---|
| 1070 | .hide, .hide-gt-xs, .hide-gt-sm {
|
---|
| 1071 | &:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show) {
|
---|
| 1072 | display: none;
|
---|
| 1073 | }
|
---|
| 1074 | }
|
---|
| 1075 | .hide-md:not(.show-md):not(.show-gt-sm):not(.show-gt-xs):not(.show) {
|
---|
| 1076 | display: none;
|
---|
| 1077 | }
|
---|
| 1078 | @include layouts_for_breakpoint(md);
|
---|
| 1079 | }
|
---|
| 1080 |
|
---|
| 1081 | @media (min-width: $layout-breakpoint-md) {
|
---|
| 1082 | // BIGGER THAN MEDIUM SCREEN
|
---|
| 1083 | @include layouts_for_breakpoint(gt-md);
|
---|
| 1084 | }
|
---|
| 1085 |
|
---|
| 1086 | @media (min-width: $layout-breakpoint-md) and (max-width: $layout-breakpoint-lg - 1) {
|
---|
| 1087 | // LARGE SCREEN
|
---|
| 1088 | .hide,.hide-gt-xs, .hide-gt-sm, .hide-gt-md {
|
---|
| 1089 | &:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show) {
|
---|
| 1090 | display: none;
|
---|
| 1091 | }
|
---|
| 1092 | }
|
---|
| 1093 | .hide-lg:not(.show-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show) {
|
---|
| 1094 | display: none;
|
---|
| 1095 | }
|
---|
| 1096 |
|
---|
| 1097 | @include layouts_for_breakpoint(lg);
|
---|
| 1098 | }
|
---|
| 1099 |
|
---|
| 1100 | @media (min-width: $layout-breakpoint-lg) {
|
---|
| 1101 | @include layouts_for_breakpoint(gt-lg);
|
---|
| 1102 | @include layouts_for_breakpoint(xl);
|
---|
| 1103 |
|
---|
| 1104 | // BIGGER THAN LARGE SCREEN
|
---|
| 1105 | .hide, .hide-gt-xs, .hide-gt-sm, .hide-gt-md, .hide-gt-lg {
|
---|
| 1106 | &:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show) {
|
---|
| 1107 | display: none;
|
---|
| 1108 | }
|
---|
| 1109 | }
|
---|
| 1110 | .hide-xl:not(.show-xl):not(.show-gt-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show) {
|
---|
| 1111 | display: none;
|
---|
| 1112 | }
|
---|
| 1113 |
|
---|
| 1114 | }
|
---|
| 1115 |
|
---|
| 1116 | // General printing Rules
|
---|
| 1117 | @media print {
|
---|
| 1118 |
|
---|
| 1119 | .hide-print:not(.show-print):not(.show) {
|
---|
| 1120 | display: none !important;
|
---|
| 1121 | }
|
---|
| 1122 | }
|
---|