$mbsc-font-path: '' !default; @font-face { font-family: 'Mobiscroll'; src: url($mbsc-font-path + 'icons_mobiscroll.woff?weozcf') format('woff'), url($mbsc-font-path + 'icons_mobiscroll.woff') format('woff'), url($mbsc-font-path + 'icons_mobiscroll.ttf?weozcf') format('truetype'); font-weight: normal; font-style: normal; } .mbsc-font-icon:before { font-family: 'Mobiscroll'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* Icons */ .mbsc-icon-arrow-down5::before { content: "\ea01"; } .mbsc-icon-arrow-left5::before { content: "\ea02"; } .mbsc-icon-arrow-left6::before { content: "\ea03"; } .mbsc-icon-arrow-right5::before { content: "\ea04"; } .mbsc-icon-arrow-right6::before { content: "\ea05"; } .mbsc-icon-arrow-up5::before { content: "\ea06"; } .mbsc-icon-eye-blocked::before { content: "\ea07"; } .mbsc-icon-eye::before { content: "\ea08"; } .mbsc-icon-ion-ios7-arrow-back::before { content: "\ea09"; } .mbsc-icon-ion-ios7-arrow-forward::before { content: "\ea0a"; } .mbsc-icon-ion-ios7-checkmark-empty::before { content: "\ea0b"; } .mbsc-icon-ios-backspace::before { content: "\ea0c"; } .mbsc-icon-minus::before { content: "\ea0d"; } .mbsc-icon-plus::before { content: "\ea0e"; } .mbsc-icon-star::before { content: "\ea0f"; } .mbsc-icon-star3::before { content: "\ea10"; } .mbsc-icon { display: inline-block; vertical-align: middle; width: 1.5em; height: 1.5em; line-height: 1.5em; text-align: center; flex: 0 0 auto; } .mbsc-icon > svg { display: block; margin: 0 auto; width: 100%; height: 100%; fill: currentColor; } :root { --mbsc-safe-top: 0; --mbsc-safe-right: 0; --mbsc-safe-bottom: 0; --mbsc-safe-left: 0; @supports (top: constant(safe-area-inset-top)) { --mbsc-safe-top: constant(safe-area-inset-top); --mbsc-safe-right: constant(safe-area-inset-right); --mbsc-safe-bottom: constant(safe-area-inset-bottom); --mbsc-safe-left: constant(safe-area-inset-left); } @supports (top: env(safe-area-inset-top)) { --mbsc-safe-top: env(safe-area-inset-top); --mbsc-safe-right: env(safe-area-inset-right); --mbsc-safe-bottom: env(safe-area-inset-bottom); --mbsc-safe-left: env(safe-area-inset-left); } } .mbsc-font { font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; font-weight: normal; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; } .mbsc-reset { margin: 0; padding: 0; border: 0; background: none; // border-radius: 0; // font-family: inherit; -webkit-appearance: none; -moz-appearance: none; appearance: none; } .mbsc-resize { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; } .mbsc-resize-i { position: absolute; left: 0; top: 0; } .mbsc-resize-y { width: 200%; height: 200%; } .mbsc-hidden { visibility: hidden; } .mbsc-ltr { direction: ltr; } .mbsc-rtl { direction: rtl; } .mbsc-ripple { background: currentColor; position: absolute; top: 0; left: 0; opacity: 0; border-radius: 1000em; pointer-events: none; transform: scale(0); } /* Flex util classes */ .mbsc-flex, .mbsc-flex-col { display: flex; } .mbsc-flex-col { flex-direction: column; } .mbsc-flex-1-1 { flex: 1 1 auto; } .mbsc-flex-1-0 { flex: 1 0 auto; } .mbsc-flex-1-0-0 { flex: 1 0 0; } /* IE11 hack, where flex-basis auto does not work correctly */ @media all and (-ms-high-contrast:none) { .mbsc-flex-1-0-0 { flex: 1 0 auto; } } .mbsc-flex-none { flex: none; } @media (-webkit-min-device-pixel-ratio: 2) { .mbsc-hb, .mbsc-hb:before, .mbsc-hb:after { border-width: .5px !important; } } // Theme variables for download builder $mbsc-ios-theme: 'true' !default; $mbsc-material-theme: null !default; $mbsc-windows-theme: null !default; $mbsc-mobiscroll-theme: null !default; // Component conditional loading variables $mbsc-datepicker: true !default; $mbsc-eventcalendar: true !default; $mbsc-forms: true !default; $mbsc-grid-layout: true !default; $mbsc-popup: true !default; $mbsc-select: true !default; // Sub-components and Dependencies $mbsc-button: false !default; $mbsc-input: false !default; $mbsc-scroller: false !default; $mbsc-segmented: false !default; $mbsc-calendar-view: false !default; @if $mbsc-datepicker or $mbsc-eventcalendar { $mbsc-calendar-view: true; } @if $mbsc-datepicker or $mbsc-select { // pickers $mbsc-button: true; $mbsc-input: true; $mbsc-popup: true; $mbsc-scroller: true; } @if $mbsc-forms { $mbsc-button: true; $mbsc-input: true; $mbsc-segmented: true; } @if $mbsc-datepicker { $mbsc-segmented: true; } @if $mbsc-popup or $mbsc-eventcalendar { $mbsc-button: true; } // Page color variables $mbsc-page-background-light: null !default; $mbsc-page-background-dark: null !default; $mbsc-page-text-light: null !default; $mbsc-page-text-dark: null !default; $mbsc-button-color-light: null !default; $mbsc-button-color-dark: null !default; $mbsc-button-text-light: null !default; $mbsc-button-text-dark: null !default; $mbsc-form-background-light: null !default; $mbsc-form-background-dark: null !default; $mbsc-form-accent-light: null !default; $mbsc-form-accent-dark: null !default; $mbsc-form-text-light: null !default; $mbsc-form-text-dark: null !default; $mbsc-form-error-light: null !default; $mbsc-form-error-dark: null !default; $mbsc-input-background-light: null !default; $mbsc-input-background-dark: null !default; $mbsc-input-text-light: null !default; $mbsc-input-text-dark: null !default; $mbsc-input-accent-light: null !default; $mbsc-input-accent-dark: null !default; $mbsc-input-border-light: null !default; $mbsc-input-border-dark: null !default; $mbsc-calendar-background-light: null !default; $mbsc-calendar-background-dark: null !default; $mbsc-calendar-text-light: null !default; $mbsc-calendar-text-dark: null !default; $mbsc-calendar-accent-light: null !default; $mbsc-calendar-accent-dark: null !default; $mbsc-calendar-border-light: null !default; $mbsc-calendar-border-dark: null !default; $mbsc-calendar-mark-light: null !default; $mbsc-calendar-mark-dark: null !default; $mbsc-calendar-event-light: null !default; $mbsc-calendar-event-dark: null !default; @function get-contrast-color($color) { @if (lightness($color) > 67%) { @return #000; } @else { @return #fff; } } $mbsc-mobiscroll-accent: #2b93e6 !default; $mbsc-mobiscroll-background: #ffffff !default; $mbsc-mobiscroll-text: #454545 !default; $mbsc-mobiscroll-dark-accent: #2b93e6 !default; $mbsc-mobiscroll-dark-background: #000 !default; $mbsc-mobiscroll-dark-text: #ffffff !default; /* Base colors */ $mbsc-mobiscroll-primary: #3f97f6 !default; $mbsc-mobiscroll-secondary: #90979E !default; $mbsc-mobiscroll-success: #43BE5F !default; $mbsc-mobiscroll-danger: #f5504e !default; $mbsc-mobiscroll-warning: #f8b042 !default; $mbsc-mobiscroll-info: #5BB7C5 !default; $mbsc-mobiscroll-light: darken(#fff, 10%) !default; $mbsc-mobiscroll-dark: #47494A !default; $mbsc-mobiscroll-error: #de3226; /* Form colors */ $mbsc-mobiscroll-form-background: $mbsc-form-background-light !default; $mbsc-mobiscroll-dark-form-background: $mbsc-form-background-dark !default; $mbsc-mobiscroll-form-accent: $mbsc-form-accent-light !default; $mbsc-mobiscroll-dark-form-accent: $mbsc-form-accent-dark !default; $mbsc-mobiscroll-form-text: $mbsc-form-text-light !default; $mbsc-mobiscroll-dark-form-text: $mbsc-form-text-dark !default; $mbsc-mobiscroll-form-error: $mbsc-form-error-light !default; $mbsc-mobiscroll-dark-form-error: $mbsc-form-error-dark !default; $mbsc-mobiscroll-colors: ( // Colors map 'background': $mbsc-mobiscroll-background, 'text': $mbsc-mobiscroll-text, 'accent': $mbsc-mobiscroll-accent, 'form-background': $mbsc-mobiscroll-form-background, 'form-accent': $mbsc-mobiscroll-form-accent, 'form-text': $mbsc-mobiscroll-form-text, 'form-error': $mbsc-mobiscroll-form-error, ); $mbsc-mobiscroll-dark-colors: ( // Colors map 'background': $mbsc-mobiscroll-dark-background, 'text': $mbsc-mobiscroll-dark-text, 'accent': $mbsc-mobiscroll-dark-accent, 'form-background': $mbsc-mobiscroll-dark-form-background, 'form-accent': $mbsc-mobiscroll-dark-form-accent, 'form-text': $mbsc-mobiscroll-dark-form-text, 'form-error': $mbsc-mobiscroll-dark-form-error, ); @function mbsc-mobiscroll-colors($params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); @return (); } $mbsc-mobiscroll-button-color: $mbsc-button-color-light !default; $mbsc-mobiscroll-button-text: $mbsc-button-text-light !default; $mbsc-mobiscroll-dark-button-color: $mbsc-button-color-dark !default; $mbsc-mobiscroll-dark-button-text: $mbsc-button-text-dark !default; $mbsc-mobiscroll-colors: map-merge($mbsc-mobiscroll-colors, ('button-color': $mbsc-mobiscroll-button-color, 'button-text': $mbsc-mobiscroll-button-text, )); $mbsc-mobiscroll-dark-colors: map-merge($mbsc-mobiscroll-dark-colors, ('button-color': $mbsc-mobiscroll-dark-button-color, 'button-text': $mbsc-mobiscroll-dark-button-text, )); @mixin mbsc-mobiscroll-button($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $button-background-param: map-get($params, 'button-color'); $button-text-param: map-get($params, 'button-text'); $btn-background: if($button-background-param, $button-background-param, $accent); $btn-text-base: if($button-background-param, $button-background-param, $background); $btn-text: ''; @if (lightness($btn-text-base) > 50%) { $btn-text: darken($btn-text-base, 3%); } @else { $btn-text: $btn-text-base; } $btn-text: if($button-text-param, $button-text-param, $btn-text); .mbsc-#{$theme} { &.mbsc-button-standard { background: $btn-background; color: $btn-text; } /* Flat buttons */ &.mbsc-button-flat { color: $btn-background; &.mbsc-hover { background: rgba($btn-background, .2); } &.mbsc-active { background: rgba($btn-background, .3); } } /* Outline buttons */ &.mbsc-button-outline { border: 1px solid $btn-background; color: $btn-background; &.mbsc-active { background: $btn-background; color: $background; } } &.mbsc-button.mbsc-focus { // background: rgba($accent, .3); box-shadow: 0 0 0 2px rgba($text, .5); } /* Predefined colors */ &.mbsc-button-primary.mbsc-button-standard { background: $mbsc-mobiscroll-primary; color: $background; } &.mbsc-button-secondary.mbsc-button-standard { background: $mbsc-mobiscroll-secondary; color: $background; } &.mbsc-button-success.mbsc-button-standard { background: $mbsc-mobiscroll-success; color: $background; } &.mbsc-button-danger.mbsc-button-standard { background: $mbsc-mobiscroll-danger; color: $background; } &.mbsc-button-warning.mbsc-button-standard { background: $mbsc-mobiscroll-warning; color: $background; } &.mbsc-button-info.mbsc-button-standard { background: $mbsc-mobiscroll-info; color: $background; } &.mbsc-button-dark.mbsc-button-standard { background: $mbsc-mobiscroll-dark; color: $background; } &.mbsc-button-light.mbsc-button-standard { background: $mbsc-mobiscroll-light; color: $text; } &.mbsc-button-primary.mbsc-button-flat { color: $mbsc-mobiscroll-primary; &.mbsc-hover { background: rgba($mbsc-mobiscroll-primary, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-primary, .3); } } &.mbsc-button-secondary.mbsc-button-flat { color: $mbsc-mobiscroll-secondary; &.mbsc-hover { background: rgba($mbsc-mobiscroll-secondary, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-secondary, .3); } } &.mbsc-button-success.mbsc-button-flat { color: $mbsc-mobiscroll-success; &.mbsc-hover { background: rgba($mbsc-mobiscroll-success, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-success, .3); } } &.mbsc-button-danger.mbsc-button-flat { color: $mbsc-mobiscroll-danger; &.mbsc-hover { background: rgba($mbsc-mobiscroll-danger, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-danger, .3); } } &.mbsc-button-warning.mbsc-button-flat { color: $mbsc-mobiscroll-warning; &.mbsc-hover { background: rgba($mbsc-mobiscroll-warning, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-warning, .3); } } &.mbsc-button-info.mbsc-button-flat { color: $mbsc-mobiscroll-info; &.mbsc-hover { background: rgba($mbsc-mobiscroll-info, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-info, .3); } } &.mbsc-button-dark.mbsc-button-flat { color: $mbsc-mobiscroll-dark; &.mbsc-hover { background: rgba($mbsc-mobiscroll-dark, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-dark, .3); } } &.mbsc-button-light.mbsc-button-flat { color: darken($mbsc-mobiscroll-light, 20%); &.mbsc-hover { background: rgba($mbsc-mobiscroll-light, .2); } &.mbsc-active { background: rgba($mbsc-mobiscroll-light, .3); } } &.mbsc-button-primary.mbsc-button-outline { border-color: $mbsc-mobiscroll-primary; color: $mbsc-mobiscroll-primary; &.mbsc-active { background: $mbsc-mobiscroll-primary; color: $background; } } &.mbsc-button-secondary.mbsc-button-outline { border-color: $mbsc-mobiscroll-secondary; color: $mbsc-mobiscroll-secondary; &.mbsc-active { background: $mbsc-mobiscroll-secondary; color: $background; } } &.mbsc-button-success.mbsc-button-outline { border-color: $mbsc-mobiscroll-success; color: $mbsc-mobiscroll-success; &.mbsc-active { background: $mbsc-mobiscroll-success; color: $background; } } &.mbsc-button-danger.mbsc-button-outline { border-color: $mbsc-mobiscroll-danger; color: $mbsc-mobiscroll-danger; &.mbsc-active { background: $mbsc-mobiscroll-danger; color: $background; } } &.mbsc-button-warning.mbsc-button-outline { border-color: $mbsc-mobiscroll-warning; color: $mbsc-mobiscroll-warning; &.mbsc-active { background: $mbsc-mobiscroll-warning; color: $background; } } &.mbsc-button-info.mbsc-button-outline { border-color: $mbsc-mobiscroll-info; color: $mbsc-mobiscroll-info; &.mbsc-active { background: $mbsc-mobiscroll-info; color: $background; } } &.mbsc-button-dark.mbsc-button-outline { border-color: $mbsc-mobiscroll-dark; color: $mbsc-mobiscroll-dark; &.mbsc-active { background: $mbsc-mobiscroll-dark; color: $background; } } &.mbsc-button-light.mbsc-button-outline { border-color: darken($mbsc-mobiscroll-light, 20%); color: darken($mbsc-mobiscroll-light, 20%); &.mbsc-active { background: darken($mbsc-mobiscroll-light, 20%); color: $background; } } } } @if ($mbsc-mobiscroll-theme) { .mbsc-mobiscroll { &.mbsc-icon-button { border-radius: 4em; } &.mbsc-button { font-size: 1em; margin: .5em; padding: .25em .625em; line-height: 1.75em; border-radius: .25em; text-transform: uppercase; transition: background-color .2s ease-out; color: inherit; } &.mbsc-button-standard { &.mbsc-hover { opacity: .8; } &.mbsc-active { opacity: .6; } } &.mbsc-button-outline { &.mbsc-hover { opacity: .8; } &.mbsc-active { opacity: 1; } } &.mbsc-button:disabled, &.mbsc-button.mbsc-disabled { opacity: .3; } &.mbsc-ltr { &.mbsc-button-icon-start { padding-right: .625em; } &.mbsc-button-icon-end { padding-left: .625em; } } &.mbsc-rtl { &.mbsc-button-icon-start { padding-left: .625em; } &.mbsc-button-icon-end { padding-right: .625em; } } .mbsc-button-group, .mbsc-button-group-justified { margin: .5em; } .mbsc-button-group-block { margin: .5em 1em; } } @include mbsc-mobiscroll-button('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-button('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } $mbsc-ios-accent: #007aff !default; $mbsc-ios-background: #f7f7f7 !default; $mbsc-ios-text: #000000 !default; $mbsc-ios-dark-accent: #ff9f0a !default; $mbsc-ios-dark-background: #000000 !default; $mbsc-ios-dark-text: #ffffff !default; /* Base colors */ $mbsc-ios-primary: #3f97f6 !default; $mbsc-ios-secondary: #90979E !default; $mbsc-ios-success: #43BE5F !default; $mbsc-ios-danger: #f5504e !default; $mbsc-ios-warning: #f8b042 !default; $mbsc-ios-info: #5BB7C5 !default; $mbsc-ios-light: #fff !default; $mbsc-ios-dark: #47494A !default; $mbsc-ios-error: #d8332a; /* Form colors */ $mbsc-ios-form-background: $mbsc-form-background-light !default; $mbsc-ios-dark-form-background: $mbsc-form-background-dark !default; $mbsc-ios-form-text: $mbsc-form-text-light !default; $mbsc-ios-dark-form-text: $mbsc-form-text-dark !default; $mbsc-ios-form-accent: $mbsc-form-accent-light !default; $mbsc-ios-dark-form-accent: $mbsc-form-accent-dark !default; $mbsc-ios-form-error: $mbsc-form-error-light !default; $mbsc-ios-dark-form-error: $mbsc-form-error-dark !default; /* Calendar colors (will be used by eventcalendar, calendar, range) */ $mbsc-ios-calendar-background: $mbsc-calendar-background-light !default; $mbsc-ios-calendar-text: $mbsc-calendar-text-light !default; $mbsc-ios-calendar-accent: $mbsc-calendar-accent-light !default; $mbsc-ios-calendar-border: $mbsc-calendar-border-light !default; $mbsc-ios-calendar-mark: $mbsc-calendar-mark-light !default; $mbsc-ios-calendar-event: $mbsc-calendar-event-light !default; $mbsc-ios-dark-calendar-background: $mbsc-calendar-background-dark !default; $mbsc-ios-dark-calendar-text: $mbsc-calendar-text-dark !default; $mbsc-ios-dark-calendar-accent: $mbsc-calendar-accent-dark !default; $mbsc-ios-dark-calendar-border: $mbsc-calendar-border-dark !default; $mbsc-ios-dark-calendar-mark: $mbsc-calendar-mark-dark !default; $mbsc-ios-dark-calendar-event: $mbsc-calendar-event-dark !default; $mbsc-ios-colors: ( // Colors map 'background': $mbsc-ios-background, 'text': $mbsc-ios-text, 'accent': $mbsc-ios-accent, 'calendar-background': $mbsc-ios-calendar-background, 'calendar-text': $mbsc-ios-calendar-text, 'calendar-accent': $mbsc-ios-calendar-accent, 'calendar-border': $mbsc-ios-calendar-border, 'calendar-mark': $mbsc-ios-calendar-mark, 'calendar-event': $mbsc-ios-calendar-event, 'form-background': $mbsc-ios-form-background, 'form-text': $mbsc-ios-form-text, 'form-accent': $mbsc-ios-form-accent, 'form-error': $mbsc-ios-form-error, ); $mbsc-ios-dark-colors: ( // Colors map 'background': $mbsc-ios-dark-background, 'text': $mbsc-ios-dark-text, 'accent': $mbsc-ios-dark-accent, 'calendar-background': $mbsc-ios-dark-calendar-background, 'calendar-text': $mbsc-ios-dark-calendar-text, 'calendar-accent': $mbsc-ios-dark-calendar-accent, 'calendar-border': $mbsc-ios-dark-calendar-border, 'calendar-mark': $mbsc-ios-dark-calendar-mark, 'calendar-event': $mbsc-ios-dark-calendar-event, 'form-background': $mbsc-ios-dark-form-background, 'form-text': $mbsc-ios-dark-form-text, 'form-accent': $mbsc-ios-dark-form-accent, 'form-error': $mbsc-ios-dark-form-error, ); @function mbsc-ios-colors($params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-limited: hsl(hue($background), saturation($background), max(lightness($background), 3%)); $background-alt: lighten($background, 6%); $border-color: ''; @if (lightness($background) > 50%) { $border-color: darken($background-limited, 17%); } @else { $border-color: lighten($background, 20%); } @return ( // General colors 'background-alt': $background-alt, 'background-limited': $background-limited, 'border-color': $border-color, ); } $mbsc-ios-button-color: $mbsc-button-color-light !default; $mbsc-ios-button-text: $mbsc-button-text-light !default; $mbsc-ios-dark-button-color: $mbsc-button-color-dark !default; $mbsc-ios-dark-button-text: $mbsc-button-text-dark !default; $mbsc-ios-colors: map-merge($mbsc-ios-colors, ('button-color': $mbsc-ios-button-color, 'button-text': $mbsc-ios-button-text, )); $mbsc-ios-dark-colors: map-merge($mbsc-ios-dark-colors, ('button-color': $mbsc-ios-dark-button-color, 'button-text': $mbsc-ios-dark-button-text, )); @mixin mbsc-ios-button($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $button-background-param: map-get($params, 'button-color'); $button-text-param: map-get($params, 'button-text'); $white: #fff; $black: #000; $button-background: ''; $background-contrast: ''; @if(lightness($background) > 50%) { $button-background: lighten($background, 10%); $background-contrast: #000; } @else { $button-background: lighten($background, 23%); $background-contrast: #fff; } $button-background: if($button-background-param, $button-background-param, $button-background); $button-text: if($button-text-param, $button-text-param, $accent); $form-background: $background; // The $form-background is used for the active text color of outlined buttons. // Until we'll have the form component specify this, we'll default to the $background. // @if($button-background-param) { // @if(lightness($button-background-param) > 50%) { // $form-background: adjust-hue(darken(saturate($button-background-param, 19%), 12%), 240deg); // } // @else { // $form-background: adjust-hue(lighten(desaturate($button-background-param, 19%), 10%), 240deg); // } // } // @else { // @if(lightness($background) > 50%) { // $form-background: adjust-hue(darken(saturate($background, 19%), 2%), 240deg); // } // @else { // $form-background: adjust-hue(lighten(desaturate($background, 19%), 10%), 240deg); // } // } $form-selection: ''; // Light button @if (lightness($accent) > 50%) { $form-selection: lighten(saturate($accent, 15%), 3%); } // Dark button @else { $form-selection: darken(desaturate($accent, 15%), 3%); } $form-selection: if($button-background-param, $button-background-param, $form-selection); $flat-color: if($button-background-param, $button-background-param, $accent); .mbsc-#{$theme} { &.mbsc-button-standard { background: $button-background; color: $button-text; } // &.mbsc-button:disabled { // background: $disabled-background; // color: $disabled-color; // } /* Flat buttons */ &.mbsc-button-flat { color: $flat-color; } /* Outline buttons */ &.mbsc-button-outline { border: 1px solid $form-selection; color: $form-selection; &.mbsc-active { background: $form-selection; color: $background; } } &.mbsc-button.mbsc-focus { background: rgba($background-contrast, .05); // box-shadow: 0 0 0 2px rgba($text, .3); } /* Predefined colors */ &.mbsc-button-primary.mbsc-button-standard { background: $mbsc-ios-primary; color: $white; } &.mbsc-button-secondary.mbsc-button-standard { background: $mbsc-ios-secondary; color: $white; } &.mbsc-button-success.mbsc-button-standard { background: $mbsc-ios-success; color: $white; } &.mbsc-button-danger.mbsc-button-standard { background: $mbsc-ios-danger; color: $white; } &.mbsc-button-warning.mbsc-button-standard { background: $mbsc-ios-warning; color: $white; } &.mbsc-button-info.mbsc-button-standard { background: $mbsc-ios-info; color: $white; } &.mbsc-button-dark.mbsc-button-standard { background: $mbsc-ios-dark; color: $white; } &.mbsc-button-light.mbsc-button-standard { background: $mbsc-ios-light; color: $black; } &.mbsc-button-primary.mbsc-button-flat { color: $mbsc-ios-primary; } &.mbsc-button-secondary.mbsc-button-flat { color: $mbsc-ios-secondary; } &.mbsc-button-success.mbsc-button-flat { color: $mbsc-ios-success; } &.mbsc-button-danger.mbsc-button-flat { color: $mbsc-ios-danger; } &.mbsc-button-warning.mbsc-button-flat { color: $mbsc-ios-warning; } &.mbsc-button-info.mbsc-button-flat { color: $mbsc-ios-info; } &.mbsc-button-dark.mbsc-button-flat { color: $mbsc-ios-dark; } &.mbsc-button-light.mbsc-button-flat { color: darken($mbsc-ios-light, 20%); } &.mbsc-button-primary.mbsc-button-outline { border-color: $mbsc-ios-primary; color: $mbsc-ios-primary; &.mbsc-active { background: $mbsc-ios-primary; color: $mbsc-ios-light; } } &.mbsc-button-secondary.mbsc-button-outline { border-color: $mbsc-ios-secondary; color: $mbsc-ios-secondary; &.mbsc-active { background: $mbsc-ios-secondary; color: $mbsc-ios-light; } } &.mbsc-button-success.mbsc-button-outline { border-color: $mbsc-ios-success; color: $mbsc-ios-success; &.mbsc-active { background: $mbsc-ios-success; color: $mbsc-ios-light; } } &.mbsc-button-danger.mbsc-button-outline { border-color: $mbsc-ios-danger; color: $mbsc-ios-danger; &.mbsc-active { background: $mbsc-ios-danger; color: $mbsc-ios-light; } } &.mbsc-button-warning.mbsc-button-outline { border-color: $mbsc-ios-warning; color: $mbsc-ios-warning; &.mbsc-active { background: $mbsc-ios-warning; color: $mbsc-ios-light; } } &.mbsc-button-info.mbsc-button-outline { border-color: $mbsc-ios-info; color: $mbsc-ios-info; &.mbsc-active { background: $mbsc-ios-info; color: $mbsc-ios-light; } } &.mbsc-button-dark.mbsc-button-outline { border-color: $mbsc-ios-dark; color: $mbsc-ios-dark; &.mbsc-active { background: $mbsc-ios-dark; color: $mbsc-ios-light; } } &.mbsc-button-light.mbsc-button-outline { border-color: darken($mbsc-ios-light, 25%); color: darken($mbsc-ios-light, 25%); &.mbsc-active { background: darken($mbsc-ios-light, 25%); color: $mbsc-ios-light; } } } } @if ($mbsc-ios-theme and $mbsc-button) { .mbsc-ios { &.mbsc-button { padding: 0 .5em; margin: .5em .25em; line-height: 2.25em; border-radius: .25em; transition: opacity .1s ease-out, background-color .1s ease-out; } &.mbsc-icon-button { padding: .5em; line-height: normal; border-radius: 4em; } &.mbsc-button.mbsc-hover { opacity: .7; } &.mbsc-button.mbsc-active { opacity: .5; } &.mbsc-button:disabled, &.mbsc-button.mbsc-disabled { opacity: .2; } &.mbsc-button-outline.mbsc-active { opacity: 1; } &.mbsc-ltr { &.mbsc-button-icon-start { padding-right: .375em; } &.mbsc-button-icon-end { padding-left: .375em; } } &.mbsc-rtl { &.mbsc-button-icon-start { padding-left: .375em; } &.mbsc-button-icon-end { padding-right: .375em; } } .mbsc-button-group, .mbsc-button-group-justified, .mbsc-button-group-block { margin: .5em .75em; } .mbsc-button-group-block { margin: .5em 1em; } } @include mbsc-ios-button('ios', $mbsc-ios-colors); @include mbsc-ios-button('ios-dark', $mbsc-ios-dark-colors); } $mbsc-material-accent: #1a73e8 !default; $mbsc-material-background: #fff !default; $mbsc-material-text: #303030 !default; $mbsc-material-dark-accent: #87b0f3 !default; $mbsc-material-dark-background: #000 !default; $mbsc-material-dark-text: #fff !default; /* Base colors */ $mbsc-material-primary: #3f97f6 !default; $mbsc-material-secondary: #90979E !default; $mbsc-material-success: #43BE5F !default; $mbsc-material-danger: #f5504e !default; $mbsc-material-warning: #f8b042 !default; $mbsc-material-info: #5BB7C5 !default; $mbsc-material-light: #fff !default; $mbsc-material-dark: #47494A !default; $mbsc-material-error: #de3226; /* Form colors */ $mbsc-material-form-background: $mbsc-form-background-light !default; $mbsc-material-dark-form-background: $mbsc-form-background-dark !default; $mbsc-material-form-text: $mbsc-form-text-light !default; $mbsc-material-dark-form-text: $mbsc-form-text-dark !default; $mbsc-material-form-accent: $mbsc-form-accent-light !default; $mbsc-material-dark-form-accent: $mbsc-form-accent-dark !default; $mbsc-material-form-error: $mbsc-form-error-light !default; $mbsc-material-dark-form-error: $mbsc-form-error-dark !default; /* Calendar colors (will be used by eventcalendar, calendar, range) */ $mbsc-material-calendar-background: $mbsc-calendar-background-light !default; $mbsc-material-calendar-text: $mbsc-calendar-text-light !default; $mbsc-material-calendar-accent: $mbsc-calendar-accent-light !default; $mbsc-material-calendar-border: $mbsc-calendar-border-light !default; $mbsc-material-calendar-mark: $mbsc-calendar-mark-light !default; $mbsc-material-calendar-event: $mbsc-calendar-event-light !default; $mbsc-material-dark-calendar-background: $mbsc-calendar-background-dark !default; $mbsc-material-dark-calendar-text: $mbsc-calendar-text-dark !default; $mbsc-material-dark-calendar-accent: $mbsc-calendar-accent-dark !default; $mbsc-material-dark-calendar-border: $mbsc-calendar-border-dark !default; $mbsc-material-dark-calendar-mark: $mbsc-calendar-mark-dark !default; $mbsc-material-dark-calendar-event: $mbsc-calendar-event-dark !default; $mbsc-material-colors: ( // Colors map 'background': $mbsc-material-background, 'text': $mbsc-material-text, 'accent': $mbsc-material-accent, 'calendar-background': $mbsc-material-calendar-background, 'calendar-text': $mbsc-material-calendar-text, 'calendar-accent': $mbsc-material-calendar-accent, 'calendar-border': $mbsc-material-calendar-border, 'calendar-mark': $mbsc-material-calendar-mark, 'calendar-event': $mbsc-material-calendar-event, 'form-background': $mbsc-material-form-background, 'form-text': $mbsc-material-form-text, 'form-accent': $mbsc-material-form-accent, 'form-error': $mbsc-material-form-error, ); $mbsc-material-dark-colors: ( // Colors map 'background': $mbsc-material-dark-background, 'text': $mbsc-material-dark-text, 'accent': $mbsc-material-dark-accent, 'calendar-background': $mbsc-material-dark-calendar-background, 'calendar-text': $mbsc-material-dark-calendar-text, 'calendar-accent': $mbsc-material-dark-calendar-accent, 'calendar-border': $mbsc-material-dark-calendar-border, 'calendar-mark': $mbsc-material-dark-calendar-mark, 'calendar-event': $mbsc-material-dark-calendar-event, 'form-background': $mbsc-material-dark-form-background, 'form-text': $mbsc-material-dark-form-text, 'form-accent': $mbsc-material-dark-form-accent, 'form-error': $mbsc-material-dark-form-error, ); @function mbsc-material-colors($params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); @return (); } $mbsc-material-button-color: $mbsc-button-color-light !default; $mbsc-material-button-text: $mbsc-button-text-light !default; $mbsc-material-dark-button-color: $mbsc-button-color-dark !default; $mbsc-material-dark-button-text: $mbsc-button-text-dark !default; $mbsc-material-colors: map-merge($mbsc-material-colors, ('button-color': $mbsc-material-button-color, 'button-text': $mbsc-material-button-text, )); $mbsc-material-dark-colors: map-merge($mbsc-material-dark-colors, ('button-color': $mbsc-material-dark-button-color, 'button-text': $mbsc-material-dark-button-text, )); @mixin mbsc-material-button($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $button-background-param: map-get($params, 'button-color'); $button-text-param: map-get($params, 'button-text'); $button-active: darken($background, 13%); $button-text: ''; $button-background: ''; @if (lightness($background) > 50%) { $button-text: darken($text, 36%); $button-background: darken($background, 19%); } @else { $button-text: lighten($text, 24%); $button-background: lighten($background, 17%); } $button-background: if($button-background-param, $button-background-param, $button-background); $button-text: if($button-text-param, $button-text-param, $button-text); $flatout-color: if($button-background-param, $button-background, $button-text); .mbsc-#{$theme} { &.mbsc-button-standard { background: $button-background; color: $button-text; box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); &.mbsc-hover { box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); } &.mbsc-focus, &.mbsc-active { box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); } } /* Flat buttons */ &.mbsc-button-flat, &.mbsc-button-outline { color: $flatout-color; &.mbsc-hover, &.mbsc-active { background: rgba($flatout-color, .2); } &.mbsc-focus { background: rgba($flatout-color, .3); } } /* Outline buttons */ &.mbsc-button-outline { border-color: $flatout-color; } /* Predefined colors */ &.mbsc-button-primary.mbsc-button-standard { background: $mbsc-material-primary; color: $background; } &.mbsc-button-secondary.mbsc-button-standard { background: $mbsc-material-secondary; color: $background; } &.mbsc-button-success.mbsc-button-standard { background: $mbsc-material-success; color: $background; } &.mbsc-button-danger.mbsc-button-standard { background: $mbsc-material-danger; color: $background; } &.mbsc-button-warning.mbsc-button-standard { background: $mbsc-material-warning; color: $background; } &.mbsc-button-info.mbsc-button-standard { background: $mbsc-material-info; color: $background; } &.mbsc-button-dark.mbsc-button-standard { background: $mbsc-material-dark; color: $background; } &.mbsc-button-light.mbsc-button-standard { background: $mbsc-material-light; color: $text; } &.mbsc-button-primary.mbsc-button-flat { color: $mbsc-material-primary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-primary, .2); } &.mbsc-focus { background: rgba($mbsc-material-primary, .3); } } &.mbsc-button-secondary.mbsc-button-flat { color: $mbsc-material-secondary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-secondary, .2); } &.mbsc-focus { background: rgba($mbsc-material-secondary, .3); } } &.mbsc-button-success.mbsc-button-flat { color: $mbsc-material-success; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-success, .2); } &.mbsc-focus { background: rgba($mbsc-material-success, .3); } } &.mbsc-button-danger.mbsc-button-flat { color: $mbsc-material-danger; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-danger, .2); } &.mbsc-focus { background: rgba($mbsc-material-danger, .3); } } &.mbsc-button-warning.mbsc-button-flat { color: $mbsc-material-warning; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-warning, .2); } &.mbsc-focus { background: rgba($mbsc-material-warning, .3); } } &.mbsc-button-info.mbsc-button-flat { color: $mbsc-material-info; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-info, .2); } &.mbsc-focus { background: rgba($mbsc-material-info, .3); } } &.mbsc-button-dark.mbsc-button-flat { color: $mbsc-material-dark; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-dark, .2); } &.mbsc-focus { background: rgba($mbsc-material-dark, .3); } } &.mbsc-button-light.mbsc-button-flat { color: darken($mbsc-material-light, 20%); &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-light, .2); } &.mbsc-focus { background: rgba($mbsc-material-light, .3); } } &.mbsc-button-primary.mbsc-button-outline { border-color: $mbsc-material-primary; color: $mbsc-material-primary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-primary, .2); } &.mbsc-focus { background: rgba($mbsc-material-primary, .3); } } &.mbsc-button-secondary.mbsc-button-outline { border-color: $mbsc-material-secondary; color: $mbsc-material-secondary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-secondary, .2); } &.mbsc-focus { background: rgba($mbsc-material-secondary, .3); } } &.mbsc-button-success.mbsc-button-outline { border-color: $mbsc-material-success; color: $mbsc-material-success; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-success, .2); } &.mbsc-focus { background: rgba($mbsc-material-success, .3); } } &.mbsc-button-danger.mbsc-button-outline { border-color: $mbsc-material-danger; color: $mbsc-material-danger; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-danger, .2); } &.mbsc-focus { background: rgba($mbsc-material-danger, .3); } } &.mbsc-button-warning.mbsc-button-outline { border-color: $mbsc-material-warning; color: $mbsc-material-warning; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-warning, .2); } &.mbsc-focus { background: rgba($mbsc-material-warning, .3); } } &.mbsc-button-info.mbsc-button-outline { border-color: $mbsc-material-info; color: $mbsc-material-info; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-info, .2); } &.mbsc-focus { background: rgba($mbsc-material-info, .3); } } &.mbsc-button-dark.mbsc-button-outline { border-color: $mbsc-material-dark; color: $mbsc-material-dark; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-dark, .2); } &.mbsc-focus { background: rgba($mbsc-material-dark, .3); } } &.mbsc-button-light.mbsc-button-outline { border-color: darken($mbsc-material-light, 20%); color: darken($mbsc-material-light, 20%); &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-light, .2); } &.mbsc-focus { background: rgba($mbsc-material-light, .3); } } } } @if ($mbsc-material-theme and $mbsc-button) { .mbsc-material { &.mbsc-button { min-width: 4.571429em; padding: .428572em 1.142858em; border-radius: .285715em; font-size: .875em; font-weight: 600; text-transform: uppercase; line-height: 1.714286em; transition: box-shadow .2s ease-out, background-color .2s ease-out; margin: .5em; color: inherit; } &.mbsc-button-outline { border: 1px solid; } &.mbsc-button .mbsc-icon { font-size: 1.142858em; } &.mbsc-icon-button { min-width: 0; padding: .5em; border-radius: 2em; font-size: 1em; line-height: normal; } &.mbsc-icon-button .mbsc-icon { width: 1.5em; height: 1.5em; font-size: 1em; } &.mbsc-button:disabled, &.mbsc-button.mbsc-disabled { opacity: .3; } &.mbsc-ltr { &.mbsc-button-icon-start { padding-right: .5em; margin-left: -.25em; } &.mbsc-button-icon-end { padding-left: .5em; margin-right: -.25em; } } &.mbsc-rtl { &.mbsc-button-icon-start { padding-left: .5em; margin-right: -.25em; } &.mbsc-button-icon-end { padding-right: .5em; margin-left: -.25em; } } .mbsc-button-group, .mbsc-button-group-justified { margin: .5em; } .mbsc-button-group-block { margin: .5em 1em; } } @include mbsc-material-button('material', $mbsc-material-colors); @include mbsc-material-button('material-dark', $mbsc-material-dark-colors); } $mbsc-windows-accent: #0078d7 !default; $mbsc-windows-background: #ffffff !default; $mbsc-windows-text: #333333 !default; $mbsc-windows-dark-accent: #0078d7 !default; $mbsc-windows-dark-background: #1a1a1a !default; $mbsc-windows-dark-text: #ffffff !default; /* Base colors */ $mbsc-windows-primary: #3f97f6 !default; $mbsc-windows-secondary: #90979E !default; $mbsc-windows-success: #43BE5F !default; $mbsc-windows-danger: #f5504e !default; $mbsc-windows-warning: #f8b042 !default; $mbsc-windows-info: #5BB7C5 !default; $mbsc-windows-light: #fff !default; $mbsc-windows-dark: #47494A !default; $mbsc-windows-error: #a4262c; /* Form colors */ $mbsc-windows-form-background: $mbsc-form-background-light !default; $mbsc-windows-dark-form-background: $mbsc-form-background-dark !default; $mbsc-windows-form-text: $mbsc-form-text-light !default; $mbsc-windows-dark-form-text: $mbsc-form-text-dark !default; $mbsc-windows-form-accent: $mbsc-form-accent-light !default; $mbsc-windows-dark-form-accent: $mbsc-form-accent-dark !default; $mbsc-windows-form-error: $mbsc-form-error-light !default; $mbsc-windows-dark-form-error: $mbsc-form-error-dark !default; /* Calendar colors (will be used by eventcalendar, calendar, range) */ $mbsc-windows-calendar-background: $mbsc-calendar-background-light !default; $mbsc-windows-calendar-text: $mbsc-calendar-text-light !default; $mbsc-windows-calendar-accent: $mbsc-calendar-accent-light !default; $mbsc-windows-calendar-border: $mbsc-calendar-border-light !default; $mbsc-windows-calendar-mark: $mbsc-calendar-mark-light !default; $mbsc-windows-calendar-event: $mbsc-calendar-event-light !default; $mbsc-windows-dark-calendar-background: $mbsc-calendar-background-dark !default; $mbsc-windows-dark-calendar-text: $mbsc-calendar-text-dark !default; $mbsc-windows-dark-calendar-accent: $mbsc-calendar-accent-dark !default; $mbsc-windows-dark-calendar-border: $mbsc-calendar-border-dark !default; $mbsc-windows-dark-calendar-mark: $mbsc-calendar-mark-dark !default; $mbsc-windows-dark-calendar-event: $mbsc-calendar-event-dark !default; $mbsc-windows-colors: ( // Colors map 'background': $mbsc-windows-background, 'text': $mbsc-windows-text, 'accent': $mbsc-windows-accent, 'calendar-background': $mbsc-windows-calendar-background, 'calendar-text': $mbsc-windows-calendar-text, 'calendar-accent': $mbsc-windows-calendar-accent, 'calendar-border': $mbsc-windows-calendar-border, 'calendar-mark': $mbsc-windows-calendar-mark, 'calendar-event': $mbsc-windows-calendar-event, 'form-background': $mbsc-windows-form-background, 'form-text': $mbsc-windows-form-text, 'form-accent': $mbsc-windows-form-accent, 'form-error': $mbsc-windows-form-error, ); $mbsc-windows-dark-colors: ( // Colors map 'background': $mbsc-windows-dark-background, 'text': $mbsc-windows-dark-text, 'accent': $mbsc-windows-dark-accent, 'calendar-background': $mbsc-windows-dark-calendar-background, 'calendar-text': $mbsc-windows-dark-calendar-text, 'calendar-accent': $mbsc-windows-dark-calendar-accent, 'calendar-border': $mbsc-windows-dark-calendar-border, 'calendar-mark': $mbsc-windows-dark-calendar-mark, 'calendar-event': $mbsc-windows-dark-calendar-event, 'form-background': $mbsc-windows-dark-form-background, 'form-text': $mbsc-windows-dark-form-text, 'form-accent': $mbsc-windows-dark-form-accent, 'form-error': $mbsc-windows-dark-form-error, ); @function mbsc-windows-colors($params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); @return (); } $mbsc-windows-button-color: $mbsc-button-color-light !default; $mbsc-windows-button-text: $mbsc-button-text-light !default; $mbsc-windows-dark-button-color: $mbsc-button-color-dark !default; $mbsc-windows-dark-button-text: $mbsc-button-text-dark !default; $mbsc-windows-colors: map-merge($mbsc-windows-colors, ('button-color': $mbsc-windows-button-color, 'button-text': $mbsc-windows-button-text, )); $mbsc-windows-dark-colors: map-merge($mbsc-windows-dark-colors, ('button-color': $mbsc-windows-dark-button-color, 'button-text': $mbsc-windows-dark-button-text, )); @mixin mbsc-windows-button($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $button-background-param: map-get($params, 'button-color'); $button-text-param: map-get($params, 'button-text'); $button-text: if($button-text-param, $button-text-param, $text); $button-bg: ''; $hover: ''; $button-border: ''; $button-border-hover: ''; $dark-text: darken($mbsc-windows-dark, 30%); @if (lightness($background) > 50%) { $button-bg: darken($background, 20%); $hover: lighten($button-text, 70%); $button-border: darken($background, 40%); $button-border-hover: darken($background, 50%); } @else { $button-bg: lighten($background, 15%); $hover: darken($button-text, 70%); $button-border: lighten($background, 35%); $button-border-hover: lighten($background, 45%); } $button-bg: if($button-background-param, $button-background-param, $button-bg); @if($button-background-param) { $button-border: $button-background-param; @if (lightness($button-background-param) > 50%) { $button-border-hover: darken($button-border, 10%); } @else { $button-border-hover: lighten($button-border, 10%); } } $active-base: if($button-background-param, $button-background-param, $background); $button-active: ''; @if (lightness($active-base) > 50%) { $button-active: lighten($button-text, 28%); } @else { $button-active: darken($button-text, 33%); } $flat-color: if($button-background-param, $button-bg, $button-text); $flat-active: if($button-background-param, $button-text, $button-bg); .mbsc-#{$theme} { &.mbsc-button-standard { background: $button-bg; border-color: $button-bg; color: $button-text; &.mbsc-hover { border-color: $button-active; } &.mbsc-active { border-color: $button-active; background: $button-active; } } /* Flat buttons */ &.mbsc-button-flat { color: $flat-color; &.mbsc-active { background: lighten($button-bg, 15%); border-color: lighten($button-bg, 15%); color: $button-text; } } /* Outline buttons */ &.mbsc-button-outline { border: 0.125em solid $button-border; color: $button-border; &.mbsc-hover { border-color: $button-border-hover; } &.mbsc-active { border-color: $button-border-hover; background: $button-border-hover; color: get-contrast-color($button-border-hover); } } &.mbsc-button.mbsc-focus { // background: rgba($accent, .3); box-shadow: 0 0 0 1px $button-text; } /* Predefined colors */ &.mbsc-button-primary.mbsc-button-standard { background: $mbsc-windows-primary; border-color: $mbsc-windows-primary; color: get-contrast-color($mbsc-windows-primary); } &.mbsc-button-secondary.mbsc-button-standard { background: $mbsc-windows-secondary; border-color: $mbsc-windows-secondary; color: get-contrast-color($mbsc-windows-secondary); } &.mbsc-button-success.mbsc-button-standard { background: $mbsc-windows-success; border-color: $mbsc-windows-success; color: get-contrast-color($mbsc-windows-success); } &.mbsc-button-danger.mbsc-button-standard { background: $mbsc-windows-danger; border-color: $mbsc-windows-danger; color: get-contrast-color($mbsc-windows-danger); } &.mbsc-button-warning.mbsc-button-standard { background: $mbsc-windows-warning; border-color: $mbsc-windows-warning; color: get-contrast-color($mbsc-windows-warning); } &.mbsc-button-info.mbsc-button-standard { background: $mbsc-windows-info; border-color: $mbsc-windows-info; color: get-contrast-color($mbsc-windows-info); } &.mbsc-button-dark.mbsc-button-standard { background: $mbsc-windows-dark; border-color: $mbsc-windows-dark; color: get-contrast-color($mbsc-windows-dark); } &.mbsc-button-light.mbsc-button-standard { background: $mbsc-windows-light; border-color: $mbsc-windows-light; color: $dark-text; } &.mbsc-button-primary.mbsc-button-flat { color: $mbsc-windows-primary; &.mbsc-active { background: lighten($mbsc-windows-primary, 15%); border-color: lighten($mbsc-windows-primary, 15%); } } &.mbsc-button-secondary.mbsc-button-flat { color: $mbsc-windows-secondary; &.mbsc-active { background: lighten($mbsc-windows-secondary, 15%); border-color: lighten($mbsc-windows-secondary, 15%); } } &.mbsc-button-success.mbsc-button-flat { color: $mbsc-windows-success; &.mbsc-active { background: lighten($mbsc-windows-success, 15%); border-color: lighten($mbsc-windows-success, 15%); } } &.mbsc-button-danger.mbsc-button-flat { color: $mbsc-windows-danger; &.mbsc-active { background: lighten($mbsc-windows-danger, 15%); border-color: lighten($mbsc-windows-danger, 15%); } } &.mbsc-button-warning.mbsc-button-flat { color: $mbsc-windows-warning; &.mbsc-active { background: lighten($mbsc-windows-warning, 15%); border-color: lighten($mbsc-windows-warning, 15%); } } &.mbsc-button-info.mbsc-button-flat { color: $mbsc-windows-info; &.mbsc-active { background: lighten($mbsc-windows-info, 15%); border-color: lighten($mbsc-windows-info, 15%); } } &.mbsc-button-dark.mbsc-button-flat { color: $mbsc-windows-dark; &.mbsc-active { background: lighten($mbsc-windows-dark, 15%); border-color: lighten($mbsc-windows-dark, 15%); } } &.mbsc-button-light.mbsc-button-flat { color: darken($mbsc-windows-light, 20%); &.mbsc-active { background: lighten($mbsc-windows-light, 15%); border-color: lighten($mbsc-windows-light, 15%); } } &.mbsc-button-primary.mbsc-button-outline { border-color: $mbsc-windows-primary; color: $mbsc-windows-primary; } &.mbsc-button-secondary.mbsc-button-outline { border-color: $mbsc-windows-secondary; color: $mbsc-windows-secondary; } &.mbsc-button-success.mbsc-button-outline { border-color: $mbsc-windows-success; color: $mbsc-windows-success; } &.mbsc-button-danger.mbsc-button-outline { border-color: $mbsc-windows-danger; color: $mbsc-windows-danger; } &.mbsc-button-warning.mbsc-button-outline { border-color: $mbsc-windows-warning; color: $mbsc-windows-warning; } &.mbsc-button-info.mbsc-button-outline { border-color: $mbsc-windows-info; color: $mbsc-windows-info; } &.mbsc-button-dark.mbsc-button-outline { border-color: $mbsc-windows-dark; color: $mbsc-windows-dark; } &.mbsc-button-light.mbsc-button-outline { border-color: darken($mbsc-windows-light, 20%); color: darken($mbsc-windows-light, 20%); } /* Predefined colors - hover for standard and outline buttons */ &.mbsc-button-primary.mbsc-button-standard, &.mbsc-button-primary.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-primary, 20%); } &.mbsc-active { background: darken($mbsc-windows-primary, 20%); color: $mbsc-windows-light; } } &.mbsc-button-secondary.mbsc-button-standard, &.mbsc-button-secondary.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-secondary, 20%); } &.mbsc-active { background: darken($mbsc-windows-secondary, 20%); color: $mbsc-windows-light; } } &.mbsc-button-success.mbsc-button-standard, &.mbsc-button-success.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-success, 20%); } &.mbsc-active { background: darken($mbsc-windows-success, 20%); color: $mbsc-windows-light; } } &.mbsc-button-danger.mbsc-button-standard, &.mbsc-button-danger.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-danger, 20%); } &.mbsc-active { background: darken($mbsc-windows-danger, 20%); color: $mbsc-windows-light; } } &.mbsc-button-warning.mbsc-button-standard, &.mbsc-button-warning.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-warning, 20%); } &.mbsc-active { background: darken($mbsc-windows-warning, 20%); color: $mbsc-windows-light; } } &.mbsc-button-info.mbsc-button-standard, &.mbsc-button-info.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-info, 20%); } &.mbsc-active { background: darken($mbsc-windows-info, 20%); color: $mbsc-windows-light; } } &.mbsc-button-dark.mbsc-button-standard, &.mbsc-button-dark.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-dark, 30%); } &.mbsc-active { background: darken($mbsc-windows-dark, 30%); color: $mbsc-windows-light; } } &.mbsc-button-light.mbsc-button-standard, &.mbsc-button-light.mbsc-button-outline { &.mbsc-hover { border-color: darken($mbsc-windows-light, 40%); } &.mbsc-active { background: darken($mbsc-windows-light, 40%); color: $mbsc-windows-dark; } } } } @if ($mbsc-windows-theme and $mbsc-button) { .mbsc-windows { &.mbsc-button { padding: 0 .5em; line-height: 1.75em; margin: .5em .25em; border: .125em solid transparent; transition: border-color .1s ease-out, background-color .1s ease-out; } &.mbsc-icon-button { width: 2.75em; height: 2em; } &.mbsc-button-flat { transition: background-color .1s ease-out; &.mbsc-hover { opacity: .7; } &.mbsc-active { opacity: 1; } } &.mbsc-button:disabled, &.mbsc-button.mbsc-disabled { opacity: .3; } &.mbsc-ltr { &.mbsc-button-icon-start { padding-right: .5em; } &.mbsc-button-icon-end { padding-left: .5em; } } &.mbsc-rtl { &.mbsc-button-icon-start { padding-left: .5em; } &.mbsc-button-icon-end { padding-right: .5em; } } .mbsc-button-group, .mbsc-button-group-justified { margin: .5em .75em; } .mbsc-button-group-block { margin: .5em 1em; } } @include mbsc-windows-button('windows', $mbsc-windows-colors); @include mbsc-windows-button('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-button { .mbsc-button { position: relative; z-index: 1; display: inline-block; vertical-align: middle; display: inline-flex; justify-content: center; align-items: center; overflow: hidden; text-align: center; text-overflow: ellipsis; font-size: 1em; box-sizing: border-box; touch-action: manipulation; user-select: none; white-space: nowrap; cursor: pointer; } .mbsc-button:disabled, .mbsc-button.mbsc-disabled { cursor: not-allowed; } .mbsc-button:focus { outline: 0; } .mbsc-button::-moz-focus-inner { border: 0; } .mbsc-icon-button { width: 2.5em; height: 2.5em; padding: .5em; flex: 0 0 auto; } .mbsc-button-icon > *, .mbsc-button-icon > * > * { // For custom icon markup height: 100%; } .mbsc-button-icon-end { // Needed by javascript/jquery component, where end icon is before the button text in the markup order: 1; } .mbsc-button-group, .mbsc-button-group-block, .mbsc-button-group-justified { // Prevent margin collision border: 1px solid transparent; } .mbsc-button-group-block .mbsc-button, .mbsc-button-block { display: block; width: 100%; margin-left: 0 !important; margin-right: 0 !important; } .mbsc-button-group-justified, .mbsc-button-group-justified mbsc-button { display: flex; flex-wrap: wrap; } .mbsc-button-group-justified .mbsc-button, .mbsc-button-group-justified mbsc-button { flex: 1 auto; } } @mixin mbsc-mobiscroll-form-controls($theme, $params) {} @if ($mbsc-mobiscroll-theme and $mbsc-forms) { .mbsc-mobiscroll { &.mbsc-form-control-label.mbsc-disabled, &.mbsc-description.mbsc-disabled { opacity: .4; } } @include mbsc-mobiscroll-form-controls('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-form-controls('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-form-controls($theme, $params) { $text: map-get($params, 'text'); $background: map-get($params, 'background'); $bg-param: map-get($params, 'form-background'); $err-param: map-get($params, 'form-error'); $background: if($bg-param, $bg-param, $background); $is-dark: false; $border-color: ''; $wrapper-background: ''; $wrapper-background-popup: ''; @if (lightness($background) > 50%) { $border-color: darken($background, 17%); $wrapper-background: lighten($background, 6%); $wrapper-background-popup: $wrapper-background; } @else { $is-dark: true; $border-color: lighten($background, 20%); $wrapper-background: lighten($background, 11%); $wrapper-background-popup: lighten($background, 17%); } $error: if($err-param, $err-param, $mbsc-ios-error); .mbsc-#{$theme} { /* Wrapper */ &.mbsc-form-control-wrapper { background: $wrapper-background; } &.mbsc-form-control-wrapper:before, &.mbsc-form-control-wrapper:after { border-color: $border-color; } &.mbsc-form-control-wrapper.mbsc-error:after, &.mbsc-form-control-wrapper.mbsc-error + .mbsc-form-control-wrapper:before { border-color: $error; } /* Inside popup */ @if ($is-dark) { &.mbsc-popup &.mbsc-form-control-wrapper { background: $wrapper-background-popup; } } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { &.mbsc-form-control-wrapper { margin-top: -1px; } &.mbsc-form-control-wrapper.mbsc-error { z-index: 2; } &.mbsc-form-control-wrapper:before, &.mbsc-form-control-wrapper:after { content: ''; position: absolute; border-top: 1px solid transparent; } &.mbsc-form-control-wrapper.mbsc-ltr:after, &.mbsc-form-control-wrapper.mbsc-ltr:before { right: 0; left: 1em; } &.mbsc-form-control-wrapper.mbsc-rtl:after, &.mbsc-form-control-wrapper.mbsc-rtl:before { left: 0; right: 1em; } &.mbsc-form-control-wrapper:before { top: 0; } &.mbsc-form-control-wrapper:after { bottom: 0; } .mbsc-block-title + &.mbsc-form-control-wrapper.mbsc-ltr:before, .mbsc-form-group-title + &.mbsc-form-control-wrapper.mbsc-ltr:before, &.mbsc-form-control-wrapper.mbsc-ltr:first-child:before, &.mbsc-form-control-wrapper.mbsc-ltr:last-child:after { left: 0; } .mbsc-block-title + &.mbsc-form-control-wrapper.mbsc-rtl:before, .mbsc-form-group-title + &.mbsc-form-control-wrapper.mbsc-rtl:before, &.mbsc-form-control-wrapper.mbsc-rtl:first-child:before, &.mbsc-form-control-wrapper.mbsc-rtl:last-child:after { right: 0; } &.mbsc-form-control-label.mbsc-disabled, &.mbsc-description.mbsc-disabled { opacity: .3; } .mbsc-form-group-inset .mbsc-form-group-title + .mbsc-form-control-wrapper, .mbsc-form-group-inset .mbsc-form-control-wrapper:first-child { border-top-left-radius: .5em; border-top-right-radius: .5em; } .mbsc-form-group-inset .mbsc-form-control-wrapper:last-child { border-bottom-left-radius: .5em; border-bottom-right-radius: .5em; } .mbsc-form-group-inset .mbsc-form-group-title, .mbsc-form-group-inset .mbsc-form-group-title + .mbsc-form-control-wrapper:before, .mbsc-form-group-inset .mbsc-form-control-wrapper:first-child:before, .mbsc-form-group-inset .mbsc-form-control-wrapper:last-child:after { border-width: 0; } } @include mbsc-ios-form-controls('ios', $mbsc-ios-colors); @include mbsc-ios-form-controls('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-form-controls($theme, $params) {} @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { &.mbsc-form-control-label.mbsc-disabled, &.mbsc-description.mbsc-disabled { opacity: .3; } } @include mbsc-material-form-controls('material', $mbsc-material-colors); @include mbsc-material-form-controls('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-form-controls($theme, $params) {} @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { &.mbsc-form-control-label.mbsc-disabled, &.mbsc-description.mbsc-disabled { opacity: .3; } } @include mbsc-windows-form-controls('windows', $mbsc-windows-colors); @include mbsc-windows-form-controls('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { .mbsc-form-control-label { display: block; } .mbsc-form-control-input { position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: 0; opacity: 0; margin: 0; z-index: 3; } } @mixin mbsc-mobiscroll-checkbox($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $checkbox: ''; $input-disabled: ''; @if (lightness($background) > 50%) { $checkbox: lighten($background, 3%); $input-disabled: darken($background, 13%); } @else { $checkbox: $background; $input-disabled: lighten($background, 17%); } .mbsc-#{$theme} { &.mbsc-checkbox-box { color: $accent; border-color: $text; } &.mbsc-checkbox-box:after { border-color: $checkbox; } &.mbsc-checkbox-box.mbsc-disabled { border-color: $input-disabled; background: $input-disabled; } } } @if ($mbsc-mobiscroll-theme and $mbsc-forms) { .mbsc-mobiscroll { &.mbsc-checkbox-right { padding: 1em 3.125em 1em 1em; } &.mbsc-checkbox-left { padding: 1em 1em 1em 3.125em; } &.mbsc-checkbox-box { margin-top: -.5625em; width: 1.125em; height: 1.125em; border: .125em solid; border-radius: .125em; } &.mbsc-checkbox-box-right { right: 1em; } &.mbsc-checkbox-box-left { left: 1em; } &.mbsc-checkbox-box:after { top: .125em; left: .0625em; width: .8125em; height: .4375em; opacity: 1; border: .125em solid; border-top: 0; border-right: 0; transform: scale(0) rotate(-45deg); transition: transform .1s ease-out; } &.mbsc-checkbox-box.mbsc-checked { background: currentColor; border-color: currentColor; } &.mbsc-checkbox-box.mbsc-checked:after { transform: scale(1) rotate(-45deg); } /* Color presets */ &.mbsc-checkbox-box.mbsc-checkbox-box-primary { color: $mbsc-mobiscroll-primary; } &.mbsc-checkbox-box.mbsc-checkbox-box-secondary { color: $mbsc-mobiscroll-secondary; } &.mbsc-checkbox-box.mbsc-checkbox-box-success { color: $mbsc-mobiscroll-success; } &.mbsc-checkbox-box.mbsc-checkbox-box-danger { color: $mbsc-mobiscroll-danger; } &.mbsc-checkbox-box.mbsc-checkbox-box-warning { color: $mbsc-mobiscroll-warning; } &.mbsc-checkbox-box.mbsc-checkbox-box-info { color: $mbsc-mobiscroll-info; } } @include mbsc-mobiscroll-checkbox('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-checkbox('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-checkbox($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $accent: if($acc-param, $acc-param, $accent); $form-selection: ''; @if (lightness($accent) > 50%) { $form-selection: lighten(saturate($accent, 15%), 3%); } @else { $form-selection: darken(desaturate($accent, 15%), 3%); } .mbsc-#{$theme} { &.mbsc-checkbox-box { color: $form-selection; } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { &.mbsc-checkbox-right { padding: .875em 3.75em .875em 1em; } &.mbsc-checkbox-left { padding: .875em 1em .875em 3.75em; } &.mbsc-checkbox-box { width: 1.75em; height: 1.75em; margin-top: -.875em; border: .125em solid currentColor; border-radius: 2em; } &.mbsc-checkbox-box-right { right: 1em; } &.mbsc-checkbox-box-left { left: 1em; } &.mbsc-checkbox-box:after { top: 32%; left: 26%; width: .75em; height: .375em; border: .125em solid currentColor; border-top: 0; border-right: 0; transition: opacity .2s ease-in-out; } &.mbsc-checkbox-box:before { content: ''; position: absolute; top: -.5em; left: -.5em; z-index: -1; width: 2.5em; height: 2.5em; opacity: 0; border-radius: 2.5em; background: #ccc; transition: opacity .2s ease-in-out; } &.mbsc-checkbox-box.mbsc-focus:before { opacity: .12; } &.mbsc-checkbox-box.mbsc-disabled { opacity: .3; } /* Color presets */ &.mbsc-checkbox-box.mbsc-checkbox-box-primary { color: $mbsc-ios-primary; } &.mbsc-checkbox-box.mbsc-checkbox-box-secondary { color: $mbsc-ios-secondary; } &.mbsc-checkbox-box.mbsc-checkbox-box-success { color: $mbsc-ios-success; } &.mbsc-checkbox-box.mbsc-checkbox-box-danger { color: $mbsc-ios-danger; } &.mbsc-checkbox-box.mbsc-checkbox-box-warning { color: $mbsc-ios-warning; } &.mbsc-checkbox-box.mbsc-checkbox-box-info { color: $mbsc-ios-info; } } @include mbsc-ios-checkbox('ios', $mbsc-ios-colors); @include mbsc-ios-checkbox('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-checkbox($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $checkbox: ''; @if (lightness($background) > 50%) { $checkbox: lighten($background, 7%); } @else { $checkbox: $background; } .mbsc-#{$theme} { &.mbsc-checkbox-box { color: $accent; border-color: $text; } &.mbsc-checkbox-box:after { border-color: $checkbox; } } } @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { &.mbsc-checkbox-right { padding: .9375em 3.5em .9375em 1em; } &.mbsc-checkbox-left { padding: .9375em 1em .9375em 3.5em; } &.mbsc-checkbox-box { border-radius: .1875em; width: 1.125em; height: 1.125em; margin-top: -.5625em; border: .125em solid; transition: background-color .1s ease-out; } &.mbsc-checkbox-box-right { right: 1.25em; } &.mbsc-checkbox-box-left { left: 1.25em; } &.mbsc-checkbox-box:after { top: .125em; left: .0625em; width: .8125em; height: .4375em; opacity: 1; border: .125em solid; border-top: 0; border-right: 0; transform: scale(0) rotate(-45deg); transition: transform .1s ease-out; } &.mbsc-checkbox-box:before { content: ''; position: absolute; top: -.8125em; left: -.8125em; z-index: -1; width: 2.5em; height: 2.5em; opacity: 0; border-radius: 2.5em; background: currentColor; transition: opacity .2s ease-in-out; } &.mbsc-checkbox-box.mbsc-focus:before { opacity: .12; } &.mbsc-checkbox-box.mbsc-active:before { opacity: .2; } &.mbsc-checkbox-box.mbsc-checked { background: currentColor; border-color: currentColor; } &.mbsc-checkbox-box.mbsc-checked:after { transform: scale(1) rotate(-45deg); } &.mbsc-checkbox-box.mbsc-disabled { opacity: .3; } /* Color presets */ &.mbsc-checkbox-box.mbsc-checkbox-box-primary { color: $mbsc-material-primary; } &.mbsc-checkbox-box.mbsc-checkbox-box-secondary { color: $mbsc-material-secondary; } &.mbsc-checkbox-box.mbsc-checkbox-box-success { color: $mbsc-material-success; } &.mbsc-checkbox-box.mbsc-checkbox-box-danger { color: $mbsc-material-danger; } &.mbsc-checkbox-box.mbsc-checkbox-box-warning { color: $mbsc-material-warning; } &.mbsc-checkbox-box.mbsc-checkbox-box-info { color: $mbsc-material-info; } } @include mbsc-material-checkbox('material', $mbsc-material-colors); @include mbsc-material-checkbox('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-checkbox($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $checkbox-border: ''; $input-hover: ''; @if (lightness($background) > 50%) { $checkbox-border: desaturate(lighten($accent, 52%), 24%); $input-hover: darken($background, 55%); } @else { $checkbox-border: saturate(darken($accent, 52%), 24%); $input-hover: lighten($background, 55%); } .mbsc-#{$theme} { &.mbsc-checkbox-box { color: $accent; border-color: $text; } &.mbsc-checkbox-box:after { border-color: $checkbox-border; } &.mbsc-checkbox-box:before { background: $input-hover; } &.mbsc-checkbox-box.mbsc-active { border-color: $input-hover; background: $input-hover; } } } @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { &.mbsc-checkbox-left { padding: 1.125em 1em 1.125em 2.875em; } &.mbsc-checkbox-right { padding: 1.125em 2.875em 1.125em 1em; } &.mbsc-checkbox-box { margin-top: -.6875em; width: 1.3125em; height: 1.3125em; border: .125em solid; } &.mbsc-checkbox-box-left { left: 1em; } &.mbsc-checkbox-box-right { right: 1em; } &.mbsc-checkbox-box:after { top: 16%; left: 10%; width: .875em; height: .475em; border: .125em solid; border-top: 0; border-right: 0; } &.mbsc-checkbox-box:before { content: ''; position: absolute; top: -.75em; left: -.75em; z-index: -1; width: 2.5em; height: 2.5em; opacity: 0; border-radius: 2.5em; transition: opacity .2s ease-in-out; } &.mbsc-checkbox-box.mbsc-focus:before { opacity: .12; } &.mbsc-checkbox-box.mbsc-checked { background: currentColor; border-color: currentColor; } &.mbsc-checkbox-box.mbsc-disabled { opacity: .3; } /* Color presets */ &.mbsc-checkbox-box.mbsc-checkbox-box-primary { color: $mbsc-windows-primary; } &.mbsc-checkbox-box.mbsc-checkbox-box-secondary { color: $mbsc-windows-secondary; } &.mbsc-checkbox-box.mbsc-checkbox-box-success { color: $mbsc-windows-success; } &.mbsc-checkbox-box.mbsc-checkbox-box-danger { color: $mbsc-windows-danger; } &.mbsc-checkbox-box.mbsc-checkbox-box-warning { color: $mbsc-windows-warning; } &.mbsc-checkbox-box.mbsc-checkbox-box-info { color: $mbsc-windows-info; } } @include mbsc-windows-checkbox('windows', $mbsc-windows-colors); @include mbsc-windows-checkbox('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { .mbsc-checkbox { line-height: 1.25em; position: relative; display: block; margin: 0; z-index: 0; user-select: none; } .mbsc-checkbox-box { box-sizing: border-box; position: absolute; top: 50%; display: block; width: 1.375em; height: 1.375em; } .mbsc-checkbox-box:after { content: ''; box-sizing: border-box; position: absolute; display: block; opacity: 0; transform: rotate(-45deg); } .mbsc-checkbox-box.mbsc-checked:after { opacity: 1; } .mbsc-description { display: block; font-size: .75em; opacity: .6; } } $mbsc-ios-input-background: $mbsc-input-background-light !default; $mbsc-ios-input-text: $mbsc-input-text-light !default; $mbsc-ios-input-accent: $mbsc-input-accent-light !default; $mbsc-ios-input-border: $mbsc-input-border-light !default; $mbsc-ios-dark-input-background: $mbsc-input-background-dark !default; $mbsc-ios-dark-input-text: $mbsc-input-text-dark !default; $mbsc-ios-dark-input-accent: $mbsc-input-accent-dark !default; $mbsc-ios-dark-input-border: $mbsc-input-border-dark !default; $mbsc-ios-colors: map-merge($mbsc-ios-colors, ( // Colors map 'input-background': $mbsc-ios-input-background, 'input-text': $mbsc-ios-input-text, 'input-accent': $mbsc-ios-input-accent, 'input-border': $mbsc-ios-input-border, )); $mbsc-ios-dark-colors: map-merge($mbsc-ios-dark-colors, ( // Colors map 'input-background': $mbsc-ios-dark-input-background, 'input-text': $mbsc-ios-dark-input-text, 'input-accent': $mbsc-ios-dark-input-accent, 'input-border': $mbsc-ios-dark-input-border, )); @mixin mbsc-ios-input($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $bg-param: map-get($params, 'input-background'); $text-param: map-get($params, 'input-text'); $brd-param: map-get($params, 'input-border'); $err-param: map-get($params, 'form-error'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $error: if($err-param, $err-param, $mbsc-ios-error); $is-dark: false; $border-color: ''; $input-background: ''; $input-background-popup: ''; $input-tag-background: ''; $textfield-text: $text; $textfield-icon-color: ''; // Light background @if (lightness($background) > 50%) { $input-background: lighten($background, 6%); $input-background-popup: $input-background; $input-tag-background: darken($background, 10%); $textfield-icon-color: lighten($text, 54.90); $border-color: darken($background, 17%); } // Dark background @else { $is-dark: true; $input-background: lighten($background, 11%); $input-background-popup: lighten($background, 17%); $input-tag-background: lighten($background, 23%); $textfield-icon-color: $mbsc-ios-dark-text; $border-color: lighten($background, 20%); } $border-color: if($brd-param, $brd-param, $border-color); .mbsc-#{$theme} { /* Wrapper */ &.mbsc-textfield-wrapper { background: none; } &.mbsc-textfield-wrapper-underline { background: $input-background; } /* Form element */ &.mbsc-label, &.mbsc-textfield { color: $textfield-text; } &.mbsc-textfield-box, &.mbsc-textfield-outline { background: $input-background; } &.mbsc-textfield-outline { border-color: $border-color; } /* Icon */ &.mbsc-textfield-icon, &.mbsc-select-icon { color: $textfield-icon-color; } /* Error */ &.mbsc-textfield-outline.mbsc-error, &.mbsc-textfield-box.mbsc-error { border-color: $error; } &.mbsc-error-message { color: $error; } /* Select */ &.mbsc-select { background: $input-background; } /* Textarea */ &.mbsc-textarea-inner.mbsc-textfield-inner-box, &.mbsc-textarea-inner.mbsc-textfield-inner-outline { background: $input-background; } &.mbsc-textarea-inner.mbsc-textfield-inner-outline { border-color: $border-color; } &.mbsc-textarea-inner.mbsc-error { border-color: $error; } /* Inside popup */ @if ($is-dark) { &.mbsc-popup &.mbsc-textfield-wrapper { background: none; } &.mbsc-popup &.mbsc-select, &.mbsc-popup &.mbsc-textfield-wrapper-underline, &.mbsc-popup &.mbsc-textfield-box, &.mbsc-popup &.mbsc-textfield-outline, &.mbsc-popup &.mbsc-textarea-inner.mbsc-textfield-inner-box, &.mbsc-popup &.mbsc-textarea-inner.mbsc-textfield-inner-outline { background: $input-background-popup; } } /* Input tags */ &.mbsc-textfield-tag { background: $input-tag-background; } &.mbsc-textfield-tag-clear { color: $textfield-icon-color; } } } @if ($mbsc-ios-theme and $mbsc-input) { .mbsc-ios { /* Wrapper */ &.mbsc-textfield-wrapper-has-icon-right.mbsc-rtl, &.mbsc-textfield-wrapper-has-icon-left.mbsc-ltr { z-index: 1; } &.mbsc-textfield-wrapper-has-icon-left.mbsc-ltr:before, &.mbsc-textfield-wrapper-has-icon-left.mbsc-ltr:after { left: 3.375em; } &.mbsc-textfield-wrapper-has-icon-right.mbsc-rtl:after, &.mbsc-textfield-wrapper-has-icon-right.mbsc-rtl:before { right: 3.375em; } /* Inner element */ &.mbsc-textfield-inner { position: static; flex: 1 auto; z-index: -1; } &.mbsc-textfield-inner.mbsc-disabled { opacity: .5; } /* Form element */ &.mbsc-textfield { display: flex; height: 2.75em; padding: 0 1em; background: transparent; height: 2.75em; } &.mbsc-textfield-has-icon-left { padding-left: 3.375em; } &.mbsc-textfield-has-icon-right { padding-right: 3.375em; } &.mbsc-textfield-stacked, &.mbsc-textfield-floating { height: 3.5em; padding-top: 1.25em; } /* Icons */ &.mbsc-textfield-icon { top: .625em; z-index: 1; } &.mbsc-textfield-icon-left { left: .9375em; } &.mbsc-textfield-icon-right { right: .9375em; } &.mbsc-textfield-icon-floating, &.mbsc-textfield-icon-stacked { top: 1em; } /* Label */ &.mbsc-label-inline { line-height: 2.75em; } &.mbsc-label-inline.mbsc-ltr { padding-left: 1em; } &.mbsc-label-inline.mbsc-rtl { padding-right: 1em; } &.mbsc-label-stacked { top: .666667em; font-size: .75em; line-height: 1em; } &.mbsc-label-stacked.mbsc-ltr { left: 1.333334em; } &.mbsc-label-stacked.mbsc-rtl { right: 1.333334em; } &.mbsc-label-floating { top: .875em; line-height: 2em; } &.mbsc-label-floating.mbsc-ltr { left: 1em; } &.mbsc-label-floating.mbsc-rtl { right: 1em; } &.mbsc-label-floating-active.mbsc-label { transform: translateY(-.75em) scale(.75); } &.mbsc-label.mbsc-disabled { opacity: .5; } /* Error message */ &.mbsc-error-message { display: block; padding: 0 1.333334em; line-height: 1.666667em; } &.mbsc-error-message-underline { position: static; } &.mbsc-error-message-has-icon-left.mbsc-ltr { padding-left: 4.5em; } &.mbsc-error-message-has-icon-right.mbsc-rtl { padding-right: 4.5em; } /* Underline input --------------------------------------------------------------------------- */ .mbsc-textfield-wrapper-underline { // Cut corners of select dropdown in case of inset form group overflow: hidden; } /* Form element*/ &.mbsc-textfield-underline-inline-has-icon-left.mbsc-ltr { padding-left: 1em; } &.mbsc-textfield-underline-inline-has-icon-right.mbsc-rtl { padding-right: 1em; } /* Label */ &.mbsc-label-underline { margin: 0; } &.mbsc-label-underline-stacked-has-icon-left.mbsc-ltr { left: 4.5em; } &.mbsc-label-underline-stacked-has-icon-right.mbsc-rtl { right: 4.5em; } &.mbsc-label-underline-inline-has-icon-left.mbsc-ltr { padding-left: 3.375em; } &.mbsc-label-underline-inline-has-icon-right.mbsc-rtl { padding-right: 3.375em; } &.mbsc-label-underline-floating-has-icon-left.mbsc-ltr { left: 3.375em; } &.mbsc-label-underline-floating-has-icon-right.mbsc-rtl { right: 3.375em; } /* Error message */ &.mbsc-error-message-underline.mbsc-error-message-inline.mbsc-ltr { padding-left: 1.333334em; } &.mbsc-error-message-underline.mbsc-error-message-inline.mbsc-rtl { padding-right: 1.333334em; } /* ------------------------------------------------------------------------------------------- */ /* Box & outline input common styles --------------------------------------------------------- */ /* Wrapper */ &.mbsc-textfield-wrapper-outline, &.mbsc-textfield-wrapper-box { margin: 1.5em 1em; } &.mbsc-textfield-wrapper-outline.mbsc-font::after, &.mbsc-textfield-wrapper-outline.mbsc-font::before, &.mbsc-textfield-wrapper-box.mbsc-font::after, &.mbsc-textfield-wrapper-box.mbsc-font::before { border: none; } /* Form element */ &.mbsc-textfield-box, &.mbsc-textfield-outline { border-radius: .5em; border: 1px solid transparent; } &.mbsc-textfield-inner-box, &.mbsc-textfield-inner-outline { position: relative; } /* Label */ &.mbsc-label-box-stacked-has-icon-left.mbsc-ltr, &.mbsc-label-outline-stacked-has-icon-left.mbsc-ltr { left: 4.5em; } &.mbsc-label-outline-stacked-has-icon-right.mbsc-rtl, &.mbsc-label-box-stacked-has-icon-right.mbsc-rtl { right: 4.5em; } &.mbsc-label-box-stacked, &.mbsc-label-outline-stacked, &.mbsc-label-box-floating, &.mbsc-label-outline-floating { margin: 0 1px; } &.mbsc-label-outline-floating-has-icon-left.mbsc-ltr, &.mbsc-label-box-floating-has-icon-left.mbsc-ltr { left: 3.375em; } &.mbsc-label-outline-floating-has-icon-right.mbsc-rtl, &.mbsc-label-box-floating-has-icon-right.mbsc-rtl { right: 3.375em; } /* Error message */ &.mbsc-error-message-outline, &.mbsc-error-message-box { margin: 0 1px; } /* ------------------------------------------------------------------------------------------- */ /* Select */ &.mbsc-select.mbsc-ltr { padding-right: 3.375em; } &.mbsc-select.mbsc-rtl { padding-left: 3.375em; } &.mbsc-select.mbsc-textfield-has-icon-right.mbsc-ltr { padding-right: 4.875em; } &.mbsc-select.mbsc-textfield-has-icon-left.mbsc-rtl { padding-left: 4.875em; } /* Select icon */ &.mbsc-select-icon { top: .625em; } &.mbsc-select-icon-stacked, &.mbsc-select-icon-floating { top: 1em; } &.mbsc-select-icon.mbsc-ltr { right: .9375em; } &.mbsc-select-icon.mbsc-rtl { left: .9375em; } &.mbsc-select-icon-right.mbsc-ltr { right: 3.375em; } &.mbsc-select-icon-left.mbsc-rtl { left: 3.375em; } /* Textarea */ &.mbsc-textarea { height: 3em; border: 0; } &.mbsc-textarea.mbsc-textfield-stacked, &.mbsc-textarea.mbsc-textfield-floating { padding-top: 0; } &.mbsc-textarea-inner { padding-top: .625em; padding-bottom: .625em; } &.mbsc-textarea-inner.mbsc-textfield-inner-box, &.mbsc-textarea-inner.mbsc-textfield-inner-outline { border: 1px solid transparent; border-radius: .5em; } &.mbsc-textarea-inner.mbsc-textfield-inner-stacked, &.mbsc-textarea-inner.mbsc-textfield-inner-floating { padding-top: 1.375em; } /* Input tags */ &.mbsc-textfield-tags-inner { padding-top: 0; padding-bottom: 0; } &.mbsc-textfield.mbsc-textfield-tags { padding-top: .3125em; padding-bottom: .3125em; min-height: 2.75em; } &.mbsc-textfield-tags.mbsc-textfield-stacked, &.mbsc-textfield-tags.mbsc-textfield-floating { min-height: 2.125em; padding-top: 0; padding-bottom: 0; } &.mbsc-textfield-tag { border-radius: 1em; } } @include mbsc-ios-input('ios', $mbsc-ios-colors); @include mbsc-ios-input('ios-dark', $mbsc-ios-dark-colors); } $mbsc-material-input-background: $mbsc-input-background-light !default; $mbsc-material-input-text: $mbsc-input-text-light !default; $mbsc-material-input-accent: $mbsc-input-accent-light !default; $mbsc-material-input-border: $mbsc-input-border-light !default; $mbsc-material-dark-input-background: $mbsc-input-background-dark !default; $mbsc-material-dark-input-text: $mbsc-input-text-dark !default; $mbsc-material-dark-input-accent: $mbsc-input-accent-dark !default; $mbsc-material-dark-input-border: $mbsc-input-border-dark !default; $mbsc-material-colors: map-merge($mbsc-material-colors, ( // Colors map 'input-background': $mbsc-material-input-background, 'input-text': $mbsc-material-input-text, 'input-accent': $mbsc-material-input-accent, 'input-border': $mbsc-material-input-border, )); $mbsc-material-dark-colors: map-merge($mbsc-material-dark-colors, ( // Colors map 'input-background': $mbsc-material-dark-input-background, 'input-text': $mbsc-material-dark-input-text, 'input-accent': $mbsc-material-dark-input-accent, 'input-border': $mbsc-material-dark-input-border, )); @mixin mbsc-material-input($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $text: map-get($params, 'text'); $bg-param: map-get($params, 'input-background'); $text-param: map-get($params, 'input-text'); $acc-param: map-get($params, 'input-accent'); $err-param: map-get($params, 'form-error'); $brd-param: map-get($params, 'input-border'); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $error: if($err-param, $err-param, $mbsc-material-error); $input-base-color: ''; $input-text: ''; $input-icon-color: ''; $input-border-color: ''; $input-label-color: ''; $input-background: ''; $input-box-background: ''; $input-box-hover-background: ''; $input-box-focus-background: ''; $input-tag-background: ''; // Light background @if (lightness($background) > 50%) { $input-base-color: darken($text, 19%); $input-text: rgba($input-base-color, .87); $input-border-color: rgba($input-base-color, .42); $input-icon-color: rgba($input-base-color, .54); $input-label-color: rgba($input-base-color, .6); $input-background: if($bg-param, $bg-param, $background); $input-box-background: if($bg-param, $bg-param, darken($background, 4%)); $input-box-hover-background: darken($input-box-background, 3%); $input-box-focus-background: darken($input-box-background, 7%); $input-tag-background: darken($background, 17%); } // Dark background @else { $input-base-color: $text; $input-text: $input-base-color; $input-border-color: $input-base-color; $input-icon-color: $input-base-color; $input-label-color: rgba($input-base-color, .6); $input-background: if($bg-param, $bg-param, $background); $input-box-background: if($bg-param, $bg-param, lighten($background, 4%)); $input-box-hover-background: lighten($input-box-background, 3%); $input-box-focus-background: lighten($input-box-background, 7%); $input-tag-background: lighten($background, 27%); } $input-text: if($text-param, $text-param, $input-text); $input-icon-color: if($text-param, $text-param, $input-icon-color); $input-label-color: if($text-param, $text-param, $input-label-color); $input-border-color: if($brd-param, $brd-param, $input-border-color); .mbsc-#{$theme} { /* Form element */ &.mbsc-textfield { border-bottom-color: $input-border-color; color: $input-text; } &.mbsc-textfield.mbsc-hover { border-color: $input-text; } &.mbsc-textfield.mbsc-error { border-color: $error; } /* Icon */ &.mbsc-textfield-icon, &.mbsc-select-icon { color: $input-icon-color; } /* Ripple */ &.mbsc-textfield-ripple { background-color: $accent; } &.mbsc-textfield-ripple.mbsc-error { background-color: $error; } /* Label */ &.mbsc-label { color: $input-label-color; } &.mbsc-label-stacked.mbsc-focus, &.mbsc-label-floating.mbsc-focus { color: $accent; } &.mbsc-label.mbsc-error { color: $error; } /* Error message */ &.mbsc-error-message { color: $error; } /* Select */ &.mbsc-select { background: $input-background; } /* Box input ------------------------------------------------------------------------------- */ &.mbsc-textfield-box.mbsc-select, &.mbsc-textfield-inner-box { background: $input-box-background; } &.mbsc-textfield-box.mbsc-select.mbsc-hover, &.mbsc-textfield-inner-box.mbsc-hover { background: $input-box-hover-background; } &.mbsc-textfield-box.mbsc-select.mbsc-focus, &.mbsc-textfield-inner-box.mbsc-focus { background: $input-box-focus-background; } /* ----------------------------------------------------------------------------------------- */ /* Outline input --------------------------------------------------------------------------- */ &.mbsc-textfield-fieldset { border-color: $input-border-color; } &.mbsc-textfield-fieldset.mbsc-hover { border-color: $input-text; } &.mbsc-textfield-fieldset.mbsc-focus { border-color: $accent; } &.mbsc-textfield-fieldset.mbsc-error { border-color: $error; } &.mbsc-textfield-fieldset.disabled { border-color: $input-text; } /* Input tag */ &.mbsc-textfield-tag { background: $input-tag-background; } &.mbsc-textfield-tag-clear { color: $input-icon-color; } /* ----------------------------------------------------------------------------------------- */ } } @if ($mbsc-material-theme and $mbsc-input) { .mbsc-material { /* Wrapper */ &.mbsc-textfield-wrapper { margin: 1.5em 1em; box-sizing: border-box; } /* Inner wrapper */ &.mbsc-textfield-inner.mbsc-disabled { opacity: .5; } /* Form element */ &.mbsc-textfield { display: block; width: 100%; height: 2.25em; background-color: transparent; border-bottom: 1px solid; font-size: 1em; transition: border-color .2s; } &.mbsc-textfield-has-icon-left { padding-left: 2em; } &.mbsc-textfield-has-icon-right { padding-right: 2em; } /* Icon */ &.mbsc-textfield-icon { top: .375em; } &.mbsc-textfield-icon-floating, &.mbsc-textfield-icon-stacked, &.mbsc-textfield-icon-outline { top: 1em; } /* Ripple */ .mbsc-textfield-ripple { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; transform: scaleX(0); transition: transform 180ms cubic-bezier(.4, 0, .2, 1); z-index: 2; } .mbsc-textfield-ripple-active { transform: scaleX(1); } /* Label */ &.mbsc-label { font-size: .75em; } &.mbsc-label-inline { line-height: 2em; font-size: 1em; } &.mbsc-label-inline.mbsc-ltr { padding-right: .5em; } &.mbsc-label-inline.mbsc-rtl { padding-left: .5em; } &.mbsc-label-floating { font-size: 1em; line-height: 1.5em; top: 1.125em; } &.mbsc-label-floating-active { transform: translateY(-1.125em) scale(.75); } &.mbsc-label.mbsc-disabled { opacity: .5; } /* Error message */ &.mbsc-error-message.mbsc-ltr { left: 0; } &.mbsc-error-message.mbsc-rtl { right: 0; } &.mbsc-error-message-has-icon-left.mbsc-ltr { left: 2.66667em; } &.mbsc-error-message-has-icon-right.mbsc-rtl { right: 2.66667em; } /* Underline input --------------------------------------------------------------------------- */ /* Form element */ &.mbsc-textfield-underline-stacked, &.mbsc-textfield-underline-floating { height: 3em; padding-top: .875em; } /* Icon */ &.mbsc-textfield-icon-underline { top: .25em; } &.mbsc-textfield-icon-underline.mbsc-textfield-icon-floating, &.mbsc-textfield-icon-underline.mbsc-textfield-icon-stacked { top: 1.125em; } /* Label */ &.mbsc-label-underline-inline { padding-top: 1px; } &.mbsc-label-underline-stacked-has-icon-left.mbsc-ltr { left: 2.66667em; } &.mbsc-label-underline-stacked-has-icon-right.mbsc-rtl { right: 2.66667em; } &.mbsc-label-underline-floating-has-icon-left.mbsc-ltr { left: 2em; } &.mbsc-label-underline-floating-has-icon-right.mbsc-rtl { right: 2em; } /* ------------------------------------------------------------------------------------------- */ /* Box input --------------------------------------------------------------------------------- */ /* Inner wrapper */ &.mbsc-textfield-box, &.mbsc-textfield-inner-box { border-radius: .25em .25em 0 0; } /* Form element */ &.mbsc-textfield-box { padding: 0 1em; } &.mbsc-textfield-box-stacked, &.mbsc-textfield-box-floating { height: 3.5em; padding-top: 1.25em; } &.mbsc-textfield-underline.mbsc-disabled { border-style: dotted; } /* Label */ &.mbsc-label-box-inline { padding-top: 1px; } &.mbsc-label-box-stacked { top: .666667em; } &.mbsc-label-box-floating { top: 1em; } &.mbsc-label-box-floating.mbsc-label-floating-active { transform: translateY(-.625em) scale(.75); } /* ------------------------------------------------------------------------------------------- */ /* Outline input ----------------------------------------------------------------------------- */ /* Inner wrapper */ &.mbsc-textfield-inner-outline { padding: 0 2px; } /* Form element */ &.mbsc-textfield-outline { height: 3.5em; padding: 2px 1em; border: 0; border-radius: 4px; } &.mbsc-textfield-fieldset { top: -.5em; border: 1px solid; border-radius: 4px; transition: border-color .2s; } &.mbsc-textfield-fieldset-has-icon-left { padding-left: 3em; } &.mbsc-textfield-fieldset-has-icon-right { padding-right: 3em; } &.mbsc-textfield-fieldset.mbsc-focus { border-width: 2px; } &.mbsc-textfield-legend { padding: 0; margin: 0; font-size: .75em; color: transparent; width: 0.01px; // Fraction needed for IE11 white-space: nowrap; } &.mbsc-textfield-legend-active { width: auto; padding: 0 .333334em; margin: 0 -.333334em; } /* Label */ &.mbsc-label-outline-inline { line-height: 3.375em; } &.mbsc-label-outline-stacked { top: -.5em; margin: 0 2px; // Compensate borders } &.mbsc-label-outline-floating { top: 1em; margin: 0 2px; // Compensate borders } &.mbsc-label-outline-floating.mbsc-label-floating-active { margin-top: -1px; transform: translateY(-1.5em) scale(.75); } /* Error message */ &.mbsc-error-message-outline { margin: 0 2px; // Compensate border } /* ------------------------------------------------------------------------------------------- */ /* Box & outline input common styles --------------------------------------------------------- */ /* Form element */ &.mbsc-textfield-outline-has-icon-left, &.mbsc-textfield-box-has-icon-left { padding-left: 3em; } &.mbsc-textfield-outline-has-icon-right, &.mbsc-textfield-box-has-icon-right { padding-right: 3em; } /* Icon */ &.mbsc-textfield-icon-outline-left, &.mbsc-textfield-icon-box-left { left: .75em; } &.mbsc-textfield-icon-outline-right, &.mbsc-textfield-icon-box-right { right: .75em; } /* Label */ &.mbsc-label-box-stacked.mbsc-ltr, &.mbsc-label-outline-stacked.mbsc-ltr { left: 1.333334em; } &.mbsc-label-box-stacked.mbsc-rtl, &.mbsc-label-outline-stacked.mbsc-rtl { right: 1.333334em; } &.mbsc-label-outline-stacked-has-icon-left.mbsc-ltr, &.mbsc-label-box-stacked-has-icon-left.mbsc-ltr { left: 4em; } &.mbsc-label-box-stacked-has-icon-right.mbsc-rtl, &.mbsc-label-outline-stacked-has-icon-right.mbsc-rtl { right: 4em; } &.mbsc-label-box-floating.mbsc-ltr, &.mbsc-label-outline-floating.mbsc-ltr { left: 1em; } &.mbsc-label-box-floating.mbsc-rtl, &.mbsc-label-outline-floating.mbsc-rtl { right: 1em; } &.mbsc-label-outline-floating-has-icon-left.mbsc-ltr, &.mbsc-label-box-floating-has-icon-left.mbsc-ltr { left: 3em; } &.mbsc-label-outline-floating-has-icon-left.mbsc-rtl, &.mbsc-label-box-floating-has-icon-left.mbsc-rtl { right: 1em; } &.mbsc-label-outline-floating-has-icon-right.mbsc-rtl, &.mbsc-label-box-floating-has-icon-right.mbsc-rtl { right: 3em; } /* Error message */ &.mbsc-error-message-box.mbsc-ltr, &.mbsc-error-message-outline.mbsc-ltr { left: 1.333334em; } &.mbsc-error-message-box.mbsc-rtl, &.mbsc-error-message-outline.mbsc-rtl { right: 1.333334em; } &.mbsc-error-message-box.mbsc-error-message-has-icon-left.mbsc-ltr, &.mbsc-error-message-outline.mbsc-error-message-has-icon-left.mbsc-ltr { left: 4em; } &.mbsc-error-message-box.mbsc-error-message-has-icon-right.mbsc-rtl, &.mbsc-error-message-outline.mbsc-error-message-has-icon-right.mbsc-rtl { right: 4em; } /* ------------------------------------------------------------------------------------------- */ /* Select */ &.mbsc-select.mbsc-ltr { padding-right: 3em; } &.mbsc-select.mbsc-rtl { padding-left: 3em; } &.mbsc-select.mbsc-textfield-has-icon-right.mbsc-ltr { padding-right: 4.5em; } &.mbsc-select.mbsc-textfield-has-icon-left.mbsc-rtl { padding-left: 4.5em; } &.mbsc-select.mbsc-textfield-underline-has-icon-right.mbsc-ltr { padding-right: 3.75em; } &.mbsc-select.mbsc-textfield-underline-has-icon-left.mbsc-rtl { padding-left: 3.75em; } /* Select icon */ &.mbsc-select-icon { top: .375em; } &.mbsc-select-icon.mbsc-ltr { right: .75em; } &.mbsc-select-icon.mbsc-rtl { left: .75em; } &.mbsc-select-icon-right.mbsc-ltr { right: 3em; } &.mbsc-select-icon-left.mbsc-rtl { left: 3em; } &.mbsc-select-icon-stacked, &.mbsc-select-icon-floating, &.mbsc-select-icon-outline { top: 1em; } &.mbsc-select-icon-underline { top: .25em; } &.mbsc-select-icon-underline.mbsc-ltr { right: 0; } &.mbsc-select-icon-underline.mbsc-rtl { left: 0; } &.mbsc-select-icon-underline.mbsc-select-icon-right.mbsc-ltr { right: 2.25em; } &.mbsc-select-icon-underline.mbsc-select-icon-left.mbsc-rtl { left: 2.25em; } &.mbsc-select-icon-underline.mbsc-select-icon-floating, &.mbsc-select-icon-underline.mbsc-select-icon-stacked { top: 1.125em; } /* Textarea */ &.mbsc-textarea { height: 1.875em; padding-bottom: .375em; } &.mbsc-textarea.mbsc-textfield-stacked, &.mbsc-textarea.mbsc-textfield-floating { padding-top: 0; } &.mbsc-textarea.mbsc-textfield-outline { height: 1.5em; padding-top: 0; padding-bottom: 0; } &.mbsc-textarea.mbsc-textfield-underline { padding-bottom: .3125em; } &.mbsc-textarea-inner.mbsc-textfield-inner-box { padding-top: .375em; } &.mbsc-textarea-inner.mbsc-textfield-inner-stacked, &.mbsc-textarea-inner.mbsc-textfield-inner-floating { padding-top: 1.625em; } &.mbsc-textarea-inner.mbsc-textfield-inner-outline { padding-top: 1em; padding-bottom: 1em; } &.mbsc-textarea-inner.mbsc-textfield-inner-underline { padding-top: .25em; } &.mbsc-textarea-inner.mbsc-textfield-inner-underline.mbsc-textfield-inner-stacked, &.mbsc-textarea-inner.mbsc-textfield-inner-underline.mbsc-textfield-inner-floating { padding-top: 1.125em; } /* Input tags */ &.mbsc-textfield-tags-inner.mbsc-textfield-inner-underline, &.mbsc-textfield-tags-inner.mbsc-textfield-inner-inline { padding-top: 0; } &.mbsc-textfield-tags-inner.mbsc-textfield-inner-outline { padding-top: .625em; padding-bottom: .625em; } &.mbsc-textfield-tags.mbsc-textfield { padding-bottom: 0; min-height: 2.25em; } &.mbsc-textfield-tags.mbsc-textfield-outline { padding-top: 1px; padding-bottom: 1px; } &.mbsc-textfield-tag { border-radius: 1em; } } @include mbsc-material-input('material', $mbsc-material-colors); @include mbsc-material-input('material-dark', $mbsc-material-dark-colors); } $mbsc-mobiscroll-input-background: $mbsc-input-background-light !default; $mbsc-mobiscroll-input-text: $mbsc-input-text-light !default; $mbsc-mobiscroll-input-accent: $mbsc-input-accent-light !default; $mbsc-mobiscroll-input-border: $mbsc-input-border-light !default; $mbsc-mobiscroll-dark-input-background: $mbsc-input-background-dark !default; $mbsc-mobiscroll-dark-input-text: $mbsc-input-text-dark !default; $mbsc-mobiscroll-dark-input-accent: $mbsc-input-accent-dark !default; $mbsc-mobiscroll-dark-input-border: $mbsc-input-border-dark !default; $mbsc-mobiscroll-colors: map-merge($mbsc-mobiscroll-colors, ( // Colors map 'input-background': $mbsc-mobiscroll-input-background, 'input-text': $mbsc-mobiscroll-input-text, 'input-accent': $mbsc-mobiscroll-input-accent, 'input-border': $mbsc-mobiscroll-input-border, )); $mbsc-mobiscroll-dark-colors: map-merge($mbsc-mobiscroll-dark-colors, ( // Colors map 'input-background': $mbsc-mobiscroll-dark-input-background, 'input-text': $mbsc-mobiscroll-dark-input-text, 'input-accent': $mbsc-mobiscroll-dark-input-accent, 'input-border': $mbsc-mobiscroll-dark-input-border, )); @mixin mbsc-mobiscroll-input($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $text: map-get($params, 'text'); $bg-param: map-get($params, 'input-background'); $text-param: map-get($params, 'input-text'); $brd-param: map-get($params, 'input-border'); $acc-param: map-get($params, 'input-accent'); $err-param: map-get($params, 'form-error'); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $error: if($err-param, $err-param, $mbsc-mobiscroll-error); $input-base-color: ''; $input-text: ''; $input-icon-color: ''; $input-border-color: ''; $input-label-color: ''; $input-background: ''; $input-box-background: ''; $input-box-hover-background: ''; $input-box-focus-background: ''; // Light background @if (lightness($background) > 50%) { $input-base-color: darken($text, 27%); $input-text: rgba($input-base-color, .87); $input-border-color: rgba($input-base-color, .42); $input-icon-color: rgba($input-base-color, .54); $input-label-color: rgba($input-base-color, .6); $input-background: if($bg-param, $bg-param, $background); $input-box-background: if($bg-param, $bg-param, darken($background, 4%)); $input-box-hover-background: darken($input-box-background, 3%); $input-box-focus-background: darken($input-box-background, 7%); } // Dark background @else { $input-base-color: $text; $input-text: $input-base-color; $input-border-color: $input-base-color; $input-icon-color: $input-base-color; $input-label-color: rgba($input-base-color, .6); $input-background: if($bg-param, $bg-param, $background); $input-box-background: if($bg-param, $bg-param, lighten($background, 4%)); $input-box-hover-background: lighten($input-box-background, 3%); $input-box-focus-background: lighten($input-box-background, 7%); } $input-border-color: if($brd-param, $brd-param, $input-border-color); $input-text: if($text-param, $text-param, $input-text); $input-icon-color: if($text-param, $text-param, $input-icon-color); $input-label-color: if($text-param, $text-param, $input-label-color); .mbsc-#{$theme} { /* Form element */ &.mbsc-textfield { border-bottom-color: $input-border-color; color: $input-text; } &.mbsc-textfield.mbsc-hover { border-color: $input-text; } &.mbsc-textfield.mbsc-error { border-color: $error; } /* Icon */ &.mbsc-textfield-icon, &.mbsc-select-icon { color: $input-icon-color; } /* Ripple */ &.mbsc-textfield-ripple { background-color: $accent; } &.mbsc-textfield-ripple.mbsc-error { background-color: $error; } /* Label */ &.mbsc-label { color: $input-label-color; } &.mbsc-label-stacked.mbsc-focus, &.mbsc-label-floating.mbsc-focus { color: $accent; } &.mbsc-label.mbsc-error { color: $error; } /* Error message */ &.mbsc-error-message { color: $error; } /* Select */ &.mbsc-select { background: $input-background; } /* Box input ------------------------------------------------------------------------------- */ &.mbsc-textfield-box.mbsc-select, &.mbsc-textfield-inner-box { background: $input-box-background; } &.mbsc-textfield-box.mbsc-select.mbsc-hover, &.mbsc-textfield-inner-box.mbsc-hover { background: $input-box-hover-background; } &.mbsc-textfield-box.mbsc-select.mbsc-focus, &.mbsc-textfield-inner-box.mbsc-focus { background: $input-box-focus-background; } /* ----------------------------------------------------------------------------------------- */ /* Outline input --------------------------------------------------------------------------- */ &.mbsc-textfield-fieldset { border-color: $input-border-color; } &.mbsc-textfield-fieldset.mbsc-hover { border-color: $input-text; } &.mbsc-textfield-fieldset.mbsc-focus { border-color: $accent; } &.mbsc-textfield-fieldset.mbsc-error { border-color: $error; } &.mbsc-textfield-fieldset.disabled { border-color: $input-text; } /* ----------------------------------------------------------------------------------------- */ } } @if ($mbsc-mobiscroll-theme and $mbsc-input) { .mbsc-mobiscroll { /* Wrapper */ &.mbsc-textfield-wrapper { margin: 1.5em 1em; box-sizing: border-box; } /* Inner wrapper */ &.mbsc-textfield-inner.mbsc-disabled { opacity: .5; } /* Form element */ &.mbsc-textfield { display: block; width: 100%; height: 2.125em; background-color: transparent; border-bottom: 1px solid; font-size: 1em; transition: border-color .2s; } &.mbsc-textfield-has-icon-left { padding-left: 2em; } &.mbsc-textfield-has-icon-right { padding-right: 2em; } /* Icon */ &.mbsc-textfield-icon { top: .375em; } &.mbsc-textfield-icon-floating, &.mbsc-textfield-icon-stacked, &.mbsc-textfield-icon-outline { top: 1em; } /* Ripple */ .mbsc-textfield-ripple { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; transform: scaleX(0); transition: transform 180ms cubic-bezier(.4, 0, .2, 1); z-index: 2; } .mbsc-textfield-ripple-active { transform: scaleX(1); } /* Label */ &.mbsc-label { font-size: .75em; } &.mbsc-label-inline { line-height: 2em; font-size: 1em; } &.mbsc-label-inline.mbsc-ltr { padding-right: .5em; } &.mbsc-label-inline.mbsc-rtl { padding-left: .5em; } &.mbsc-label-floating { font-size: 1em; line-height: 1.5em; top: 1.125em; } &.mbsc-label-floating-active { transform: translateY(-1.125em) scale(.75); } &.mbsc-label.mbsc-disabled { opacity: .5; } /* Error message */ &.mbsc-error-message.mbsc-ltr { left: 0; } &.mbsc-error-message.mbsc-rtl { right: 0; } &.mbsc-error-message-has-icon-left.mbsc-ltr { left: 2.66667em; } &.mbsc-error-message-has-icon-right.mbsc-rtl { right: 2.66667em; } /* Underline input --------------------------------------------------------------------------- */ /* Form element */ &.mbsc-textfield-underline-stacked, &.mbsc-textfield-underline-floating { height: 3em; padding-top: .875em; } /* Icon */ &.mbsc-textfield-icon-underline { top: .25em; } &.mbsc-textfield-icon-underline.mbsc-textfield-icon-floating, &.mbsc-textfield-icon-underline.mbsc-textfield-icon-stacked { top: 1.125em; } /* Label */ &.mbsc-label-underline-inline { padding-top: 1px; } &.mbsc-label-underline-stacked-has-icon-left.mbsc-ltr { left: 2.66667em; } &.mbsc-label-underline-stacked-has-icon-right.mbsc-rtl { right: 2.66667em; } &.mbsc-label-underline-floating-has-icon-left.mbsc-ltr { left: 2em; } &.mbsc-label-underline-floating-has-icon-right.mbsc-rtl { right: 2em; } /* ------------------------------------------------------------------------------------------- */ /* Box input --------------------------------------------------------------------------------- */ /* Inner wrapper */ &.mbsc-textfield-box, &.mbsc-textfield-inner-box { border-radius: .25em .25em 0 0; } /* Form element */ &.mbsc-textfield-box { height: 2.25em; padding: 0 1em; } &.mbsc-textfield-box-stacked, &.mbsc-textfield-box-floating { height: 3.5em; padding-top: 1.25em; } &.mbsc-textfield-underline.mbsc-disabled { border-style: dotted; } /* Label */ &.mbsc-label-box-inline { padding-top: 1px; } &.mbsc-label-box-stacked { top: .666667em; } &.mbsc-label-box-floating { top: 1em; } &.mbsc-label-box-floating.mbsc-label-floating-active { transform: translateY(-.625em) scale(.75); } /* ------------------------------------------------------------------------------------------- */ /* Outline input ----------------------------------------------------------------------------- */ /* Inner wrapper */ &.mbsc-textfield-inner-outline { padding: 0 2px; } /* Form element */ &.mbsc-textfield-outline { height: 3.5em; padding: 2px 1em; border: 0; border-radius: 4px; } &.mbsc-textfield-fieldset { top: -.5em; border: 1px solid; border-radius: 4px; transition: border-color .2s; } &.mbsc-textfield-fieldset-has-icon-left { padding-left: 3em; } &.mbsc-textfield-fieldset-has-icon-right { padding-right: 3em; } &.mbsc-textfield-fieldset.mbsc-focus { border-width: 2px; } &.mbsc-textfield-legend { padding: 0; margin: 0; font-size: .75em; color: transparent; width: 0.01px; // Fraction needed for IE11 white-space: nowrap; } &.mbsc-textfield-legend-active { width: auto; padding: 0 .333334em; margin: 0 -.333334em; } /* Label */ &.mbsc-label-outline-inline { line-height: 3.375em; } &.mbsc-label-outline-stacked { top: -.5em; margin: 0 2px; // Compensate borders } &.mbsc-label-outline-floating { top: 1em; margin: 0 2px; // Compensate borders } &.mbsc-label-outline-floating.mbsc-label-floating-active { margin-top: -1px; transform: translateY(-1.5em) scale(.75); } /* Error message */ &.mbsc-error-message-outline { margin: 0 2px; // Compensate border } /* ------------------------------------------------------------------------------------------- */ /* Box & outline input common styles --------------------------------------------------------- */ /* Form element */ &.mbsc-textfield-outline-has-icon-left, &.mbsc-textfield-box-has-icon-left { padding-left: 3em; } &.mbsc-textfield-outline-has-icon-right, &.mbsc-textfield-box-has-icon-right { padding-right: 3em; } /* Icon */ &.mbsc-textfield-icon-outline-left, &.mbsc-textfield-icon-box-left { left: .75em; } &.mbsc-textfield-icon-outline-right, &.mbsc-textfield-icon-box-right { right: .75em; } /* Label */ &.mbsc-label-box-stacked.mbsc-ltr, &.mbsc-label-outline-stacked.mbsc-ltr { left: 1.333334em; } &.mbsc-label-box-stacked.mbsc-rtl, &.mbsc-label-outline-stacked.mbsc-rtl { right: 1.333334em; } &.mbsc-label-outline-stacked-has-icon-left.mbsc-ltr, &.mbsc-label-box-stacked-has-icon-left.mbsc-ltr { left: 4em; } &.mbsc-label-box-stacked-has-icon-right.mbsc-rtl, &.mbsc-label-outline-stacked-has-icon-right.mbsc-rtl { right: 4em; } &.mbsc-label-box-floating.mbsc-ltr, &.mbsc-label-outline-floating.mbsc-ltr { left: 1em; } &.mbsc-label-box-floating.mbsc-rtl, &.mbsc-label-outline-floating.mbsc-rtl { right: 1em; } &.mbsc-label-outline-floating-has-icon-left.mbsc-ltr, &.mbsc-label-box-floating-has-icon-left.mbsc-ltr { left: 3em; } &.mbsc-label-outline-floating-has-icon-left.mbsc-rtl, &.mbsc-label-box-floating-has-icon-left.mbsc-rtl { right: 1em; } &.mbsc-label-outline-floating-has-icon-right.mbsc-rtl, &.mbsc-label-box-floating-has-icon-right.mbsc-rtl { right: 3em; } /* Error message */ &.mbsc-error-message-box.mbsc-ltr, &.mbsc-error-message-outline.mbsc-ltr { left: 1.333334em; } &.mbsc-error-message-box.mbsc-rtl, &.mbsc-error-message-outline.mbsc-rtl { right: 1.333334em; } &.mbsc-error-message-box.mbsc-error-message-has-icon-left.mbsc-ltr, &.mbsc-error-message-outline.mbsc-error-message-has-icon-left.mbsc-ltr { left: 4em; } &.mbsc-error-message-box.mbsc-error-message-has-icon-right.mbsc-rtl, &.mbsc-error-message-outline.mbsc-error-message-has-icon-right.mbsc-rtl { right: 4em; } /* ------------------------------------------------------------------------------------------- */ /* Select */ &.mbsc-select.mbsc-ltr { padding-right: 3em; } &.mbsc-select.mbsc-rtl { padding-left: 3em; } &.mbsc-select.mbsc-textfield-has-icon-right.mbsc-ltr { padding-right: 4.5em; } &.mbsc-select.mbsc-textfield-has-icon-left.mbsc-rtl { padding-left: 4.5em; } &.mbsc-select.mbsc-textfield-underline-has-icon-right.mbsc-ltr { padding-right: 3.75em; } &.mbsc-select.mbsc-textfield-underline-has-icon-left.mbsc-rtl { padding-left: 3.75em; } /* Select icon */ &.mbsc-select-icon { top: .375em; } &.mbsc-select-icon.mbsc-ltr { right: .75em; } &.mbsc-select-icon.mbsc-rtl { left: .75em; } &.mbsc-select-icon-right.mbsc-ltr { right: 3em; } &.mbsc-select-icon-left.mbsc-rtl { left: 3em; } &.mbsc-select-icon-stacked, &.mbsc-select-icon-floating, &.mbsc-select-icon-outline { top: 1em; } &.mbsc-select-icon-underline { top: .25em; } &.mbsc-select-icon-underline.mbsc-ltr { right: 0; } &.mbsc-select-icon-underline.mbsc-rtl { left: 0; } &.mbsc-select-icon-underline.mbsc-select-icon-right.mbsc-ltr { right: 2.25em; } &.mbsc-select-icon-underline.mbsc-select-icon-left.mbsc-rtl { left: 2.25em; } &.mbsc-select-icon-underline.mbsc-select-icon-floating, &.mbsc-select-icon-underline.mbsc-select-icon-stacked { top: 1.125em; } /* Textarea */ &.mbsc-textarea { height: 1.875em; padding-bottom: .375em; } &.mbsc-textarea.mbsc-textfield-stacked, &.mbsc-textarea.mbsc-textfield-floating { padding-top: 0; } &.mbsc-textarea.mbsc-textfield-outline { height: 1.5em; padding-top: 0; padding-bottom: 0; } &.mbsc-textarea.mbsc-textfield-underline { padding-bottom: .3125em; } &.mbsc-textarea-inner.mbsc-textfield-inner-box { padding-top: .375em; } &.mbsc-textarea-inner.mbsc-textfield-inner-stacked, &.mbsc-textarea-inner.mbsc-textfield-inner-floating { padding-top: 1.625em; } &.mbsc-textarea-inner.mbsc-textfield-inner-outline { padding-top: 1em; padding-bottom: 1em; } &.mbsc-textarea-inner.mbsc-textfield-inner-underline { padding-top: .25em; } &.mbsc-textarea-inner.mbsc-textfield-inner-underline.mbsc-textfield-inner-stacked, &.mbsc-textarea-inner.mbsc-textfield-inner-underline.mbsc-textfield-inner-floating { padding-top: 1.125em; } } @include mbsc-mobiscroll-input('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-input('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } $mbsc-windows-input-background: $mbsc-input-background-light !default; $mbsc-windows-input-text: $mbsc-input-text-light !default; $mbsc-windows-input-accent: $mbsc-input-accent-light !default; $mbsc-windows-input-border: $mbsc-input-border-light !default; $mbsc-windows-dark-input-background: $mbsc-input-background-dark !default; $mbsc-windows-dark-input-text: $mbsc-input-text-dark !default; $mbsc-windows-dark-input-accent: $mbsc-input-accent-dark !default; $mbsc-windows-dark-input-border: $mbsc-input-border-dark !default; $mbsc-windows-colors: map-merge($mbsc-windows-colors, ( // Colors map 'input-background': $mbsc-windows-input-background, 'input-text': $mbsc-windows-input-text, 'input-accent': $mbsc-windows-input-accent, 'input-border': $mbsc-windows-input-border, )); $mbsc-windows-dark-colors: map-merge($mbsc-windows-dark-colors, ( // Colors map 'input-background': $mbsc-windows-dark-input-background, 'input-text': $mbsc-windows-dark-input-text, 'input-accent': $mbsc-windows-dark-input-accent, 'input-border': $mbsc-windows-dark-input-border, )); @mixin mbsc-windows-input($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'input-background'); $text-param: map-get($params, 'input-text'); $brd-param: map-get($params, 'input-border'); $acc-param: map-get($params, 'input-accent'); $err-param: map-get($params, 'form-error'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $error: if($err-param, $err-param, $mbsc-windows-error); $input-backgound: $background; $input-hover: $text; $input-border: ''; $input-disabled-background: ''; $input-disabled-color: ''; $input-tag-background: ''; // Light background @if (lightness($background) > 50%) { $input-border: lighten($text, 33%); $input-disabled-background: darken($background, 5%); $input-disabled-color: lighten($text, 42%); $input-tag-background: darken($background, 10%); } // Dark background @else { $input-border: darken($text, 33%); $input-disabled-background: lighten($background, 5%); $input-disabled-color: darken($text, 42%); $input-tag-background: lighten($background, 27%); } $input-border: if($brd-param, $brd-param, $input-border); .mbsc-#{$theme} { /* Wrapper */ &.mbsc-textfield-wrapper { color: $text; } &.mbsc-textfield-wrapper.mbsc-disabled { color: $input-disabled-color; } /* Form element */ &.mbsc-textfield { background: $input-backgound; color: $text; } &.mbsc-textfield-box, &.mbsc-textfield-outline { border-color: $input-border; } &.mbsc-textfield.mbsc-hover { border-color: $input-hover; } &.mbsc-textfield-box.mbsc-focus, &.mbsc-textfield-outline.mbsc-focus { border-color: $accent; box-shadow: 0 0 0 1px $accent inset; } &.mbsc-textfield.mbsc-disabled { background: $input-disabled-background; border-color: $input-disabled-background; } &.mbsc-textfield.mbsc-error { border-color: $error; } &.mbsc-textfield-box.mbsc-error.mbsc-focus, &.mbsc-textfield-outline.mbsc-error.mbsc-focus { box-shadow: 0 0 0 1px $error inset; } /* Error message */ &.mbsc-error-message { color: $error; } /* Label */ &.mbsc-label { color: $text; } /* Underline input --------------------------------------------------------------------------- */ &.mbsc-textfield-wrapper-underline { border-color: $input-border; } &.mbsc-textfield-wrapper-underline.mbsc-hover { border-color: $input-hover; } &.mbsc-textfield-wrapper-underline.mbsc-focus { border-color: $accent; box-shadow: 0 1px 0 0 $accent; } &.mbsc-textfield-wrapper-underline.mbsc-disabled { border-color: $input-disabled-background; } &.mbsc-textfield-wrapper-underline.mbsc-error { border-color: $error; } &.mbsc-textfield-wrapper-underline.mbsc-error.mbsc-focus { box-shadow: 0 1px 0 0 $error; } /* ----------------------------------------------------------------------------------------- */ /* Input tags */ &.mbsc-textfield-tag { background: $input-tag-background; } } } @if ($mbsc-windows-theme and $mbsc-input) { .mbsc-windows { /* Wrapper */ &.mbsc-textfield-wrapper { margin: 1em; } &.mbsc-textfield-wrapper-inline { margin: 1.75em 1em; } &.mbsc-textfield-wrapper-floating { padding-top: 1.75em; } /* Form element */ &.mbsc-textfield { height: 2em; padding: 0 .5em; border: 1px solid; border-radius: 2px; } /* Icons */ &.mbsc-textfield-icon { top: .4375em; width: 1.125em; height: 1.125em; line-height: 1.125em; margin: 0 1px; // For border } &.mbsc-textfield-has-icon-right { padding-right: 2em; } &.mbsc-textfield-has-icon-left { padding-left: 2em; } &.mbsc-textfield-icon-left { left: .4375em; } &.mbsc-textfield-icon-right { right: .4375em; } /* Error */ &.mbsc-error-message { font-size: .75em; } /* Label */ &.mbsc-label { line-height: 2em; font-size: .875em; font-weight: 600; } &.mbsc-label-inline { line-height: 2.285715em; } &.mbsc-label-floating { top: 2.142858em; } &.mbsc-label-stacked { position: static; } &.mbsc-label-floating.mbsc-ltr { transform: translateX(.571429em); } &.mbsc-label-floating.mbsc-rtl { transform: translateX(-.5em); } // TODO: check if simplify elsewhere too if there is a separate mbsc-label-{labeltype}-has-icon-{align} class? &.mbsc-label-underline-floating-has-icon-left.mbsc-ltr, &.mbsc-label-outline-floating-has-icon-left.mbsc-ltr, &.mbsc-label-box-floating-has-icon-left.mbsc-ltr { transform: translateX(2.285715em); } &.mbsc-label-underline-floating-has-icon-right.mbsc-rtl, &.mbsc-label-outline-floating-has-icon-right.mbsc-rtl, &.mbsc-label-box-floating-has-icon-right.mbsc-rtl { transform: translateX(-2.285715em); } &.mbsc-label.mbsc-label-floating-active { transform: translate(0, -2.142858em); } /* Underline input --------------------------------------------------------------------------- */ /* Wrapper */ &.mbsc-textfield-wrapper-underline { border-bottom: 1px solid; } /* Form element */ &.mbsc-textfield-underline { border: 0; border-radius: 0; } /* ------------------------------------------------------------------------------------------- */ /* Select */ &.mbsc-select.mbsc-ltr { padding-right: 2em; } &.mbsc-select.mbsc-rtl { padding-left: 2em; } &.mbsc-select.mbsc-textfield-has-icon-right.mbsc-ltr { padding-right: 3.125em; } &.mbsc-select.mbsc-textfield-has-icon-left.mbsc-rtl { padding-left: 3.125em; } /* Select icon */ &.mbsc-select-icon { top: .4375em; width: 1.125em; height: 1.125em; line-height: 1.125em; margin: 0 1px; // For border } &.mbsc-select-icon.mbsc-ltr { right: .4375em; } &.mbsc-select-icon.mbsc-rtl { left: .4375em; } &.mbsc-select-icon-right.mbsc-ltr { right: 2em; } &.mbsc-select-icon-left.mbsc-rtl { left: 2em; } /* Textarea */ &.mbsc-textarea { height: 3.5em; padding-top: .1875em; padding-bottom: .1875em; } /* Input tags */ &.mbsc-textfield.mbsc-textfield-tags { padding: .125em; min-height: 2em; } &.mbsc-textfield-tag { margin: .125em; } &.mbsc-textfield-tag.mbsc-ltr { margin-right: .125em; } &.mbsc-textfield-tag.mbsc-rtl { margin-left: .125em; } &.mbsc-textfield-tag-text { line-height: 1.571429em; // 22px } &.mbsc-textfield-tag-clear.mbsc-icon { width: 1.375em; height: 1.375em; border-width: .125em; } &.mbsc-textfield-tags-placeholder { padding: 0 .375em; line-height: 1.625em; } } @include mbsc-windows-input('windows', $mbsc-windows-colors); @include mbsc-windows-input('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-input { // Dummy animation to detect initial autofill in webkit browsers @keyframes autofill { from { opacity: 1; } to { opacity: 1; } } /* Wrapper */ .mbsc-textfield-wrapper { position: relative; display: block; margin: 0; z-index: 0; user-select: none; } .mbsc-textfield-wrapper-inline { display: flex; // align-items: center; } .mbsc-form-grid .mbsc-textfield-wrapper-box, .mbsc-form-grid .mbsc-textfield-wrapper-outline { margin: .75em 1em; } /* Inner wrapper */ .mbsc-textfield-inner { box-sizing: border-box; position: relative; display: block; } .mbsc-textfield-inner-inline { flex: 1 auto; } /* Form element */ .mbsc-textfield { display: block; width: 100%; font-size: 1em; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0; font-family: inherit; box-sizing: border-box; appearance: none; -webkit-appearance: none; } .mbsc-textfield:-webkit-autofill { animation-name: autofill; } .mbsc-textfield::-webkit-inner-spin-button { height: 2em; align-self: center; } .mbsc-textfield::-moz-placeholder { opacity: .5; color: inherit; } .mbsc-textfield::-webkit-input-placeholder { opacity: .5; color: inherit; } /* Floating label */ .mbsc-textfield-floating:-ms-input-placeholder { color: transparent; } .mbsc-textfield-floating::-moz-placeholder { opacity: 0; transition: opacity .2s; } .mbsc-textfield-floating::-webkit-input-placeholder { opacity: 0; transition: opacity .2s; } .mbsc-textfield-floating::-webkit-datetime-edit { color: transparent; } .mbsc-textfield-floating-active:-ms-input-placeholder { color: inherit; } .mbsc-textfield-floating-active::-moz-placeholder { opacity: .5; } .mbsc-textfield-floating-active::-webkit-input-placeholder { opacity: .5; } .mbsc-textfield-floating-active::-webkit-datetime-edit { color: inherit; } .mbsc-textfield-floating .mbsc-textfield-tags-placeholder { opacity: 0; transition: opacity .2s; } .mbsc-textfield-floating-active .mbsc-textfield-tags-placeholder { opacity: .5; } .mbsc-textfield-fieldset { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: 0; padding: 0 1em; pointer-events: none; } /* Icon */ .mbsc-textfield-icon { position: absolute; top: 0; text-align: center; } .mbsc-textfield-icon-left { left: 0; } .mbsc-textfield-icon-right { right: 0; } /* Label */ .mbsc-label { position: absolute; z-index: 1; top: 0; line-height: 1em; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; } .mbsc-label-inline { position: static; overflow: hidden; flex: 0 0 auto; width: 30%; max-width: 12.5em; // box-sizing: content-box; box-sizing: border-box; pointer-events: auto; } .mbsc-label-floating-animate { transition: transform .2s; } .mbsc-label-floating.mbsc-ltr { transform-origin: top left; } .mbsc-label-floating.mbsc-rtl { transform-origin: top right; } /* Error message */ .mbsc-error-message { position: absolute; top: 100%; font-size: .75em; line-height: 1.5em; } /* File input */ .mbsc-textfield-file { position: absolute; left: 0; opacity: 0; } /* Select */ .mbsc-select { cursor: pointer; } .mbsc-select-icon { position: absolute; text-align: center; pointer-events: none; } /* Textarea */ .mbsc-textarea { resize: none; overflow: hidden; line-height: 1.5em; } /* Password toggle */ .mbsc-toggle-icon:hover { cursor: pointer; } /* Input tags */ .mbsc-textfield.mbsc-textfield-hidden.mbsc-textarea { padding: 0; width: 100%; height: 100%; border: 0; position: absolute; z-index: -1; top: 0; left: 0; opacity: 0; } .mbsc-textfield.mbsc-textfield-tags.mbsc-textarea { display: block; overflow: auto; height: auto; max-height: 5.5em; } .mbsc-textfield-tag { display: inline-block; margin: .25em 0; line-height: normal; } .mbsc-textfield-tag.mbsc-ltr { margin-right: .5em; padding-left: .75em; } .mbsc-textfield-tag.mbsc-rtl { margin-left: .5em; padding-right: .75em; } .mbsc-textfield-tag-text { font-size: .875em; line-height: 1.857143em; // 26px } .mbsc-textfield-tag-clear.mbsc-icon { width: 1.625em; height: 1.625em; vertical-align: top; border: .25em solid transparent; box-sizing: border-box; cursor: pointer; } .mbsc-textfield-tags-placeholder { opacity: .5; line-height: 2.125em; } } @mixin mbsc-mobiscroll-popup($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-popup { background: $background; box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12); color: $text; } &.mbsc-popup-arrow { background: $background; box-shadow: 0 0 1em rgba(0, 0, 0, .2); } } } @if ($mbsc-mobiscroll-theme and $mbsc-popup) { @include mbsc-mobiscroll-popup('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-popup('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-popup($theme, $params) { $background: map-get($params, "background"); $text: map-get($params, "text"); $accent: map-get($params, "accent"); $is-dark: false; $button-hover: ''; $buttons-background: ''; $popup-border: ''; $popup-background: ''; @if (lightness($background) > 50%) { $button-hover: darken($background, 5%); $buttons-background: $background; // darken($background, 3%); $popup-border: darken($background, 17%); $popup-background: adjust-hue(darken(saturate($background, 24%), 1%), 240deg); } @else { $is-dark: true; $button-hover: lighten($background, 14%); $buttons-background: lighten($background, 16%); $popup-border: lighten($background, 20%); $popup-background: lighten($background, 11%); } .mbsc-#{$theme} { &.mbsc-popup-arrow { background: $popup-background; // border-color: $popup-border; box-shadow: 0 0 1em rgba(0, 0, 0, .2); } &.mbsc-popup-top, &.mbsc-popup-bottom { border-color: $popup-border; } &.mbsc-popup-body { background: $popup-background; // border-color: $popup-border; color: $text; } &.mbsc-popup-body-round, &.mbsc-popup-body-center, &.mbsc-popup-body-anchored { box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12); } &.mbsc-popup-header-center { border-color: $popup-border; } &.mbsc-popup-buttons, &.mbsc-popup-header-no-buttons { border-color: $popup-border; } &.mbsc-popup-buttons-bottom, &.mbsc-popup-buttons-top { background: $buttons-background; } @if ($is-dark) { &.mbsc-popup-buttons-anchored { background: $buttons-background; } } &.mbsc-popup-button-flex.mbsc-button-flat.mbsc-font { border-color: $popup-border; } &.mbsc-popup-button-flex.mbsc-font.mbsc-hover, &.mbsc-popup-button-flex.mbsc-font.mbsc-focus { background: $button-hover; } &.mbsc-popup-button-flex.mbsc-font.mbsc-active { background: $popup-border; } &.mbsc-popup-button-flex.mbsc-button.mbsc-disabled { color: rgba($accent, .2); } } } @if ($mbsc-ios-theme and $mbsc-popup) { .mbsc-ios { &.mbsc-popup-wrapper-bottom-full { padding-top: 1em; } &.mbsc-popup-wrapper-top-full { padding-bottom: 1em; } // &.mbsc-popup-overlay { // background: rgba(0, 0, 0, .2); // } &.mbsc-popup-top { border-bottom: 1px solid; } &.mbsc-popup-bottom { border-top: 1px solid; } &.mbsc-popup-body-center { border-radius: .9375em; } &.mbsc-popup-body-bottom-full { border-radius: .75em .75em 0 0; } &.mbsc-popup-body-top-full { border-radius: 0 0 .75em .75em; } &.mbsc-popup-body-anchored { border-radius: .9375em; } &.mbsc-popup-arrow { border-radius: 0 .375em; } &.mbsc-popup-header { position: absolute; z-index: 1; top: 0; right: 0; left: 0; line-height: 1.25em; padding: .75em 4.375em; font-weight: bold; text-align: center; } &.mbsc-popup-header-no-buttons { position: relative; border-bottom: 1px solid; } &.mbsc-popup-header-center { position: relative; padding: .75em .5em; border-bottom: 1px solid; } &.mbsc-popup-top-full .mbsc-popup-header, &.mbsc-popup-bottom-full .mbsc-popup-header { padding: 1.125em 4.375em; } &.mbsc-popup-buttons { order: -1; border-bottom: 1px solid; } &.mbsc-popup-buttons.mbsc-ltr { text-align: right; } &.mbsc-popup-buttons.mbsc-rtl { text-align: left; } &.mbsc-popup-button.mbsc-font { // line-height: 2.75em; margin-top: .25em; margin-bottom: .25em; z-index: 2; } &.mbsc-popup-button-primary { font-weight: bold; } &.mbsc-popup-button-close.mbsc-ltr { float: left; } &.mbsc-popup-button-close.mbsc-rtl { float: right; } &.mbsc-popup-buttons-anchored, &.mbsc-popup-buttons-top, &.mbsc-popup-buttons-bottom { padding: 0 .25em; } &.mbsc-popup-buttons-top-full, &.mbsc-popup-buttons-bottom-full { padding: .375em .25em; } /* Button styling for centered popup and desktop styled top/bottom popup */ &.mbsc-popup-buttons-flex { order: 0; border: 0; padding: 0; display: flex; } &.mbsc-popup-buttons-flex.mbsc-popup-buttons { background: none; } &.mbsc-popup-button-flex.mbsc-font { flex: 1 1 100%; display: block; } &.mbsc-popup-button-flex.mbsc-font.mbsc-button { opacity: 1; margin-top: .5em; margin-bottom: .5em; } &.mbsc-popup-button-flex.mbsc-font.mbsc-button-flat { background: none; border-top: 1px solid; border-radius: 0; margin: 0; line-height: 2.75em; } &.mbsc-popup-button-flex.mbsc-button-flat.mbsc-ltr { border-right-style: solid; border-right-width: 1px; } &.mbsc-popup-button-flex.mbsc-button-flat.mbsc-rtl { border-left-style: solid; border-left-width: 1px; } &.mbsc-popup-button-flex.mbsc-button-flat:last-child { border-left: 0; border-right: 0; } /* Desktop styling */ &.mbsc-popup-body-round { border-radius: .9375em; } &.mbsc-popup-pointer { .mbsc-popup-body-round { border-radius: .5em; } } &.mbsc-popup-round { .mbsc-popup { border: 0; } // .mbsc-popup-body-bottom.mbsc-popup-short, .mbsc-popup-body-bottom-full { border-radius: .75em .75em 0 0; } // .mbsc-popup-body-top.mbsc-popup-short, .mbsc-popup-body-top-full { border-radius: 0 0 .75em .75em; } } } @include mbsc-ios-popup('ios', $mbsc-ios-colors); @include mbsc-ios-popup('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-popup($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $popup-background: ''; @if (lightness($background) > 50%) { $popup-background: $background; } @else { $popup-background: lighten($background, 19%); } .mbsc-#{$theme} { &.mbsc-popup-body { background: $popup-background; box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12); color: $text; } &.mbsc-popup-arrow { background: $popup-background; box-shadow: 0 0 1em rgba(0, 0, 0, .2); } &.mbsc-popup-button.mbsc-font { color: $accent; } } } @if ($mbsc-material-theme and $mbsc-popup) { .mbsc-material { &.mbsc-popup-body-center, &.mbsc-popup-body-anchored, &.mbsc-popup-body-round { border-radius: .25em; } &.mbsc-popup-header { font-size: 1.25em; font-weight: 500; padding: .8em .8em 0 .8em; line-height: 1.4em; } &.mbsc-popup-buttons { padding: .5em; } &.mbsc-popup-buttons.mbsc-ltr { text-align: right; } &.mbsc-popup-buttons.mbsc-rtl { text-align: right; } &.mbsc-popup-button.mbsc-button-flat { margin-left: 0; margin-right: 0; } &.mbsc-popup-button.mbsc-font { margin-top: 0; margin-bottom: 0; font-weight: 500; font-size: .9375em; } &.mbsc-popup-round { .mbsc-popup-body-bottom-full { border-radius: .25em .25em 0 0; } .mbsc-popup-body-top-full { border-radius: 0 0 .25em .25em; } } } @include mbsc-material-popup('material', $mbsc-material-colors); @include mbsc-material-popup('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-popup($theme, $params) { $background: map-get($params, "background"); $text: map-get($params, "text"); $accent: map-get($params, "accent"); $border: ''; @if (lightness($background) > 50%) { $border: darken($background, 10%); } @else { $border: lighten($background, 10%); } .mbsc-#{$theme} { &.mbsc-popup { background: $background; border-color: $border; box-shadow: rgba(0, 0, 0, 0.133) 0 6px 14px 0, rgba(0, 0, 0, 0.11) 0 1px 4px 0; color: $text; } &.mbsc-popup-arrow { background: $background; border-color: $border; } &.mbsc-popup-header, &.mbsc-popup-buttons { border-color: $border; } } } @if ($mbsc-windows-theme and $mbsc-popup) { .mbsc-windows { &.mbsc-popup { border: 1px solid; } &.mbsc-popup-anchored-top { margin-top: -.75em; } &.mbsc-popup-anchored-bottom { margin-top: .75em; } &.mbsc-popup-arrow { width: 1em; height: 1em; border: 1px solid; } &.mbsc-popup-arrow-bottom, &.mbsc-popup-arrow-top { margin-left: -.5em; } &.mbsc-popup-arrow-left, &.mbsc-popup-arrow-right { margin-top: -.5em; } &.mbsc-popup-arrow-bottom { top: 1.5em; } &.mbsc-popup-arrow-top { bottom: 1.5em; } &.mbsc-popup-arrow-left { right: 1.5em; } &.mbsc-popup-arrow-right { left: 1.5em; } &.mbsc-popup-header { padding: .5em; font-weight: bold; text-align: center; border-bottom: 1px solid; } &.mbsc-popup-buttons { display: flex; flex-direction: row-reverse; border-top: 1px solid; } &.mbsc-popup-button.mbsc-font { flex: 1 1; padding-top: .25em; padding-bottom: .25em; } &.mbsc-popup-button.mbsc-button-flat { margin: 0; } } @include mbsc-windows-popup('windows', $mbsc-windows-colors); @include mbsc-windows-popup('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-popup { @keyframes mbsc-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes mbsc-fade-out { from { opacity: 1; } to { opacity: 0; } } @keyframes mbsc-pop-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } } @keyframes mbsc-pop-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.8); } } @keyframes mbsc-slide-up-in { from { transform: translateY(100%); } to { transform: translateY(0); } } @keyframes mbsc-slide-up-out { from { transform: translateY(0); } to { transform: translateY(100%); } } @keyframes mbsc-slide-down-in { from { transform: translateY(-100%); } to { transform: translateY(0); } } @keyframes mbsc-slide-down-out { from { transform: translateY(0); } to { transform: translateY(-100%); } } .mbsc-popup-open-ios { overflow: hidden; position: absolute; top: 0; bottom: 0; left: 0; right: 0; height: auto; } .mbsc-popup-ctx { position: relative; --mbsc-safe-top: 0; --mbsc-safe-right: 0; --mbsc-safe-bottom: 0; --mbsc-safe-left: 0; } .mbsc-popup-limits { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; } .mbsc-popup-limits-anchored, .mbsc-popup-limits-center { margin: 1em; } .mbsc-popup-wrapper { z-index: 99998; user-select: none; } .mbsc-popup, .mbsc-popup-wrapper { box-sizing: border-box; } .mbsc-popup-wrapper { position: fixed; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; display: flex; justify-content: center; border: 0 solid transparent; } .mbsc-popup-wrapper-ctx { position: absolute; right: auto; bottom: auto; width: 100%; height: 100%; overflow: hidden; } .mbsc-popup-wrapper-center { padding: 1em; align-items: center; border-width: var(--mbsc-safe-top) var(--mbsc-safe-right) var(--mbsc-safe-bottom) var(--mbsc-safe-left); } .mbsc-popup-wrapper-top { align-items: flex-start; border-bottom: var(--mbsc-safe-bottom) solid transparent; } .mbsc-popup-wrapper-bottom { align-items: flex-end; border-top-width: var(--mbsc-safe-top); } .mbsc-popup-wrapper-anchored { border-width: 0 var(--mbsc-safe-right) var(--mbsc-safe-bottom) var(--mbsc-safe-left); } .mbsc-popup-hidden { opacity: 0; } .mbsc-popup-overlay { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; left: 0; margin: -10em; pointer-events: auto; background: rgba(0, 0, 0, .5); transform: translateZ(0); } .mbsc-popup-overlay-in { opacity: 1; animation: mbsc-fade-in 150ms cubic-bezier(0.0, 0.0, 0.2, 1); } .mbsc-popup-overlay-out { opacity: 0; animation: mbsc-fade-out 75ms cubic-bezier(0.4, 0.0, 1, 1); } .mbsc-popup { display: flex; flex-direction: column; max-height: 100%; min-width: 12em; position: relative; z-index: 2; pointer-events: auto; text-shadow: none; user-select: none; } .mbsc-popup-center { min-width: 16em; } .mbsc-popup-bottom { width: 100%; bottom: 0; } .mbsc-popup-top { width: 100%; top: 0; } .mbsc-popup-anchored { position: absolute; // max-width: calc(100% - 16px); } // .mbsc-popup-anchored-top { // margin-top: -1em; // } // .mbsc-popup-anchored-bottom { // margin-top: 1em; // } .mbsc-popup-anchored-left { margin-left: -1em; } .mbsc-popup-anchored-right { margin-left: 1em; } .mbsc-popup-arrow-wrapper { position: absolute; z-index: 1; overflow: hidden; pointer-events: none; } .mbsc-popup-arrow-wrapper-top, .mbsc-popup-arrow-wrapper-bottom { left: 0; right: 0; height: 2em; } .mbsc-popup-arrow-wrapper-left, .mbsc-popup-arrow-wrapper-right { top: 0; bottom: 0; width: 2em; } .mbsc-popup-arrow-wrapper-top { top: 100%; } .mbsc-popup-arrow-wrapper-bottom { bottom: 100%; } .mbsc-popup-arrow-wrapper-left { left: 100%; } .mbsc-popup-arrow-wrapper-right { right: 100%; } .mbsc-popup-arrow { position: absolute; box-sizing: border-box; width: 1.5em; height: 1.5em; pointer-events: auto; } .mbsc-popup-arrow-top { bottom: 1.25em; } .mbsc-popup-arrow-bottom { top: 1.25em; } .mbsc-popup-arrow-top, .mbsc-popup-arrow-bottom { left: 50%; margin-left: -.75em; transform: rotate(-45deg); } .mbsc-popup-arrow-left { right: 1.25em; } .mbsc-popup-arrow-right { left: 1.25em; } .mbsc-popup-arrow-left, .mbsc-popup-arrow-right { top: 50%; margin-top: -.75em; transform: rotate(45deg); } .mbsc-popup-focus { outline: 0; } .mbsc-popup-body { display: flex; flex-direction: column; overflow: hidden; transform: translateZ(0); flex: 1 1 auto; } .mbsc-popup-body-top { padding-top: var(--mbsc-safe-top); } .mbsc-popup-body-bottom { padding-bottom: var(--mbsc-safe-bottom); } .mbsc-popup-body-top, .mbsc-popup-body-bottom { padding-left: var(--mbsc-safe-left); padding-right: var(--mbsc-safe-right); } .mbsc-popup-body-round { padding: 0; } .mbsc-popup-header { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; } .mbsc-popup-content { flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch; } .mbsc-popup-padding { padding: 1em; } .mbsc-popup-buttons { flex: none; } /* Animations */ .mbsc-popup-pop-in { opacity: 1; animation: mbsc-pop-in 150ms cubic-bezier(0.0, 0.0, 0.2, 1); } .mbsc-popup-pop-out { opacity: 0; animation: mbsc-pop-out 75ms cubic-bezier(0.4, 0.0, 1, 1); } .mbsc-popup-slide-up-in { animation: mbsc-slide-up-in 250ms cubic-bezier(0.0, 0.0, 0.2, 1); } .mbsc-popup-slide-up-out { animation: mbsc-slide-up-out 200ms cubic-bezier(0.4, 0.0, 1, 1); } .mbsc-popup-slide-down-in { animation: mbsc-slide-down-in 250ms cubic-bezier(0.0, 0.0, 0.2, 1); } .mbsc-popup-slide-down-out { animation: mbsc-slide-down-out 200ms cubic-bezier(0.4, 0.0, 1, 1); } /* Desktop styling */ .mbsc-popup-pointer { &.mbsc-picker .mbsc-popup-overlay, .mbsc-popup-overlay-anchored { background: none; } } .mbsc-popup-round { .mbsc-popup-slide-up-in { animation-name: mbsc-slide-up-in, mbsc-fade-in; } .mbsc-popup-slide-up-out { animation-name: mbsc-slide-up-out, mbsc-fade-out; } .mbsc-popup-slide-down-in { animation-name: mbsc-slide-down-in, mbsc-fade-in; } .mbsc-popup-slide-down-out { animation-name: mbsc-slide-down-out, mbsc-fade-out; } .mbsc-popup-top, .mbsc-popup-bottom { width: auto; margin-top: 3em; margin-bottom: 3em; } // .mbsc-popup-short { // margin-top: 0; // margin-bottom: 0; // } } } @mixin mbsc-ios-notifications($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $border-color: ''; // Light background @if (lightness($background) > 50%) { $border-color: darken($background, 17%); } // Dark background @else { $border-color: lighten($background, 20%); } .mbsc-#{$theme} { .mbsc-toast-background { background: rgba($text, .8); color: get-contrast-color($text); } &.mbsc-prompt-input { border-color: $border-color; } &.mbsc-color-none .mbsc-snackbar-button.mbsc-button { color: $accent; } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { .mbsc-toast-message { line-height: 1.857143em; // 26px / 14px based border-radius: 1.785715em; // 25px / 14px based } .mbsc-alert-title { margin: 0.277778em 0; font-size: 1.125em; text-align: center; } .mbsc-alert-message { margin: 0.357143em 0; font-size: .875em; text-align: center; } &.mbsc-prompt-input.mbsc-font { margin-top: 1em; border-radius: .5em; border-width: 1px; border-style: solid; } &.mbsc-prompt-input::after, &.mbsc-prompt-input::before { display: none; } &.mbsc-prompt-input .mbsc-textfield { height: 1.75em; line-height: 1.75em; padding: 0 .25em; } &.mbsc-prompt-input .mbsc-label { height: 1.75em; line-height: 1.75em; padding-left: .25em; } &.mbsc-primary .mbsc-toast-background { background: $mbsc-ios-primary; color: get-contrast-color($mbsc-ios-primary); } &.mbsc-secondary .mbsc-toast-background { background: $mbsc-ios-secondary; color: get-contrast-color($mbsc-ios-secondary); } &.mbsc-success .mbsc-toast-background { background: $mbsc-ios-success; color: get-contrast-color($mbsc-ios-success); } &.mbsc-danger .mbsc-toast-background { background: $mbsc-ios-danger; color: get-contrast-color($mbsc-ios-danger); } &.mbsc-warning .mbsc-toast-background { background: $mbsc-ios-warning; color: get-contrast-color($mbsc-ios-warning); } &.mbsc-info .mbsc-toast-background { background: $mbsc-ios-info; color: get-contrast-color($mbsc-ios-info); } } @include mbsc-ios-notifications('ios', $mbsc-ios-colors); @include mbsc-ios-notifications('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-notifications($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-color-none .mbsc-snackbar-button.mbsc-button { color: lighten($accent, 10%); } } } @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { .mbsc-toast-message { border-radius: 1.571429em; } .mbsc-toast-background { background: #444; color: #fff; } &.mbsc-prompt-input.mbsc-font { margin: 1.5em 0 0 0; } &.mbsc-primary .mbsc-toast-background { background: $mbsc-material-primary; color: get-contrast-color($mbsc-material-primary); } &.mbsc-secondary .mbsc-toast-background { background: $mbsc-material-secondary; color: get-contrast-color($mbsc-material-secondary); } &.mbsc-success .mbsc-toast-background { background: $mbsc-material-success; color: get-contrast-color($mbsc-material-success); } &.mbsc-danger .mbsc-toast-background { background: $mbsc-material-danger; color: get-contrast-color($mbsc-material-danger); } &.mbsc-warning .mbsc-toast-background { background: $mbsc-material-warning; color: get-contrast-color($mbsc-material-warning); } &.mbsc-info .mbsc-toast-background { background: $mbsc-material-info; color: get-contrast-color($mbsc-material-info); } } @include mbsc-material-notifications('material', $mbsc-material-colors); @include mbsc-material-notifications('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-notifications($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { .mbsc-toast-background { background: $text; color: get-contrast-color($text); } &.mbsc-color-none .mbsc-snackbar-button.mbsc-button { color: lighten($accent, 10%); } } } @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { &.mbsc-prompt-input.mbsc-font { margin: 1em 0 0 0; } &.mbsc-primary .mbsc-toast-background { background: $mbsc-windows-primary; color: get-contrast-color($mbsc-windows-primary); } &.mbsc-secondary .mbsc-toast-background { background: $mbsc-windows-secondary; color: get-contrast-color($mbsc-windows-secondary); } &.mbsc-success .mbsc-toast-background { background: $mbsc-windows-success; color: get-contrast-color($mbsc-windows-success); } &.mbsc-danger .mbsc-toast-background { background: $mbsc-windows-danger; color: get-contrast-color($mbsc-windows-danger); } &.mbsc-warning .mbsc-toast-background { background: $mbsc-windows-warning; color: get-contrast-color($mbsc-windows-warning); } &.mbsc-info .mbsc-toast-background { background: $mbsc-windows-info; color: get-contrast-color($mbsc-windows-info); } } @include mbsc-windows-notifications('windows', $mbsc-windows-colors); @include mbsc-windows-notifications('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { /* Toast */ .mbsc-toast.mbsc-font .mbsc-popup-body, .mbsc-toast.mbsc-font .mbsc-popup, .mbsc-snackbar.mbsc-font .mbsc-popup-body, .mbsc-snackbar.mbsc-font .mbsc-popup { background: none; box-shadow: none; border: 0; border-radius: 0; margin: 0; pointer-events: none; } .mbsc-toast.mbsc-font .mbsc-popup-content { text-align: center; padding-bottom: 4em; } .mbsc-toast-message { display: inline-block; min-width: 10em; max-width: 50em; padding: .857143em 2em; font-size: .875em; line-height: 1.428572; } /* Snackbar */ .mbsc-snackbar-cont { display: flex; align-items: center; min-width: 18em; max-width: 36em; margin: 0 auto; padding: .5em; pointer-events: auto; } .mbsc-snackbar-message { flex: 1; padding: .5em 1em; font-size: .875em; // 14px line-height: 1.571429em; // 22px } .mbsc-snackbar-button.mbsc-button.mbsc-font { margin: 0; color: #fff; } /* Alert, Confirm, Prompt*/ .mbsc-alert-content { max-width: 20em; } .mbsc-alert-title { margin: 0 0 1em 0; padding: 0; font-size: 1.428572em; font-weight: bold; } .mbsc-alert-message { margin: 1em 0; padding: 0; font-size: 1em; } } // Theme specific variables - inherited from global variables // background $mbsc-ios-page-background: $mbsc-page-background-light !default; $mbsc-ios-dark-page-background: $mbsc-page-background-dark !default; // text $mbsc-ios-page-text: $mbsc-page-text-light !default; $mbsc-ios-dark-page-text: $mbsc-page-text-dark !default; // add variables to color maps $mbsc-ios-colors: map-merge($mbsc-ios-colors, ('page-background': $mbsc-ios-page-background, 'page-text': $mbsc-ios-page-text, )); $mbsc-ios-dark-colors: map-merge($mbsc-ios-dark-colors, ('page-background': $mbsc-ios-dark-page-background, 'page-text': $mbsc-ios-dark-page-text, )); @mixin mbsc-ios-page($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $title-text: ''; @if (lightness($background) > 50%) { // $background: darken($background, 2%); $background: adjust-hue(darken(saturate($background, 24%), 1%), 240deg); $title-text: lighten($text, 43%); } @else { // $background: adjust-hue(lighten(desaturate($background, 19%), 10%), 240deg); // $background: lighten($background, 2%); $title-text: darken($text, 43%); } // get custom params $text-param: map-get($params, 'page-text'); $background-param: map-get($params, 'page-background'); // overwrite params with custom variables $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background-param), $text)); .mbsc-#{$theme} { &.mbsc-page { background: $background; color: $text; } .mbsc-block-title, .mbsc-form-group-title { color: $title-text; } a { color: $accent; } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { .mbsc-block-title, .mbsc-form-group-title { padding: .5em 1.333334em; font-size: .75em; line-height: 1.5em; text-transform: uppercase; } } @include mbsc-ios-page('ios', $mbsc-ios-colors); @include mbsc-ios-page('ios-dark', $mbsc-ios-dark-colors); } // Theme specific variables - inherited from global variables // background $mbsc-material-page-background: $mbsc-page-background-light !default; $mbsc-material-dark-page-background: $mbsc-page-background-dark !default; // text $mbsc-material-page-text: $mbsc-page-text-light !default; $mbsc-material-dark-page-text: $mbsc-page-text-dark !default; // add variablest to color maps $mbsc-material-colors: map-merge($mbsc-material-colors, ('page-background': $mbsc-material-page-background, 'page-text': $mbsc-material-page-text, )); $mbsc-material-dark-colors: map-merge($mbsc-material-dark-colors, ('page-background': $mbsc-material-dark-page-background, 'page-text': $mbsc-material-dark-page-text, )); @mixin mbsc-material-page($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-page { background-color: $background; color: $text; } .mbsc-block-title, .mbsc-form-group-title { color: $accent; } a { color: $accent; } } } @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { .mbsc-block-title, .mbsc-form-group-title { padding: .666667em 1.333334em; font-size: .75em; text-transform: uppercase; } } @include mbsc-material-page('material', $mbsc-material-colors); @include mbsc-material-page('material-dark', $mbsc-material-dark-colors); } // Theme specific variables - inherited from global variables // background $mbsc-mobiscroll-page-background: $mbsc-page-background-light !default; $mbsc-mobiscroll-dark-page-background: $mbsc-page-background-dark !default; // text $mbsc-mobiscroll-page-text: $mbsc-page-text-light !default; $mbsc-mobiscroll-dark-page-text: $mbsc-page-text-dark !default; // add variables to color maps $mbsc-mobiscroll-colors: map-merge($mbsc-mobiscroll-colors, ('page-background': $mbsc-mobiscroll-page-background, 'page-text': $mbsc-mobiscroll-page-text, )); $mbsc-mobiscroll-dark-colors: map-merge($mbsc-mobiscroll-dark-colors, ('page-background': $mbsc-mobiscroll-dark-page-background, 'page-text': $mbsc-mobiscroll-dark-page-text, )); @mixin mbsc-mobiscroll-page($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-page { background-color: $background; color: $text; } .mbsc-block-title, .mbsc-form-group-title { color: $accent; } a { color: $accent; } } } @if ($mbsc-mobiscroll-theme and $mbsc-forms) { .mbsc-mobiscroll { .mbsc-block-title, .mbsc-form-group-title { padding: .666667em 1.333334em; font-size: .75em; text-transform: uppercase; } } @include mbsc-mobiscroll-page('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-page('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } // Theme specific variables - inherited from global variables // background $mbsc-windows-page-background: $mbsc-page-background-light !default; $mbsc-windows-dark-page-background: $mbsc-page-background-dark !default; // text $mbsc-windows-page-text: $mbsc-page-text-light !default; $mbsc-windows-dark-page-text: $mbsc-page-text-dark !default; // add variables to color maps $mbsc-windows-colors: map-merge($mbsc-windows-colors, ( // 'page-background': $mbsc-windows-page-background, 'page-text': $mbsc-windows-page-text, )); $mbsc-windows-dark-colors: map-merge($mbsc-windows-dark-colors, ( // 'page-background': $mbsc-windows-dark-page-background, 'page-text': $mbsc-windows-dark-page-text, )); @mixin mbsc-windows-page($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-page { background-color: $background; color: $text; } .mbsc-block-title, .mbsc-form-group-title { color: $text; } a { color: $accent; } } } @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { .mbsc-block-title, .mbsc-form-group-title { font-size: 1.5em; padding: 0 .666667em; line-height: 2em; } } @include mbsc-windows-page('windows', $mbsc-windows-colors); @include mbsc-windows-page('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { .mbsc-page { display: block; min-height: 100%; padding: var(--mbsc-safe-top) var(--mbsc-safe-right) var(--mbsc-safe-bottom) var(--mbsc-safe-left); } .mbsc-page:before, .mbsc-page:after { content: ''; display: table; } /* Block */ .mbsc-block, .mbsc-form-group { margin: 1.5em 0; } .mbsc-form-group-inset { margin: 2em 1.5em; } .mbsc-form-grid .mbsc-form-group-title { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } /* Typography */ .mbsc-page h1, .mbsc-page h2, .mbsc-page h3, .mbsc-page h4, .mbsc-page h5, .mbsc-page h6, .mbsc-h1, .mbsc-h2, .mbsc-h3, .mbsc-h4, .mbsc-h5, .mbsc-h6 { margin: 0; padding: 0; color: inherit; font-weight: normal; font-family: inherit; } .mbsc-page p, .mbsc-p { margin: 1em 0; padding: 0; line-height: 1.5; } .mbsc-page a, .mbsc-a { text-decoration: none; } .mbsc-page a:hover, .mbsc-a:hover { text-decoration: underline; } .mbsc-page a.mbsc-btn:hover, .mbsc-a.mbsc-btn:hover { text-decoration: none; } .mbsc-page h1, .mbsc-h1 { margin: .347826em 0; font-size: 2.875em; } .mbsc-page h2, .mbsc-h2 { margin: .470588em 0; font-size: 2.125em; } .mbsc-page h3, .mbsc-h3 { margin: .666666em 0; font-size: 1.5em; } .mbsc-page h4, .mbsc-h4 { margin: .8em 0; font-size: 1.25em; } .mbsc-page h5, .mbsc-h5 { margin: 1.066666em 0; font-size: .9375em; } .mbsc-page h6, .mbsc-h6 { margin: 1.333333em 0; font-size: .75em; } /* Padding, margin */ .mbsc-padding { padding: 1em; } .mbsc-padding > p:first-child { margin-top: 0; } .mbsc-padding > p:last-child { margin-bottom: 0; } .mbsc-margin { margin: 1em 0; } .mbsc-margin:first-child { margin-top: 0; } .mbsc-margin:last-child { margin-bottom: 0; } /* Lists */ .mbsc-page ul, .mbsc-page ol, .mbsc-ul, .mbsc-ol { padding: 0; margin: 1em 0 1em 1.25em; line-height: 1.5; } .mbsc-page ul ul, .mbsc-page ol ol, .mbsc-ul .mbsc-ul, .mbsc-ol .mbsc-ol { margin: 0 0 0 1.25em; } /* Font sizes */ .mbsc-txt-xs { font-size: .625em } .mbsc-txt-s { font-size: .75em; } .mbsc-txt-m { font-size: 1.25em; } .mbsc-txt-l { font-size: 1.5em; } .mbsc-txt-xl { font-size: 2em; } .mbsc-txt-muted { opacity: .6; } /* Line heights */ .mbsc-line-height-xs { line-height: 1; } .mbsc-line-height-s { line-height: 1.25; } .mbsc-line-height-m { line-height: 1.5; } .mbsc-line-height-l { line-height: 1.75; } .mbsc-line-height-xl { line-height: 2; } /* Font weights */ .mbsc-ultra-bold { font-weight: 900; } .mbsc-bold { font-weight: bold; } .mbsc-medium { font-weight: 500; } .mbsc-light { font-weight: 300; } .mbsc-thin { font-weight: 100; } .mbsc-italic { font-style: italic; } /* Text align */ .mbsc-align-left { text-align: left; } .mbsc-align-right { text-align: right; } .mbsc-align-center { text-align: center; } .mbsc-align-justify { text-align: justify; } /* Float */ .mbsc-pull-right { float: right; } .mbsc-pull-left { float: left; } /* Image section */ .mbsc-media-fluid { display: block; width: 100%; } .mbsc-img-thumbnail { width: 6em; height: 6em; margin: 1em; } /* Avatar image */ .mbsc-avatar { width: 2.5em; height: 2.5em; padding: 0; border-radius: 1.25em; } /* Note */ .mbsc-note { position: relative; padding: .75em 1.25em; margin: 1em; border: 1px solid transparent; font-size: .875em; } @media (max-width: 600px) { .mbsc-note { text-align: center; } } } @mixin mbsc-mobiscroll-radio($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $ac-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $accent: if($ac-param, $ac-param, $accent); $input-disabled: ''; @if (lightness($background) > 50%) { $input-disabled: darken($background, 13%); } @else { $input-disabled: lighten($background, 17%); } .mbsc-#{$theme} { &.mbsc-radio-box { color: $accent; } &.mbsc-radio-box.mbsc-disabled { color: $input-disabled; } } } @if ($mbsc-mobiscroll-theme and $mbsc-forms) { .mbsc-mobiscroll { &.mbsc-radio-left { padding: 1em 1em 1em 3.125em; } &.mbsc-radio-right { padding: 1em 3.125em 1em 1em; } &.mbsc-radio-box { border: .125em solid currentColor; } &.mbsc-radio-box-left { left: 1em; } &.mbsc-radio-box-right { right: 1em; } &.mbsc-radio-box:after { width: .5em; height: .5em; margin-top: -.25em; margin-left: -.25em; border-radius: .625em; transform: scale(0); transition: transform .1s ease-out; background: currentColor; } &.mbsc-radio-box.mbsc-checked:after { transform: scale(1); } /* Color presets */ &.mbsc-radio-box.mbsc-radio-box-primary { color: $mbsc-mobiscroll-primary; } &.mbsc-radio-box.mbsc-radio-box-secondary { color: $mbsc-mobiscroll-secondary; } &.mbsc-radio-box.mbsc-radio-box-success { color: $mbsc-mobiscroll-success; } &.mbsc-radio-box.mbsc-radio-box-danger { color: $mbsc-mobiscroll-danger; } &.mbsc-radio-box.mbsc-radio-box-warning { color: $mbsc-mobiscroll-warning; } &.mbsc-radio-box.mbsc-radio-box-info { color: $mbsc-mobiscroll-info; } } @include mbsc-mobiscroll-radio('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-radio('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-radio($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $accent-param: map-get($params, 'form-accent'); $bg-param: map-get($params, 'form-background'); $accent: if($accent-param, $accent-param, $accent); $background: if($bg-param, $bg-param, $background); $disabled: ''; @if (lightness($background) > 50%) { $disabled: darken($background, 20%); } @else { $disabled: lighten($background, 23%); } $form-selection: ''; @if (lightness($accent) > 50%) { $form-selection: lighten(saturate($accent, 15%), 3%); } @else { $form-selection: darken(desaturate($accent, 15%), 3%); } .mbsc-#{$theme} { &.mbsc-radio-box:after { border-color: $form-selection; } &.mbsc-radio-label.mbsc-disabled { color: $disabled; } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { &.mbsc-radio-left { padding: .875em 1em .875em 3.75em; } &.mbsc-radio-right { padding: .875em 3.75em .875em 1em; } &.mbsc-radio-box:after { top: 44%; left: 23%; width: .875em; height: .375em; border: .125em solid; border-top: 0; border-right: 0; border-radius: 0; transform: rotate(-45deg); transition: opacity .2s ease-in-out; } &.mbsc-radio-box:before { content: ''; position: absolute; top: -.75em; left: -.75em; z-index: -1; width: 2.5em; height: 2.5em; opacity: 0; border-radius: 2.5em; transition: opacity .2s ease-in-out; background: #ccc; } &.mbsc-radio-box.mbsc-focus:before { opacity: .12; } &.mbsc-radio-box-left { left: 1.125em; } &.mbsc-radio-box-right { right: 1.125em; } &.mbsc-radio-box.mbsc-disabled { opacity: .3; } /* Color presets */ &.mbsc-radio-box.mbsc-radio-box-primary:after { border-color: $mbsc-ios-primary; } &.mbsc-radio-box.mbsc-radio-box-secondary:after { border-color: $mbsc-ios-secondary; } &.mbsc-radio-box.mbsc-radio-box-success:after { border-color: $mbsc-ios-success; } &.mbsc-radio-box.mbsc-radio-box-danger:after { border-color: $mbsc-ios-danger; } &.mbsc-radio-box.mbsc-radio-box-warning:after { border-color: $mbsc-ios-warning; } &.mbsc-radio-box.mbsc-radio-box-info:after { border-color: $mbsc-ios-info; } } @include mbsc-ios-radio('ios', $mbsc-ios-colors); @include mbsc-ios-radio('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-radio($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $accent-param: map-get($params, 'form-accent'); $text-param: map-get($params, 'form-text'); $accent: if($accent-param, $accent-param, $accent); $text: if($text-param, $text-param, $text); .mbsc-#{$theme} { &.mbsc-radio-box { color: $accent; border-color: $text; } } } @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { &.mbsc-radio-left { padding: .9375em 1em .9375em 3.5em; } &.mbsc-radio-right { padding: .9375em 3.5em .9375em 1em; } &.mbsc-radio-box { border: .125em solid; transition: background-color .1s ease-out; } &.mbsc-radio-box-left { left: 1.125em; } &.mbsc-radio-box-right { right: 1.125em; } &.mbsc-radio-box:before { content: ''; position: absolute; top: -.75em; left: -.75em; z-index: -1; width: 2.5em; height: 2.5em; opacity: 0; border-radius: 2.5em; transition: opacity .2s ease-in-out; background: currentColor; } &.mbsc-radio-box.mbsc-focus:before { opacity: .12; } &.mbsc-radio-box.mbsc-active:before { opacity: .2; } &.mbsc-radio-box:after { background: currentColor; transform: scale(0); transition: transform .1s ease-out; } &.mbsc-radio-box.mbsc-checked { border-color: currentColor; } &.mbsc-radio-box.mbsc-checked:after { transform: scale(1); } &.mbsc-radio-box.mbsc-disabled { opacity: .3; } /* Color presets */ &.mbsc-radio-box.mbsc-radio-box-primary { color: $mbsc-material-primary; } &.mbsc-radio-box.mbsc-radio-box-secondary { color: $mbsc-material-secondary; } &.mbsc-radio-box.mbsc-radio-box-success { color: $mbsc-material-success; } &.mbsc-radio-box.mbsc-radio-box-danger { color: $mbsc-material-danger; } &.mbsc-radio-box.mbsc-radio-box-warning { color: $mbsc-material-warning; } &.mbsc-radio-box.mbsc-radio-box-info { color: $mbsc-material-info; } } @include mbsc-material-radio('material', $mbsc-material-colors); @include mbsc-material-radio('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-radio($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $text-param: map-get($params, 'form-text'); $accent-param: map-get($params, 'form-accent'); $accent: if($accent-param, $accent-param, $accent); $text: if($text-param, $text-param, $text); .mbsc-#{$theme} { &.mbsc-radio-box { border: .125em solid $text; } &.mbsc-radio-box:after { background: $text; } &.mbsc-radio-box.mbsc-checked { border-color: $accent; } &.mbsc-radio-box.mbsc-active { border-color: rgba($text, .6); } &.mbsc-radio-box.mbsc-active:after { background: rgba($text, .6); } } } @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { &.mbsc-radio-left { padding: 1.125em 1em 1.125em 3.25em; } &.mbsc-radio-right { padding: 1.125em 3.25em 1.125em 1em; } &.mbsc-radio-box-left { left: 1em; } &.mbsc-radio-box-right { right: 1em; } &.mbsc-radio-box:before { content: ''; position: absolute; top: -.75em; left: -.75em; z-index: -1; width: 2.5em; height: 2.5em; opacity: 0; border-radius: 2.5em; transition: opacity .2s ease-in-out; background: #ccc; } &.mbsc-radio-box.mbsc-focus:before { opacity: .12; } /* Color presets */ &.mbsc-radio-box.mbsc-radio-box-primary.mbsc-checked { border-color: $mbsc-windows-primary; } &.mbsc-radio-box.mbsc-radio-box-secondary.mbsc-checked { border-color: $mbsc-windows-secondary; } &.mbsc-radio-box.mbsc-radio-box-success.mbsc-checked { border-color: $mbsc-windows-success; } &.mbsc-radio-box.mbsc-radio-box-danger.mbsc-checked { border-color: $mbsc-windows-danger; } &.mbsc-radio-box.mbsc-radio-box-warning.mbsc-checked { border-color: $mbsc-windows-warning; } &.mbsc-radio-box.mbsc-radio-box-info.mbsc-checked { border-color: $mbsc-windows-info; } } @include mbsc-windows-radio('windows', $mbsc-windows-colors); @include mbsc-windows-radio('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { .mbsc-radio { position: relative; display: block; margin: 0; z-index: 0; line-height: 1.25em; user-select: none; } .mbsc-radio-box { position: absolute; top: 50%; display: block; width: 1.25em; height: 1.25em; margin-top: -.625em; border-radius: 1.25em; box-sizing: border-box; } .mbsc-radio-box:after { content: ''; position: absolute; top: 50%; left: 50%; width: .625em; height: .625em; margin-top: -.3125em; margin-left: -.3125em; border-radius: .625em; opacity: 0; } .mbsc-radio-box.mbsc-checked:after { opacity: 1; } } @mixin mbsc-mobiscroll-segmented($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $accent: if($acc-param, $acc-param, $accent); $btn-light: ''; @if (lightness($background) > 50%) { $btn-light: darken($background, 3%); } @else { $btn-light: $background; } .mbsc-#{$theme} { &.mbsc-segmented-button.mbsc-button { color: $accent; border-color: $accent; &.mbsc-hover { background: rgba($accent, .1); } &.mbsc-active { background: rgba($accent, .3); } &.mbsc-selected { background: $accent; color: $btn-light; } } } } @if ($mbsc-mobiscroll-theme and $mbsc-segmented) { .mbsc-mobiscroll { &.mbsc-segmented { padding: .5em 1em; } &.mbsc-segmented-item:first-child { .mbsc-segmented-button { border-top-left-radius: .25em; border-bottom-left-radius: .25em; } } &.mbsc-segmented-item:last-child { .mbsc-segmented-button { border-top-right-radius: .25em; border-bottom-right-radius: .25em; border-right-width: .142858em; } } &.mbsc-segmented-button.mbsc-button { margin: 0; padding: .428572em 1.142858em; background: none; border: .142858em solid transparent; border-right-width: 0; border-radius: 0; font-size: .875em; line-height: 1.428572em; &.mbsc-active, &.mbsc-hover { opacity: 1; } /* Color presets */ &.mbsc-button-primary { color: $mbsc-mobiscroll-primary; border-color: $mbsc-mobiscroll-primary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-mobiscroll-primary, .2); } &.mbsc-focus { background: rgba($mbsc-mobiscroll-primary, .3); } &.mbsc-selected { background: $mbsc-mobiscroll-primary; } } &.mbsc-button-secondary { color: $mbsc-mobiscroll-secondary; border-color: $mbsc-mobiscroll-secondary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-mobiscroll-secondary, .2); } &.mbsc-focus { background: rgba($mbsc-mobiscroll-secondary, .3); } &.mbsc-selected { background: $mbsc-mobiscroll-secondary; } } &.mbsc-button-success { color: $mbsc-mobiscroll-success; border-color: $mbsc-mobiscroll-success; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-mobiscroll-success, .2); } &.mbsc-focus { background: rgba($mbsc-mobiscroll-success, .3); } &.mbsc-selected { background: $mbsc-mobiscroll-success; } } &.mbsc-button-danger { color: $mbsc-mobiscroll-danger; border-color: $mbsc-mobiscroll-danger; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-mobiscroll-danger, .2); } &.mbsc-focus { background: rgba($mbsc-mobiscroll-danger, .3); } &.mbsc-selected { background: $mbsc-mobiscroll-danger; } } &.mbsc-button-warning { color: $mbsc-mobiscroll-warning; border-color: $mbsc-mobiscroll-warning; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-mobiscroll-warning, .2); } &.mbsc-focus { background: rgba($mbsc-mobiscroll-warning, .3); } &.mbsc-selected { background: $mbsc-mobiscroll-warning; } } &.mbsc-button-info { color: $mbsc-mobiscroll-info; border-color: $mbsc-mobiscroll-info; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-mobiscroll-info, .2); } &.mbsc-focus { background: rgba($mbsc-mobiscroll-info, .3); } &.mbsc-selected { background: $mbsc-mobiscroll-info; } } } } @include mbsc-mobiscroll-segmented('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-segmented('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-segmented($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $accent: if($acc-param, $acc-param, $accent); $is-dark: false; $selectbox: ''; $selectbox-contrast: ''; $button-background: ''; $shadow: ''; @if (lightness($background) > 50%) { $button-background: darken($background, 10%); $selectbox: #fff; $selectbox-contrast: #000; $shadow: darken($background, 24%); } @else { $is-dark: true; $button-background: lighten($background, 11%); $selectbox: #5a5a5a; $selectbox-contrast: #fff; $shadow: $background; } .mbsc-#{$theme} { &.mbsc-segmented { background: $button-background; } &.mbsc-segmented-item:before { border-color: rgba($selectbox-contrast, .2); } &.mbsc-segmented-item.mbsc-focus .mbsc-segmented-selectbox { box-shadow: 0 0 0 .0625em rgba($selectbox-contrast, .5) inset; } &.mbsc-segmented-selectbox-inner { background: $selectbox; &.mbsc-selected { box-shadow: $shadow 3px 3px 8px -4px; } } &.mbsc-segmented-button.mbsc-button { background: transparent; color: $selectbox-contrast; } /* Inside popup and calendar header */ @if ($is-dark) { &.mbsc-datepicker .mbsc-segmented, &.mbsc-popup &.mbsc-segmented, &.mbsc-calendar-header &.mbsc-segmented { background: lighten($background, 17%); } } /* Color presets */ &.mbsc-segmented-primary { background: $mbsc-ios-primary; } &.mbsc-segmented-secondary { background: $mbsc-ios-secondary; } &.mbsc-segmented-success { background: $mbsc-ios-success; } &.mbsc-segmented-warning { background: $mbsc-ios-warning; } &.mbsc-segmented-danger { background: $mbsc-ios-danger; } &.mbsc-segmented-info { background: $mbsc-ios-info; } &.mbsc-segmented-light { background: $mbsc-ios-light; } &.mbsc-segmented-dark { background: $mbsc-ios-dark; } } } @if ($mbsc-ios-theme and $mbsc-segmented) { .mbsc-ios { &.mbsc-segmented { margin: .75em; padding: .0625em; position: relative; border-radius: .5625em; } &.mbsc-segmented-item:before { content: ''; position: absolute; border-left: 1px solid; top: .3125em; bottom: .3125em; opacity: 1; transition: opacity .2s ease-in-out; } &.mbsc-segmented-item.mbsc-ltr:before { left: 0; } &.mbsc-segmented-item.mbsc-rtl:before { right: 0; } &.mbsc-segmented-item:first-child:before, &.mbsc-segmented-item-selected:before, &.mbsc-segmented-item-selected + .mbsc-segmented-item:before { opacity: 0; } &.mbsc-segmented-selectbox { position: absolute; padding: .0625em; left: 0; right: 0; top: 0; bottom: 0; user-select: none; border-radius: .4375em; display: none; } &.mbsc-segmented-selectbox.mbsc-selected { display: block; } &.mbsc-segmented-selectbox-animate { transition: transform .2s ease-in-out; } &.mbsc-segmented-selectbox-inner { height: 100%; border-radius: .4375em; transition: transform .1s ease-in-out; visibility: hidden; } &.mbsc-segmented-selectbox-inner-visible { visibility: visible; } &.mbsc-segmented-item:first-child .mbsc-segmented-selectbox-inner { transform-origin: left; } &.mbsc-segmented-item:last-child .mbsc-segmented-selectbox-inner { transform-origin: right; } &.mbsc-segmented-dragging { .mbsc-segmented-selectbox-inner { transform: scale(.97, .95); } .mbsc-segmented-item:first-child .mbsc-segmented-selectbox-inner { transform: scale(.97, .95) translateX(.0625em); } .mbsc-segmented-item:last-child .mbsc-segmented-selectbox-inner { transform: scale(.97, .95) translateX(-.0625em); } } &.mbsc-segmented-button.mbsc-icon-button { height: 2.307693em; // 30px / 13px } &.mbsc-segmented-button.mbsc-button { margin: 0; padding: 0 .615385em; // 0 8px border-radius: 0; font-size: .8125em; // 13px line-height: 2.307693em; // 30px / 13px transition: opacity .1s ease-out, background-color .1s ease-out, transform .1s ease-in-out; // for the scaling to look better -webkit-font-smoothing: subpixel-antialiased; &.mbsc-active, &.mbsc-hover { opacity: 1; } } &.mbsc-segmented-dragging .mbsc-segmented-item-selected .mbsc-segmented-button { transform: scale(.97, .95); } &.mbsc-segmented-item-selected:first-child .mbsc-segmented-button { transform-origin: left; } &.mbsc-segmented-item-selected:last-child .mbsc-segmented-button { transform-origin: right; } } @include mbsc-ios-segmented('ios', $mbsc-ios-colors); @include mbsc-ios-segmented('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-segmented($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $acc-param: map-get($params, 'form-accent'); $text-param: map-get($params, 'form-text'); $background: if($bg-param, $bg-param, $background); $accent: if($acc-param, $acc-param, $accent); $text: if($text-param, $text-param, $text); $button-color: ''; $button-background: ''; $button-text: ''; @if (lightness($background) > 50%) { $button-background: darken($background, 19%); $button-color: darken($text, 36%); $button-text: darken($text, 36%); } @else { $button-background: lighten($background, 17%); $button-color: lighten($text, 24%); $button-text: lighten($text, 24%); } .mbsc-#{$theme} { &.mbsc-segmented-button.mbsc-button { border-color: $accent; color: $button-text; &.mbsc-hover, &.mbsc-active { background: rgba($button-color, .2); } &.mbsc-selected { background: $accent; color: $background; } &.mbsc-focus::after { background: rgba($button-text, .2); } } } } @if ($mbsc-material-theme and $mbsc-segmented) { .mbsc-material { &.mbsc-segmented { padding: .75em; } &.mbsc-segmented-selectbox { display: none; } &.mbsc-segmented-item:first-child { .mbsc-segmented-button { border-top-left-radius: .25em; border-bottom-left-radius: .25em; } .mbsc-segmented-button.mbsc-rtl { border-radius: 0 .25em .25em 0; border-right-width: .142858em; } } &.mbsc-segmented-item:last-child { .mbsc-segmented-button { border-top-right-radius: .25em; border-bottom-right-radius: .25em; border-right-width: .142858em; } .mbsc-segmented-button.mbsc-rtl { border-radius: .25em 0 0 .25em; border-right-width: 0; } } &.mbsc-segmented-button.mbsc-button { margin: 0; padding: .285715em 1.142858em; border: .142858em solid transparent; border-right-width: 0; border-radius: 0; background: none; box-shadow: none; min-width: auto; font-size: .875em; &.mbsc-hover, &.mbsc-active { box-shadow: none; } &.mbsc-focus:after { content: ''; display: block; position: absolute; top: 0; bottom: 0; left: 0; right: 0; } /* Color presets */ &.mbsc-button-primary { color: $mbsc-material-primary; border-color: $mbsc-material-primary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-primary, .2); } &.mbsc-selected { background: $mbsc-material-primary; } } &.mbsc-button-secondary { color: $mbsc-material-secondary; border-color: $mbsc-material-secondary; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-secondary, .2); } &.mbsc-selected { background: $mbsc-material-secondary; } } &.mbsc-button-success { color: $mbsc-material-success; border-color: $mbsc-material-success; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-success, .2); } &.mbsc-selected { background: $mbsc-material-success; } } &.mbsc-button-danger { color: $mbsc-material-danger; border-color: $mbsc-material-danger; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-danger, .2); } &.mbsc-selected { background: $mbsc-material-danger; } } &.mbsc-button-warning { color: $mbsc-material-warning; border-color: $mbsc-material-warning; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-warning, .2); } &.mbsc-selected { background: $mbsc-material-warning; } } &.mbsc-button-info { color: $mbsc-material-info; border-color: $mbsc-material-info; &.mbsc-hover, &.mbsc-active { background: rgba($mbsc-material-info, .2); } &.mbsc-selected { background: $mbsc-material-info; } } } } @include mbsc-material-segmented('material', $mbsc-material-colors); @include mbsc-material-segmented('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-segmented($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $acc-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $accent: if($acc-param, $acc-param, $accent); $button-border: ''; $button-hover: ''; $button-active: ''; $border: ''; $form-background: ''; $button-bg: ''; @if (lightness($background) > 50%) { $button-border: darken($background, 40%); $button-hover: darken($background, 17%); $button-active: lighten($text, 28%); $button-bg: darken($background, 20%); $border: darken($background, 10%); $form-background: lighten($background, 13%); } @else { $button-border: lighten($background, 35%); $button-active: darken($text, 33%); $button-hover: lighten($background, 17%); $button-bg: lighten($background, 15%); $border: lighten($background, 10%); $form-background: darken($background, 12%); } .mbsc-#{$theme} { &.mbsc-segmented-button.mbsc-button { background: $button-bg; color: $text; &.mbsc-hover { background: $button-hover; } &.mbsc-active { background: $button-hover; } &.mbsc-selected { background: $button-active; color: $form-background; } } } } @if ($mbsc-windows-theme and $mbsc-segmented) { .mbsc-windows { &.mbsc-segmented { padding: .75em; } &.mbsc-segmented-selectbox { display: none; } &.mbsc-segmented-button.mbsc-button { margin: 0; border-color: transparent; &.mbsc-active, &.mbsc-hover { border-color: transparent; } &.mbsc-focus { z-index: 2; } /* Color presets */ &.mbsc-button-primary { &.mbsc-active, &.mbsc-selected { background: $mbsc-windows-primary; } } &.mbsc-button-secondary { &.mbsc-active, &.mbsc-selected { background: $mbsc-windows-secondary; } } &.mbsc-button-success { &.mbsc-active, &.mbsc-selected { background: $mbsc-windows-success; } } &.mbsc-button-danger { &.mbsc-active, &.mbsc-selected { background: $mbsc-windows-danger; } } &.mbsc-button-warning { &.mbsc-active, &.mbsc-selected { background: $mbsc-windows-warning; } } &.mbsc-button-info { &.mbsc-active, &.mbsc-selected { background: $mbsc-windows-info; } } } } @include mbsc-windows-segmented('windows', $mbsc-windows-colors); @include mbsc-windows-segmented('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-segmented { .mbsc-segmented { // display: table; // table-layout: fixed; // width: 100%; display: flex; overflow: hidden; // box-sizing: border-box; } .mbsc-segmented-item { margin: 0; // display: table-cell; position: relative; vertical-align: top; text-align: center; font-size: 1em; flex: 1 1 0; user-select: none; min-width: 0; // needed for the items to have equal widths } .mbsc-segmented-label { display: block; margin: 0; padding: 0; } .mbsc-segmented-input { width: 100%; height: 100%; top: 0; left: 0; opacity: 0; position: absolute; } .mbsc-segmented-button.mbsc-button { width: 100%; } } @mixin mbsc-ios-stepper($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $button-background: ''; $border: ''; // Light background @if (lightness($background) > 50%) { $button-background: darken($background, 10%); $border: #000; } // Dark background @else { $button-background: lighten($background, 17%); $border: #fff; } .mbsc-#{$theme} { &.mbsc-stepper-input { border-color: $button-background; color: $text; } &.mbsc-stepper-input.mbsc-disabled { color: rgba($text, .2); } &.mbsc-stepper-button { background: $button-background; color: $text; } &.mbsc-stepper-plus:before { border-color: rgba($border, .2); } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { &.mbsc-stepper-input { margin-left: -1px; margin-right: -1px; z-index: 1; border: 1px solid; } &.mbsc-stepper-button.mbsc-button { line-height: 1em; } &.mbsc-stepper-button.mbsc-disabled { opacity: 1; } &.mbsc-stepper-inner { font-weight: normal; } &.mbsc-disabled .mbsc-stepper-inner { opacity: .2; } &.mbsc-stepper-plus:before { content: ''; position: absolute; border-left: 1px solid; top: .4125em; bottom: .4125em; } &.mbsc-stepper-plus.mbsc-ltr:before { left: 0; } &.mbsc-stepper-plus.mbsc-rtl:before { right: 0; } &.mbsc-stepper-center .mbsc-stepper-plus:before { display: none; } // button colors &.mbsc-primary .mbsc-stepper-button { color: $mbsc-ios-primary; } &.mbsc-secondary .mbsc-stepper-button { color: $mbsc-ios-secondary; } &.mbsc-success .mbsc-stepper-button { color: $mbsc-ios-success; } &.mbsc-danger .mbsc-stepper-button { color: $mbsc-ios-danger; } &.mbsc-warning .mbsc-stepper-button { color: $mbsc-ios-warning; } &.mbsc-info .mbsc-stepper-button { color: $mbsc-ios-info; } } @include mbsc-ios-stepper('ios', $mbsc-ios-colors); @include mbsc-ios-stepper('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-stepper($theme, $params) { $text: map-get($params, 'text'); $background: map-get($params, 'background'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $button-color: ''; $text-color: ''; $text-color-disabled: ''; // Light background @if (lightness($background) > 50%) { $button-color: darken($background, 16%); $text-color: lighten($text, 17%); $text-color-disabled: darken($background, 30%); } // Dark background @else { $button-color: lighten($background, 35%); $text-color: darken($text, 24%); $text-color-disabled: lighten($background, 45%); } .mbsc-#{$theme} { &.mbsc-stepper-input { border-color: $button-color; color: $text-color; } &.mbsc-stepper-input.mbsc-disabled { color: $text-color-disabled; } &.mbsc-stepper-button { background: $button-color; color: $button-color; } &.mbsc-stepper-inner { color: $background; } &.mbsc-color-none .mbsc-stepper-inner { color: $text; } &.mbsc-stepper-button.mbsc-disabled { background: $button-color; } &.mbsc-stepper-button.mbsc-disabled .mbsc-stepper-inner { color: $text-color-disabled; } } } @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { &.mbsc-stepper-control { height: 2.25em; } &.mbsc-stepper-inner { font-size: 2.142857em; font-weight: 750; } &.mbsc-stepper-button.mbsc-button { line-height: 1em; box-shadow: none; border: 2px solid currentColor; } &.mbsc-stepper-minus.mbsc-ltr, &.mbsc-stepper-plus.mbsc-rtl { border-right: 0; } &.mbsc-stepper-minus.mbsc-rtl, &.mbsc-stepper-plus.mbsc-ltr { border-left: 0; } &.mbsc-stepper-button.mbsc-disabled { opacity: 1; } &.mbsc-stepper-input { z-index: 1; border-top: 2px solid; border-bottom: 2px solid; border-left: 0; border-right: 0; width: 4em; } // button colors &.mbsc-primary .mbsc-stepper-button { background: $mbsc-material-primary; border-color: $mbsc-material-primary; } &.mbsc-secondary .mbsc-stepper-button { background: $mbsc-material-secondary; border-color: $mbsc-material-secondary; } &.mbsc-success .mbsc-stepper-button { background: $mbsc-material-success; border-color: $mbsc-material-success; } &.mbsc-danger .mbsc-stepper-button { background: $mbsc-material-danger; border-color: $mbsc-material-danger; } &.mbsc-warning .mbsc-stepper-button { background: $mbsc-material-warning; border-color: $mbsc-material-warning; } &.mbsc-info .mbsc-stepper-button { background: $mbsc-material-info; border-color: $mbsc-material-info; } // input border colors &.mbsc-primary .mbsc-stepper-input { border-color: $mbsc-material-primary; } &.mbsc-secondary .mbsc-stepper-input { border-color: $mbsc-material-secondary; } &.mbsc-success .mbsc-stepper-input { border-color: $mbsc-material-success; } &.mbsc-danger .mbsc-stepper-input { border-color: $mbsc-material-danger; } &.mbsc-warning .mbsc-stepper-input { border-color: $mbsc-material-warning; } &.mbsc-info .mbsc-stepper-input { border-color: $mbsc-material-info; } } @include mbsc-material-stepper('material', $mbsc-material-colors); @include mbsc-material-stepper('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-stepper($theme, $params) { $text: map-get($params, 'text'); $background: map-get($params, 'background'); $bg-param: map-get($params, 'form-background'); $text-param: map-get($params, 'form-text'); $background: if($bg-param, $bg-param, $background); $text: if($text-param, $text-param, $text); $border-color: ''; $disabled-text-color: ''; $disabled-button-color: ''; $hover: ''; // Light background @if (lightness($background) > 50%) { $border-color: darken($background, 20%); $disabled-text-color: darken($background, 30%); $disabled-button-color: darken($background, 20%);; $hover: #000; } // Dark background @else { $border-color: lighten($background, 15%); $disabled-text-color: lighten($background, 40%); $disabled-button-color: lighten($background, 15%); $hover: #fff; } .mbsc-#{$theme} { &.mbsc-stepper-input { border-color: $border-color; color: $text; } &.mbsc-stepper-input.mbsc-disabled { color: $disabled-text-color; } &.mbsc-stepper-button { color: $border-color; } &.mbsc-stepper-button.mbsc-hover:before { background: rgba($hover, .2); } &.mbsc-stepper-button.mbsc-disabled { background: $disabled-button-color; } &.mbsc-stepper-inner { color: $text; } &.mbsc-stepper-button.mbsc-disabled .mbsc-stepper-inner { color: $disabled-text-color; } } } @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { &.mbsc-stepper-button.mbsc-button { width: 3.625em; line-height: 1.5em; border-color: currentColor; } &.mbsc-stepper-button.mbsc-hover:before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } &.mbsc-stepper-button.mbsc-disabled { opacity: 1; } &.mbsc-stepper-minus.mbsc-ltr, &.mbsc-stepper-plus.mbsc-rtl { border-right: 0; } &.mbsc-stepper-minus.mbsc-rtl, &.mbsc-stepper-plus.mbsc-ltr { border-left: 0; } &.mbsc-stepper-inner { font-size: 1.75em; font-weight: 800; } &.mbsc-stepper-input { z-index: 1; border-top: 2px solid; border-bottom: 2px solid; border-left: 0; border-right: 0; width: 4em; } // button colors &.mbsc-primary .mbsc-stepper-button { background: $mbsc-windows-primary; border-color: $mbsc-windows-primary; } &.mbsc-secondary .mbsc-stepper-button { background: $mbsc-windows-secondary; border-color: $mbsc-windows-secondary; } &.mbsc-success .mbsc-stepper-button { background: $mbsc-windows-success; border-color: $mbsc-windows-success; } &.mbsc-danger .mbsc-stepper-button { background: $mbsc-windows-danger; border-color: $mbsc-windows-danger; } &.mbsc-warning .mbsc-stepper-button { background: $mbsc-windows-warning; border-color: $mbsc-windows-warning; } &.mbsc-info .mbsc-stepper-button { background: $mbsc-windows-info; border-color: $mbsc-windows-info; } // input border colors &.mbsc-primary .mbsc-stepper-input { border-color: $mbsc-windows-primary; } &.mbsc-secondary .mbsc-stepper-input { border-color: $mbsc-windows-secondary; } &.mbsc-success .mbsc-stepper-input { border-color: $mbsc-windows-success; ; } &.mbsc-danger .mbsc-stepper-input { border-color: $mbsc-windows-danger; } &.mbsc-warning .mbsc-stepper-input { border-color: $mbsc-windows-warning; } &.mbsc-info .mbsc-stepper-input { border-color: $mbsc-windows-info; } } @include mbsc-windows-stepper('windows', $mbsc-windows-colors); @include mbsc-windows-stepper('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { .mbsc-stepper { line-height: 1.25em; position: relative; display: block; margin: 0; z-index: 0; user-select: none; box-sizing: border-box; padding: 1.5em 11.75em 1.5em 1em; } .mbsc-stepper.mbsc-rtl { padding: 1.5em 1em 1.5em 11.75em; } .mbsc-stepper-label { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .mbsc-stepper-input { width: 3.571429em; padding: 0; margin: 0; box-shadow: none; border-radius: 0; font-size: .875em; text-align: center; opacity: 1; z-index: 3; background: transparent; appearance: none; } .mbsc-stepper-input::-webkit-outer-spin-button, .mbsc-stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .mbsc-stepper-input:focus { outline-width: 0; } .mbsc-stepper-input.mbsc-disabled { cursor: not-allowed; } .mbsc-stepper-control { position: absolute; display: flex; z-index: 2; margin-top: -1em; top: 50%; height: 2em; } .mbsc-stepper-control.mbsc-ltr { right: 1em; } .mbsc-stepper-control.mbsc-rtl { left: 1em; } .mbsc-stepper-start .mbsc-stepper-input { border: none; order: -1; } .mbsc-stepper-start.mbsc-ltr .mbsc-stepper-minus.mbsc-button { margin-right: -1px; } .mbsc-stepper-start.mbsc-rtl .mbsc-stepper-minus.mbsc-button { margin-left: -1px; } .mbsc-stepper-end .mbsc-stepper-input { border: none; order: 2; } .mbsc-stepper-end.mbsc-ltr .mbsc-stepper-minus.mbsc-button { margin-right: -1px; } .mbsc-stepper-end.mbsc-rtl .mbsc-stepper-minus.mbsc-button { margin-left: -1px; } .mbsc-stepper-button.mbsc-button.mbsc-font { width: 3.25em; margin: 0; display: inline-block; } .mbsc-stepper-inner { font-size: 2em; font-weight: bold; } .mbsc-stepper-minus.mbsc-button.mbsc-ltr { border-top-right-radius: 0; border-bottom-right-radius: 0; } .mbsc-stepper-plus.mbsc-button.mbsc-ltr { border-top-left-radius: 0; border-bottom-left-radius: 0; } .mbsc-stepper-minus.mbsc-button.mbsc-rtl { border-top-left-radius: 0; border-bottom-left-radius: 0; } .mbsc-stepper-plus.mbsc-button.mbsc-rtl { border-top-right-radius: 0; border-bottom-right-radius: 0; } } @mixin mbsc-mobiscroll-switch($theme, $params) { .mbsc-#{$theme} { &.mbsc-switch-cont { color: red; } } } @if ($mbsc-mobiscroll-theme and $mbsc-forms) { .mbsc-mobiscroll { &.mbsc-switch-right { padding: 1em 3.125em 1em 1em; } &.mbsc-switch-left { padding: 1em 1em 1em 3.125em; } } @include mbsc-mobiscroll-switch('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-switch('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-switch($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $bg-param: map-get($params, 'form-background'); $ac-param: map-get($params, 'form-accent'); $text-param: map-get($params, 'form-text'); $background: if($bg-param, $bg-param, $background); $switch-track-checked: if($ac-param, $ac-param, #4cd764); $text: if($text-param, $text-param, $text); $switch-track: ''; @if (lightness($background) > 50%) { $switch-track: darken($background, 7%); } @else { $switch-track: lighten($background, 22%); } .mbsc-#{$theme} { &.mbsc-switch-track { // when the switch is not checked &:after { background: $switch-track; } &.mbsc-focus:after { box-shadow: 0 0 0 .125em rgba($text, .5); } // when the switch is checked &.mbsc-checked:after { background: $switch-track-checked; } } } } @if ($mbsc-ios-theme and $mbsc-forms) { .mbsc-ios { &.mbsc-switch-right { padding: .875em 5em .875em 1em; } &.mbsc-switch-left { padding: .875em 1em .875em 5em; } // Track &.mbsc-switch-track { width: 1.25em; height: 2em; padding: 0; margin: -.96875em .875em 0 .875em; border-radius: 1.25em; } &.mbsc-switch-track-right { right: 1em; } &.mbsc-switch-track-left { left: 1em; } &.mbsc-switch-track:after { content: ''; position: absolute; z-index: 1; top: 0; right: -1em; bottom: 0; left: -1em; border-radius: 1.25em; transition: background-color .2s ease-out; color: inherit; } &.mbsc-switch-track.mbsc-disabled { opacity: .3; } // Handle &.mbsc-switch-handle { z-index: 2; top: 50%; left: 50%; width: 1.75em; height: 1.75em; margin: -.875em 0 0 -.875em; border-radius: 1.75em; box-shadow: 0 .1875em .75em rgba(0, 0, 0, .16), 0 .1875em .0625em rgba(0, 0, 0, .1); background: #fff; } // Color presets &.mbsc-switch-track.mbsc-switch-primary.mbsc-checked:after { background: $mbsc-ios-primary; } &.mbsc-switch-track.mbsc-switch-secondary.mbsc-checked:after { background: $mbsc-ios-secondary; } &.mbsc-switch-track.mbsc-switch-success.mbsc-checked:after { background: $mbsc-ios-success; } &.mbsc-switch-track.mbsc-switch-danger.mbsc-checked:after { background: $mbsc-ios-danger; } &.mbsc-switch-track.mbsc-switch-warning.mbsc-checked:after { background: $mbsc-ios-warning; } &.mbsc-switch-track.mbsc-switch-info.mbsc-checked:after { background: $mbsc-ios-info; } } @include mbsc-ios-switch('ios', $mbsc-ios-colors); @include mbsc-ios-switch('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-switch($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $bg-param: map-get($params, 'form-background'); $ac-param: map-get($params, 'form-accent'); $background: if($bg-param, $bg-param, $background); $accent: if($ac-param, $ac-param, $accent); $track: ''; $track-disabled: ''; $handle-disabled: ''; $handle: ''; $bg-contrast: ''; @if (lightness($background) > 50%) { $track: darken($background, 23%); $track-disabled: darken($background, 9%); $handle-disabled: darken($background, 20%); $handle: lighten($background, 5%); $bg-contrast: #000; } @else { $track: lighten($background, 17%); $track-disabled: lighten($background, 17%); $handle-disabled: lighten($background, 16%); $handle: lighten($background, 53%); $bg-contrast: #fff; } .mbsc-#{$theme} { &.mbsc-switch-track { background: $track; &.mbsc-checked { background: rgba($accent, .3); } &.mbsc-disabled { background: $track-disabled; } } &.mbsc-switch-handle { background: $handle; box-shadow: 0 3px 1px -2px rgba($bg-contrast, 0.2), 0 1px 5px 0 rgba($bg-contrast, 0.12); &.mbsc-checked { background: $accent; } &.mbsc-disabled { background: $handle-disabled; } } &.mbsc-switch-handle:before { background: rgba($bg-contrast, 0.1); } } } @if ($mbsc-material-theme and $mbsc-forms) { .mbsc-material { &.mbsc-switch-right { padding: .9375em 4em .9375em 1em; } &.mbsc-switch-left { padding: .9375em 1em .9375em 4em; } // Track &.mbsc-switch-track { width: 1.75em; height: .875em; padding: 0 .25em; margin-top: -.4375em; border-radius: 1.25em; } &.mbsc-switch-track-left { left: 1.25em; } &.mbsc-switch-track-right { right: 1.25em; } // Handle &.mbsc-switch-handle { width: 1.25em; height: 1.25em; border-radius: 1.25em; top: 50%; margin-left: -.625em; margin-top: -.625em; } &.mbsc-switch-handle:before { content: ''; display: block; position: absolute; z-index: -1; opacity: 0; transition: opacity .2s ease-in-out; border-radius: 2.875em; top: -.625em; left: -.625em; width: 2.5em; height: 2.5em; } &.mbsc-switch-handle.mbsc-focus:before { opacity: .5; } &.mbsc-switch-handle.mbsc-active:before { opacity: 1; } /* Color presets */ &.mbsc-switch-handle.mbsc-switch-primary.mbsc-checked { background: $mbsc-material-primary; } &.mbsc-switch-track.mbsc-switch-primary.mbsc-checked { background: lighten($mbsc-material-primary, 20%); } &.mbsc-switch-handle.mbsc-switch-secondary.mbsc-checked { background: $mbsc-material-secondary; } &.mbsc-switch-track.mbsc-switch-secondary.mbsc-checked { background: lighten($mbsc-material-secondary, 20%); } &.mbsc-switch-handle.mbsc-switch-success.mbsc-checked { background: $mbsc-material-success; } &.mbsc-switch-track.mbsc-switch-success.mbsc-checked { background: lighten($mbsc-material-success, 20%); } &.mbsc-switch-handle.mbsc-switch-danger.mbsc-checked { background: $mbsc-material-danger; } &.mbsc-switch-track.mbsc-switch-danger.mbsc-checked { background: lighten($mbsc-material-danger, 20%); } &.mbsc-switch-handle.mbsc-switch-warning.mbsc-checked { background: $mbsc-material-warning; } &.mbsc-switch-track.mbsc-switch-warning.mbsc-checked { background: lighten($mbsc-material-warning, 20%); } &.mbsc-switch-handle.mbsc-switch-info.mbsc-checked { background: $mbsc-material-info; } &.mbsc-switch-track.mbsc-switch-info.mbsc-checked { background: lighten($mbsc-material-info, 20%); } } @include mbsc-material-switch('material', $mbsc-material-colors); @include mbsc-material-switch('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-switch($theme, $params) { $background: map-get($params, 'background'); $accent: map-get($params, 'accent'); $text: map-get($params, 'text'); $bg-param: map-get($params, 'form-background'); $ac-param: map-get($params, 'form-accent'); $text-param: map-get($params, 'form-text'); $background: if($bg-param, $bg-param, $background); $accent: if($ac-param, $ac-param, $accent); $text: if($text-param, $text-param, $text); $active: ''; $focus: ''; @if (lightness($background) > 50%) { $active: darken($background, 55%); $focus: lighten($text, 45%); } @else { $active: lighten($background, 55%); $focus: darken($text, 45%); } .mbsc-#{$theme} { // Track &.mbsc-switch-track { &.mbsc-checked:before { border-color: $accent; background: $accent; } &:before, &.mbsc-disabled:before { border-color: $text; background: none; } &.mbsc-active:before { border-color: $active; background: $active; } &.mbsc-focus:after { border-color: $focus; } } // Handle &.mbsc-switch-handle { background: $text; &.mbsc-checked { background: $background; } &.mbsc-disabled { background: $text; } } } } @if ($mbsc-windows-theme and $mbsc-forms) { .mbsc-windows { &.mbsc-switch-right { padding: 1.125em 5.25em 1.125em 1em; } &.mbsc-switch-left { padding: 1.125em 1em 1.125em 5.25em; } // Track &.mbsc-switch-track { width: 1.5em; height: 1em; margin-top: -.5em; } &.mbsc-switch-track-right { right: 1.75em; // .125 padding + .625 visible track relative position } &.mbsc-switch-track-left { left: 1.75em; // .125 padding + .625 visible track relative position } &.mbsc-switch-track:before, &.mbsc-switch-track:after { content: ''; position: absolute; z-index: 1; border: .125em solid transparent; } &.mbsc-switch-track:before { top: -.125em; // .125em border bottom: -.125em; // .125em border left: -.625em; // .125em border + .5em space right: -.625em; // .125em border + .5em space border-radius: .625em; transition: background-color .2s ease-in-out, border .2s ease-in-out; color: inherit; } // used for the focus outline &.mbsc-switch-track:after { top: -.25em; bottom: -.25em; left: -.75em; right: -.75em; border-radius: .75em; } &.mbsc-switch-track.mbsc-disabled { opacity: .2; } // Handle &.mbsc-switch-handle { z-index: 2; top: 50%; left: 50%; right: auto; height: .625em; width: .625em; border-radius: 10px; margin: -.3125em 0 0 -.3125em; } // Color presets &.mbsc-switch-track.mbsc-switch-primary.mbsc-checked:before { border-color: $mbsc-windows-primary; background: $mbsc-windows-primary; } &.mbsc-switch-track.mbsc-switch-secondary.mbsc-checked:before { border-color: $mbsc-windows-secondary; background: $mbsc-windows-secondary; } &.mbsc-switch-track.mbsc-switch-success.mbsc-checked:before { border-color: $mbsc-windows-success; background: $mbsc-windows-success; } &.mbsc-switch-track.mbsc-switch-danger.mbsc-checked:before { border-color: $mbsc-windows-danger; background: $mbsc-windows-danger; } &.mbsc-switch-track.mbsc-switch-warning.mbsc-checked:before { border-color: $mbsc-windows-warning; background: $mbsc-windows-warning; } &.mbsc-switch-track.mbsc-switch-info.mbsc-checked:before { border-color: $mbsc-windows-info; background: $mbsc-windows-info; } } @include mbsc-windows-switch('windows', $mbsc-windows-colors); @include mbsc-windows-switch('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-forms { .mbsc-switch { position: relative; display: block; margin: 0; user-select: none; -webkit-user-select: none; -moz-user-select: none; line-height: 1.25em; } .mbsc-switch-track { position: absolute; top: 50%; z-index: 4; display: block; box-sizing: border-box; } .mbsc-switch-handle { display: block; position: absolute; cursor: pointer; &.mbsc-disabled { cursor: not-allowed; } } .mbsc-switch-handle-animate { transition: left .1s ease-in-out; } .mbsc-description { display: block; font-size: .75em; opacity: .6; } } @mixin mbsc-mobiscroll-calendar-view($theme, $params) { $background: map-get($params, "background"); $text: map-get($params, "text"); $accent: map-get($params, "accent"); .mbsc-#{$theme} { &.mbsc-calendar-wrapper-fixed { border-bottom: 1px solid $accent; } &.mbsc-calendar-week-day { border-bottom: 1px solid $accent; color: $accent; } &.mbsc-focus .mbsc-calendar-day-text { box-shadow: 0 0 0 2px rgba($text, 0.5); } &.mbsc-hover .mbsc-calendar-day-text { background: rgba($accent, 0.3); } &.mbsc-selected .mbsc-calendar-day-text { background: $accent; color: $background; } /* Week numbers */ .mbsc-calendar-week-nr { color: $accent; } /* Marks */ &.mbsc-calendar-mark { background: $text; } /* Labels */ &.mbsc-calendar-label { color: $background; background: $text; } } } @if ($mbsc-mobiscroll-theme and $mbsc-calendar-view) { .mbsc-mobiscroll { &.mbsc-calendar-header { padding: 0.5em; } &.mbsc-calendar-slide { padding: 0 0.5em 0.5em 0.5em; } &.mbsc-calendar-day-text { width: 2.153847em; height: 2.153847em; margin: 0.307692em auto; line-height: 2.153847em; font-size: 0.8125em; border: 2px solid transparent; border-radius: 2em; box-sizing: content-box; } /* Week numbers */ .mbsc-calendar-week-nr { width: 2.363637em; font-size: 0.6875em; } } @include mbsc-mobiscroll-calendar-view('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-calendar-view('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-calendar-view($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-param: map-get($params, 'calendar-background'); $text-param: map-get($params, 'calendar-text'); $accent-param: map-get($params, 'calendar-accent'); $border-param: map-get($params, 'calendar-border'); $mark-param: map-get($params, 'calendar-mark'); $event-param: map-get($params, 'calendar-event'); $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background), $text)); $accent: if($accent-param, $accent-param, $accent); $event: if($event-param, $event-param, #5AC8FA); $background-alt: ''; $border-color: ''; $popup-background: ''; $popup-cell: ''; $hover: ''; @if (lightness($background) > 50%) { $background-alt: lighten($background, 3%); $border-color: darken($background, 17%); $popup-background: $background-alt; $popup-cell: $background-alt; $hover: darken($background, 10%); } @else { $background-alt: $background; $border-color: lighten($background, 20%); $popup-background: lighten($background, 16%); $popup-cell: lighten($background, 11%); $hover: lighten($background, 17%); } $highlight: ''; $highlight-contrast: ''; @if (lightness($background) > 50%) { $highlight: lighten(desaturate($accent, 14%), 39%); $highlight-contrast: #000; } @else { $highlight: darken(desaturate($accent, 14%), 39%); $highlight-contrast: #fff; } $border-color: if($border-param, $border-param, $border-color); $mark: if($mark-param, $mark-param, $border-color); .mbsc-#{$theme} { &.mbsc-calendar { background: $background-alt; color: $text; } &.mbsc-calendar-wrapper { border-color: $border-color; } &.mbsc-calendar-header { border-color: $border-color; } &.mbsc-calendar-button.mbsc-button { color: $accent; } &.mbsc-calendar-cell { background: $background-alt; border-color: $border-color; color: $text; } &.mbsc-calendar-day:after { border-color: $border-color; } &.mbsc-calendar-week-nr, &.mbsc-calendar-today { color: $accent; } &.mbsc-hover .mbsc-calendar-cell-text { background-color: rgba($accent, .3); } /* range highlight and selection */ &.mbsc-range-day::after { background-color: $highlight; } &.mbsc-range-day .mbsc-calendar-cell-text { color: $highlight-contrast; } &.mbsc-range-hover::before { border-color: $hover; } &.mbsc-selected .mbsc-calendar-cell-text { border-color: $accent; background: $accent; color: get-contrast-color($accent); } &.mbsc-focus .mbsc-calendar-cell-text { box-shadow: 0 0 0 2px rgba($text, .5); } &.mbsc-focus .mbsc-calendar-day-text { box-shadow: none; border-color: rgba($text, .5); } &.mbsc-calendar-mark { background: $mark; } &.mbsc-calendar-label { color: $event; } &.mbsc-calendar-label-text { color: get-contrast-color($background); } &.mbsc-calendar-label-active, &.mbsc-calendar-label-dragging { .mbsc-calendar-label-inner { color: get-contrast-color($event); } .mbsc-calendar-label-text { color: inherit; } } &.mbsc-calendar-text-more .mbsc-calendar-label-text { color: $text; } /* Picker */ &.mbsc-calendar-popup { .mbsc-popup-arrow, .mbsc-popup-body { background: $popup-background; } .mbsc-calendar-cell { background: $popup-cell; } } /* Multi month grid view */ &.mbsc-calendar-grid { border-color: $border-color; } &.mbsc-calendar-month-title { color: $accent; } } } @if ($mbsc-ios-theme and $mbsc-calendar-view) { .mbsc-ios { &.mbsc-calendar-controls { /* IE11 needs px size here to avoid subpixel values */ padding: 2px; /* padding: .125em; */ } &.mbsc-calendar-cell { border-top-style: solid; border-top-width: 1px; } &.mbsc-calendar-cell-text { height: 2em; padding: 0 .5em; line-height: 2em; border-radius: 2em; } &.mbsc-calendar-week-day { height: 1.7em; line-height: 1.7em; font-size: 0.625em; } &.mbsc-calendar-week-nr { width: 2.363636em; height: auto; font-size: 0.75em; font-weight: bold; line-height: 3em; } &.mbsc-calendar-day-text { width: 1.625em; height: 1.625em; margin: 0.1875em; padding: 0; line-height: 1.625em; border: 2px solid transparent; border-radius: 2em; } /* Range Highlight */ &.mbsc-range-day .mbsc-calendar-cell-inner { z-index: 1; } &.mbsc-range-day::after, &.mbsc-range-hover::before { content: ''; height: 1.875em; position: absolute; left: -1px; right: -1px; top: .25em; z-index: 0; box-sizing: border-box; } &.mbsc-range-hover::before { border-top: 2px dashed; border-bottom: 2px dashed; } &.mbsc-range-day-start.mbsc-ltr::after, &.mbsc-range-day-end.mbsc-rtl::after, &.mbsc-range-hover-start.mbsc-ltr::before, &.mbsc-range-hover-end.mbsc-rtl::before { left: 50%; margin-left: -0.9375em; border-radius: 2em 0 0 2em; } &.mbsc-range-day-end.mbsc-ltr::after, &.mbsc-range-day-start.mbsc-rtl::after, &.mbsc-range-hover-end.mbsc-ltr::before, &.mbsc-range-hover-start.mbsc-rtl::before { right: 50%; margin-right: -0.9375em; border-radius: 0 2em 2em 0; } &.mbsc-range-day-start.mbsc-range-day-end::after, &.mbsc-range-hover-start.mbsc-range-hover-end::before { display: none; } /* Marks */ &.mbsc-calendar-day-marked { padding-bottom: 0.4375em; } &.mbsc-calendar-marks { margin-top: -0.0625em; } &.mbsc-calendar-mark { width: 0.375em; height: 0.375em; border-radius: 0.375em; margin: 0 0.0625em; } /* Colors */ &.mbsc-calendar-day-colors .mbsc-calendar-day-text { background-clip: padding-box; } &.mbsc-calendar-day-colors.mbsc-hover .mbsc-calendar-cell-text { background-clip: border-box; } /* Labels */ &.mbsc-calendar-text:before { border-radius: .4em; color: inherit; } &.mbsc-calendar-label { font-weight: 600; } &.mbsc-calendar-label-background { margin: 0 -.1em; background: currentColor; opacity: .5; transition: opacity .15s ease-in-out; } &.mbsc-calendar-label-start.mbsc-ltr .mbsc-calendar-label-background, &.mbsc-calendar-label-end.mbsc-rtl .mbsc-calendar-label-background { margin-left: 0; border-top-left-radius: .4em; border-bottom-left-radius: .4em; } &.mbsc-calendar-label-end.mbsc-ltr .mbsc-calendar-label-background, &.mbsc-calendar-label-start.mbsc-rtl .mbsc-calendar-label-background { margin-right: 0; border-top-right-radius: .4em; border-bottom-right-radius: .4em; } &.mbsc-calendar-label-hover .mbsc-calendar-label-background { opacity: .6; } &.mbsc-calendar-label.mbsc-calendar-label-hover:before { background: none; } &.mbsc-calendar-label-dragging .mbsc-calendar-label-background, &.mbsc-calendar-label-active .mbsc-calendar-label-background { opacity: .9; } /* Desktop styling */ &.mbsc-calendar-height-md { .mbsc-calendar-day:after { position: absolute; top: 0; right: 100%; bottom: 0; z-index: 1; margin-right: -1px; border-left-width: 1px; border-left-style: solid; content: ''; } .mbsc-calendar-week-nr { font-size: 0.75em; } } &.mbsc-calendar-width-md { .mbsc-calendar-title { font-size: 1.5em; line-height: 1.666667em; padding: 0 0.166667em; } .mbsc-calendar-year { font-weight: 200; } .mbsc-calendar-week-day { height: 2.5em; padding: 0 0.5em; line-height: 2.5em; font-size: 1em; border-left: 1px solid transparent; } .mbsc-calendar-week-nr { font-size: .75em; padding: 0; } .mbsc-calendar-day-inner { min-height: 2.5em; } .mbsc-calendar-day-labels .mbsc-calendar-day-inner { min-height: 4.75em; } .mbsc-calendar-marks { padding: 0 0.75em; } .mbsc-calendar-day-text { width: 1.375em; height: 1.375em; line-height: 1.375em; } .mbsc-calendar-text { height: 1.8em; line-height: 1.8em; margin: 0 .5em .2em .6em; } .mbsc-calendar-label { padding: 0 .4em; } .mbsc-calendar-label-text { font-size: 1.2em; } .mbsc-calendar-label-background { margin: 0 -.4em; } } &.mbsc-calendar-height-md.mbsc-calendar-width-md { .mbsc-calendar-week-day.mbsc-ltr, .mbsc-calendar-day.mbsc-ltr, .mbsc-calendar-marks.mbsc-ltr { text-align: right; } .mbsc-calendar-week-day.mbsc-rtl, .mbsc-calendar-day.mbsc-rtl, .mbsc-calendar-marks.mbsc-rtl { text-align: left; } } /* Multi month grid view */ &.mbsc-calendar-grid-view .mbsc-calendar-title { font-size: 1.5em; line-height: 1.666667em; padding: 0 0.166667em; } &.mbsc-calendar-grid { border-top: 1px solid; } &.mbsc-calendar-grid .mbsc-calendar-grid-item .mbsc-calendar-week-days { background: none; } &.mbsc-calendar-grid .mbsc-calendar-cell { border: 0; } } @include mbsc-ios-calendar-view('ios', $mbsc-ios-colors); @include mbsc-ios-calendar-view('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-calendar-view($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-param: map-get($params, 'calendar-background'); $text-param: map-get($params, 'calendar-text'); $accent-param: map-get($params, 'calendar-accent'); $border-param: map-get($params, 'calendar-border'); $mark-param: map-get($params, 'calendar-mark'); $event-param: map-get($params, 'calendar-event'); $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background-param), $text)); $accent: if($accent-param, $accent-param, $accent); $mark: if($mark-param, $mark-param, $accent); $event: if($event-param, $event-param, $accent); $border: ''; $cell-hover: ''; $picker-background: ''; $hover: ''; // Light background @if (lightness($background) > 50%) { $border: darken($background, 19%); $cell-hover: #000; $picker-background: $background; $hover: darken($background, 10%); } // Dark background @else { $border: lighten($background, 17%); $cell-hover: #fff; $picker-background: lighten($background, 19%); $hover: lighten($background, 10%); } $border: if($border-param, $border-param, $border); .mbsc-#{$theme} { &.mbsc-calendar-wrapper:after { box-shadow: inset 0 .5em .25em -.5em rgba($text, 0.5); } &.mbsc-calendar-button.mbsc-button { color: $text; } &.mbsc-calendar-slide { background: $background; } &.mbsc-calendar-picker-slide { background: $picker-background; } &.mbsc-calendar-week-day { color: rgba($text, .7); } &.mbsc-calendar-cell-text { color: $text; } &.mbsc-calendar-week-nr, &.mbsc-calendar-today { color: $accent; } &.mbsc-focus .mbsc-calendar-cell-text { box-shadow: 0 0 0 2px rgba($text, .7); // border-color: rgba($text, .7); } &.mbsc-hover .mbsc-calendar-cell-text { background: rgba($cell-hover, .1); } /* range highlight and selection */ &.mbsc-range-hover::before { border-color: $hover; } &.mbsc-range-day::after { background-color: rgba($accent, .25); } &.mbsc-selected .mbsc-calendar-cell-text { background: $accent; border-color: $accent; color: $background; } /* Marks */ &.mbsc-calendar-mark { background: $mark; } &.mbsc-calendar-label { color: $event; } &.mbsc-calendar-label-inner { color: get-contrast-color($event); } &.mbsc-calendar-label.mbsc-calendar-label-active, &.mbsc-calendar-label.mbsc-calendar-label-dragging { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 1px 3px -1px rgba(0, 0, 0, 0.2); } &.mbsc-calendar-text-more { box-shadow: none; } &.mbsc-calendar-text-more .mbsc-calendar-label-text { color: $text; } /* Picker */ &.mbsc-calendar-popup { .mbsc-popup-arrow, .mbsc-popup-body { background: $picker-background; } } /* Desktop style */ &.mbsc-calendar-height-md { .mbsc-calendar-week-day, .mbsc-calendar-day, .mbsc-calendar-day:after { border-color: $border; } } /* Multi month grid view */ &.mbsc-calendar-month-title { color: $accent; } } } @if ($mbsc-material-theme and $mbsc-calendar-view) { .mbsc-material { &.mbsc-calendar-wrapper-fixed:after { content: ''; position: absolute; z-index: 6; bottom: -0.5em; left: 0; right: 0; height: 0.5em; pointer-events: none; } &.mbsc-calendar-controls { padding: 0.5em; } &.mbsc-calendar-week-day { height: 2.5em; line-height: 2.5em; font-size: 0.75em; font-weight: bold; } &.mbsc-calendar-week-nr { width: 2.363637em; height: auto; font-size: 0.6875em; line-height: 3em; font-weight: bold; } &.mbsc-calendar-button.mbsc-button { padding: .428572em; } &.mbsc-calendar-title { font-size: 1.428572em; font-weight: 400; text-transform: none; line-height: 1.4em; } &.mbsc-calendar-cell-text { height: 2em; padding: 0 .5em; line-height: 2em; border-radius: 2em; } &.mbsc-calendar-month-name { font-size: .8125em; } &.mbsc-calendar-month-name.mbsc-ltr { padding-left: .461539em; // margin-right: -1em; } &.mbsc-calendar-month-name.mbsc-rtl { padding-right: .461539em; // margin-left: -1em; } &.mbsc-calendar-day-text { height: 1.846154em; width: 1.846154em; line-height: 1.846154em; margin: .230769em auto; padding: 0; font-size: .8125em; border: 2px solid transparent; } /* Range Highlight */ &.mbsc-range-day::after, &.mbsc-range-hover::before { content: ''; height: 1.75em; position: absolute; left: 0; right: 0; top: .25em; z-index: -1; } // &.mbsc-range-hover::before { box-sizing: content-box; height: 1.5em; border-top: 2px dashed; border-bottom: 2px dashed; } &.mbsc-range-day-start.mbsc-ltr::after, &.mbsc-range-day-end.mbsc-rtl::after { margin-left: -.875em; border-radius: 2em 0 0 2em; left: 50%; right: 0; } &.mbsc-range-day-end.mbsc-ltr::after, &.mbsc-range-day-start.mbsc-rtl::after { margin-right: -.875em; border-radius: 0 2em 2em 0; right: 50%; left: 0; } &.mbsc-range-hover-start.mbsc-ltr::before, &.mbsc-range-hover-end.mbsc-rtl::before { left: 50%; right: 0; } &.mbsc-range-hover-end.mbsc-ltr::before, &.mbsc-range-hover-start.mbsc-rtl::before { right: 50%; left: 0; } &.mbsc-range-day-start.mbsc-range-day-end::after, &.mbsc-range-hover-start.mbsc-range-hover-end::before { display: none; } /* Marks */ &.mbsc-calendar-marks { margin-top: -.375em; transition: transform .1s ease-out; } &.mbsc-focus .mbsc-calendar-marks, &.mbsc-hover .mbsc-calendar-marks, &.mbsc-selected .mbsc-calendar-marks, &.mbsc-calendar-day-colors .mbsc-calendar-marks, &.mbsc-highlighted .mbsc-calendar-marks, &.mbsc-hover-highlighted .mbsc-calendar-marks { transform: translate3d(0, .25em, 0); } /* Labels */ &.mbsc-calendar-label { font-weight: 600; border-radius: .4em; } &.mbsc-calendar-label-background { margin: 0 -.1em; background: currentColor; } &.mbsc-calendar-text:before { border-radius: .4em; color: inherit; } &.mbsc-calendar-label:before { margin: 0 -.1em; border-radius: 0; } &.mbsc-calendar-label-start.mbsc-ltr .mbsc-calendar-label-background, &.mbsc-calendar-label-end.mbsc-rtl .mbsc-calendar-label-background, &.mbsc-calendar-label-start.mbsc-ltr.mbsc-calendar-text:before, &.mbsc-calendar-label-end.mbsc-rtl.mbsc-calendar-text:before { margin-left: 0; border-top-left-radius: .4em; border-bottom-left-radius: .4em; color: inherit; } &.mbsc-calendar-label-end.mbsc-ltr .mbsc-calendar-label-background, &.mbsc-calendar-label-start.mbsc-rtl .mbsc-calendar-label-background, &.mbsc-calendar-label-end.mbsc-ltr.mbsc-calendar-text:before, &.mbsc-calendar-label-start.mbsc-rtl.mbsc-calendar-text:before { margin-right: 0; border-top-right-radius: .4em; border-bottom-right-radius: .4em; color: inherit; } /* Desktop style */ &.mbsc-calendar-height-md { .mbsc-calendar-slide { padding: 0; } .mbsc-calendar-day { border-bottom: 1px solid; } .mbsc-calendar-day:after { position: absolute; top: 0; right: 100%; bottom: 0; z-index: 1; margin-right: -1px; border-left-width: 1px; border-left-style: solid; content: ''; } .mbsc-calendar-week-nr { font-size: 0.6875em; line-height: 3.636363em; } } &.mbsc-calendar-width-md { .mbsc-calendar-week-day { padding: 0 1em; } .mbsc-calendar-week-nr { padding: 0; } .mbsc-calendar-day-inner { min-height: 4em; } .mbsc-calendar-day-labels .mbsc-calendar-day-inner { min-height: 5.5em; } .mbsc-calendar-day-text { margin: .461539em; } .mbsc-calendar-marks { padding: 0 1.125em; margin-left: -1px; margin-right: -1px; } .mbsc-calendar-text { height: 1.8em; line-height: 1.8em; margin: 0 .5em .2em .6em; } .mbsc-calendar-label { padding: 0 .4em; } .mbsc-calendar-label-text { font-size: 1.2em; } .mbsc-calendar-label:before, .mbsc-calendar-label-background { margin: 0 -.4em; } } &.mbsc-calendar-height-md.mbsc-calendar-width-md { .mbsc-calendar-week-day.mbsc-ltr, .mbsc-calendar-day.mbsc-ltr, .mbsc-calendar-marks.mbsc-ltr { text-align: left; } .mbsc-calendar-week-day.mbsc-rtl, .mbsc-calendar-day.mbsc-rtl, .mbsc-calendar-marks.mbsc-rtl { text-align: right; } } } @include mbsc-material-calendar-view('material', $mbsc-material-colors); @include mbsc-material-calendar-view('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-calendar-view($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-param: map-get($params, 'calendar-background'); $text-param: map-get($params, 'calendar-text'); $accent-param: map-get($params, 'calendar-accent'); $border-param: map-get($params, 'calendar-border'); $mark-param: map-get($params, 'calendar-mark'); $event-param: map-get($params, 'calendar-event'); $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background-param), $text)); $accent: if($accent-param, $accent-param, $accent); $mark: if($mark-param, $mark-param, rgba($text, .5)); $event: if($event-param, $event-param, $accent); $alt-text: ''; $border: ''; $button-bg: ''; $hover: ''; @if (lightness($background) > 50%) { $alt-text: lighten($text, 20%); $border: darken($background, 10%); $button-bg: darken($background, 20%); $hover: rgba($text, .1); } @else { $alt-text: darken($text, 20%); $border: lighten($background, 10%); $button-bg: lighten($background, 15%); $hover: rgba($text, .22); } $border: if($border-param, $border-param, $border); .mbsc-#{$theme} { &.mbsc-calendar { color: $text; } &.mbsc-calendar-button.mbsc-button { color: $text; &.mbsc-active { background: lighten($button-bg, 15%); border-color: lighten($button-bg, 15%); } &.mbsc-focus { box-shadow: 0 0 0 1px $text; } } &.mbsc-calendar-wrapper-fixed { border-bottom: 1px solid $border; } &.mbsc-calendar-slide { background: $background; color: $text; } &.mbsc-calendar-week-day { color: $alt-text; } &.mbsc-calendar-week-nr, &.mbsc-calendar-today { color: $accent; } /* range highlight and selection */ &.mbsc-range-day { border-left-color: rgba($accent, .25); } &.mbsc-range-day-start.mbsc-ltr, &.mbsc-range-day-end.mbsc-rtl { border-left-color: transparent; } &.mbsc-range-hover .mbsc-calendar-cell-inner { border-top-color: $hover; border-bottom-color: $hover; border-style: dashed; } // &.mbsc-range-hover-start .mbsc-calendar-cell-inner { // border-left-color: $hover; // } // &.mbsc-range-hover-end .mbsc-calendar-cell-inner { // border-right-color: $hover; // } // &.mbsc-selected .mbsc-calendar-cell-inner { // border-color: transparent; // } // &.mbsc-range-day-start, // &.mbsc-range-day-end { // border-left-color: $accent; // border-right-color: $accent; // } // &.mbsc-range-day-start.mbsc-range-day-end { // border-left-color: transparent; // } &.mbsc-selected, &.mbsc-range-day { .mbsc-calendar-cell-inner { background: rgba($accent, .25); } } &.mbsc-selected.mbsc-range-day { .mbsc-calendar-cell-inner { background-color: $accent; } .mbsc-calendar-cell-text { color: get-contrast-color($accent); } } &.mbsc-calendar-day-colors.mbsc-selected:after { border: 2px solid $accent; } &.mbsc-calendar-cell.mbsc-focus:after { border: 1px solid $text; } &.mbsc-calendar-cell.mbsc-hover:after { background: $hover; } /* Marks */ &.mbsc-calendar-mark { background: $mark; } &.mbsc-calendar-label { color: $event; } &.mbsc-calendar-label-inner { color: get-contrast-color($event); } &.mbsc-calendar-label.mbsc-calendar-label-active { outline: 1px solid $text; } &.mbsc-calendar-text-more .mbsc-calendar-label-text { color: $text; } &.mbsc-calendar-height-md { .mbsc-calendar-week-day { border-color: $border; } } &.mbsc-calendar-width-md { .mbsc-calendar-day, .mbsc-calendar-day:after { border-color: $border; } } /* Picker */ &.mbsc-calendar-popup { .mbsc-popup-arrow, .mbsc-popup { background: $background; border-color: $border; } } /* Multi month grid view */ &.mbsc-calendar-month-title { color: $accent; } } } @if ($mbsc-windows-theme and $mbsc-calendar-view) { .mbsc-windows { &.mbsc-calendar-header { margin-bottom: -1px; } &.mbsc-calendar-button.mbsc-button.mbsc-font { margin: 1px; } &.mbsc-calendar-title-wrapper .mbsc-calendar-button { padding: 0; } &.mbsc-calendar-controls { padding: .5em; min-height: 2.125em; } &.mbsc-calendar-week-day { height: 2.5em; font-size: 0.75em; line-height: 2.5em; } &.mbsc-calendar-body .mbsc-calendar-week-day { border: 0; } &.mbsc-calendar-week-nr { width: 2.166667em; font-size: .75em; font-weight: bold; line-height: 3em; } &.mbsc-calendar-picker-slide { padding: .25em; } &.mbsc-calendar-cell { border-width: 0; border-style: solid; // border-top-width: 1px; border-color: transparent; background-clip: padding-box; padding: 0; } &.mbsc-calendar-cell:after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; } &.mbsc-calendar-cell-inner { display: table; position: relative; width: 100%; height: 100%; box-sizing: border-box; border: 1px solid transparent; border-top-width: 2px; border-bottom-width: 2px; } &.mbsc-calendar-cell-text { display: table-cell; vertical-align: middle; min-width: 0; } &.mbsc-calendar-month-name { font-size: .875em; vertical-align: middle; &.mbsc-ltr { margin-left: .5em; } &.mbsc-rtl { margin-right: .5em; } } &.mbsc-calendar-day-inner { display: block; } &.mbsc-calendar-day-empty:after { display: none; } &.mbsc-calendar-day-text { display: inline-block; font-size: .875em; line-height: 2.285715em; border-radius: 2em; // width: 2.285715em; margin: 0 .5em; } /* Marks */ &.mbsc-calendar-marks { bottom: .25em; // margin-top: -0.5em; } &.mbsc-calendar-label-background { background: currentColor; } &.mbsc-calendar-width-md { .mbsc-calendar-title { font-size: 1.625em; font-weight: 300; line-height: 1.461538em; padding: 0 0.307693em; } .mbsc-calendar-week-day { height: 2.142858em; padding: 0 0.5em; font-size: 0.875em; line-height: 2.142858em; } .mbsc-calendar-week-nr { padding: 0; font-size: .75em; } .mbsc-calendar-day:after { border-left-width: 1px; border-left-style: solid; } .mbsc-calendar-day-inner { min-height: 4em; } .mbsc-calendar-day-text { text-align: center; } .mbsc-calendar-day-labels .mbsc-calendar-day-inner { min-height: 4.625em; } .mbsc-calendar-marks { // margin: 0; bottom: .5em; padding: 0 0.625em; } .mbsc-calendar-text { height: 1.8em; line-height: 1.8em; padding: 0 .6em; } .mbsc-calendar-label-text { font-size: 1.2em; } .mbsc-calendar-week-day.mbsc-ltr, .mbsc-calendar-day.mbsc-ltr, .mbsc-calendar-marks.mbsc-ltr { text-align: left; } .mbsc-calendar-week-day.mbsc-rtl, .mbsc-calendar-day.mbsc-rtl, .mbsc-calendar-marks.mbsc-rtl { text-align: right; } .mbsc-calendar-day.mbsc-calendar-day-labels { text-align: center; } } &.mbsc-calendar-grid-view .mbsc-calendar-title { font-size: 1.625em; font-weight: 300; line-height: 1.461538em; padding: 0 0.307693em; } } @include mbsc-windows-calendar-view('windows', $mbsc-windows-colors); @include mbsc-windows-calendar-view('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-calendar-view { @keyframes mbsc-zoom-in-up { from { opacity: 0; transform: scale(2); } to { opacity: 1; transform: scale(1); } } @keyframes mbsc-zoom-in-down { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } } @keyframes mbsc-zoom-out-up { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2); } } @keyframes mbsc-zoom-out-down { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.5); } } .mbsc-calendar { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; flex-direction: column; touch-action: manipulation; position: relative; } .mbsc-calendar-wrapper { position: relative; width: 100%; height: 100%; overflow: hidden; } /* Header */ .mbsc-calendar-header { position: relative; z-index: 1; will-change: opacity; .mbsc-calendar-week-days { margin-left: -1px; } } .mbsc-calendar, .mbsc-calendar-title-wrapper, .mbsc-calendar-controls { display: flex; } .mbsc-calendar-controls { align-items: center; box-sizing: content-box; min-height: 2.5em; } .mbsc-calendar-button.mbsc-button.mbsc-reset { margin: 0; } .mbsc-calendar-button-prev-multi { order: -1; } .mbsc-calendar-button-next-multi { order: 1; } .mbsc-calendar-body { height: 100%; box-sizing: border-box; overflow: hidden; } .mbsc-calendar-body-inner { height: 100%; position: relative; overflow: hidden; margin-left: -1px; } .mbsc-calendar-wrapper-fixed { display: block; height: auto; overflow: visible; flex: 0 0 auto; .mbsc-calendar-header { display: block; } .mbsc-calendar-body { display: block; height: auto; } } .mbsc-calendar-hidden { visibility: hidden; } .mbsc-calendar-title-wrapper { flex: 1; align-items: center; overflow: hidden; } .mbsc-calendar-title-wrapper-multi .mbsc-calendar-button { flex: 1; } .mbsc-calendar-title { overflow: hidden; text-overflow: ellipsis; font-size: 1.125em; // line-height: 2.222223em; padding: 0 0.25em; display: inline-block; vertical-align: middle; } /* Scrollview */ .mbsc-calendar-scroll-wrapper { display: block; overflow: hidden; position: relative; height: 100%; } .mbsc-calendar-picker-wrapper { position: relative; width: 15em; height: 15em; overflow: hidden; } .mbsc-calendar-picker { width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; } .mbsc-calendar-picker-main { position: relative; z-index: 0; } .mbsc-calendar-picker-in-up { opacity: 0; animation: mbsc-zoom-in-up 200ms cubic-bezier(0.0, 0.0, 0.2, 1) forwards; } .mbsc-calendar-picker-in-down { opacity: 0; animation: mbsc-zoom-in-down 200ms cubic-bezier(0.0, 0.0, 0.2, 1) forwards; } .mbsc-calendar-picker-out-up { opacity: 0; animation: mbsc-zoom-out-up 200ms cubic-bezier(0.4, 0.0, 1, 1) forwards; } .mbsc-calendar-picker-out-down { opacity: 0; animation: mbsc-zoom-out-down 200ms cubic-bezier(0.0, 0.0, 0.2, 1) forwards; } .mbsc-calendar-scroll-wrapper > div { height: 100%; } .mbsc-calendar-scroll-wrapper > div > div { height: 100%; transform: translate3d(0, 0, 0); } .mbsc-calendar-slide { position: absolute; z-index: 0; top: 0; width: 100%; height: 100%; box-sizing: border-box; } .mbsc-calendar-slide.mbsc-ltr { left: 0; } .mbsc-calendar-slide.mbsc-rtl { right: 0; } .mbsc-calendar-slide:first-child { position: relative; } .mbsc-calendar-table { height: 100%; // Needed for iOS Safari to prevent animation flicker transform: translateZ(0); } .mbsc-calendar-cell { position: relative; text-align: center; white-space: nowrap; cursor: pointer; } .mbsc-calendar-cell:focus { outline: 0; } .mbsc-calendar-cell-inner { display: inline-block; padding: 0 .25em; vertical-align: middle; } .mbsc-calendar-cell.mbsc-disabled { cursor: not-allowed; } .mbsc-calendar-week-day { height: 2em; font-size: 0.6875em; line-height: 2em; text-align: center; border-bottom: 1px solid transparent; } .mbsc-calendar-year, .mbsc-calendar-month { vertical-align: middle; } .mbsc-calendar-year-text, .mbsc-calendar-month-text { margin: .875em 0; overflow: hidden; text-overflow: ellipsis; min-width: 4.5em; box-sizing: border-box; } .mbsc-calendar-day { /* if only width is used, layout is broken with week numbers displayed */ max-width: 14.285715%; text-align: center; vertical-align: top; } .mbsc-calendar-day-empty { cursor: default; } .mbsc-calendar-day-text { display: inline-block; text-align: center; box-sizing: content-box; } .mbsc-calendar-day-inner { position: relative; width: 100%; height: 100%; padding: 0; border: 1px solid transparent; box-sizing: border-box; } .mbsc-calendar-day-hidden { visibility: hidden; } .mbsc-calendar-month-name { display: none; } .mbsc-calendar-width-md { .mbsc-calendar-month-name { display: inline-block; font-weight: bold; } } .mbsc-calendar-day-outer .mbsc-calendar-day-text, .mbsc-calendar-day-outer .mbsc-calendar-month-name { opacity: .5; } .mbsc-calendar-day-outer.mbsc-selected .mbsc-calendar-day-text, .mbsc-calendar-day-outer.mbsc-selected .mbsc-calendar-month-name { opacity: 1; } .mbsc-disabled .mbsc-calendar-cell-text, .mbsc-disabled .mbsc-calendar-month-name { opacity: .2; } /* Day highlight */ .mbsc-calendar-day-highlight:before { content: ' '; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, .1); } /* Marks */ .mbsc-calendar-day-marked { padding-bottom: 0.25em; } .mbsc-calendar-marks { position: absolute; left: 0; right: 0; height: 0.375em; margin-top: -0.125em; overflow: hidden; white-space: nowrap; text-align: center; } .mbsc-calendar-mark { display: inline-block; vertical-align: top; width: 0.25em; height: 0.25em; margin: 0.0625em; border-radius: 0.25em; } /* Labels */ .mbsc-calendar-labels { position: absolute; left: -1px; right: -1px; } .mbsc-calendar-label-wrapper { position: absolute; z-index: 2; pointer-events: none; } .mbsc-calendar-label { padding: 0 .3em; } .mbsc-calendar-text:focus { outline: 0; } .mbsc-calendar-label-text { overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 2; } .mbsc-calendar-text:before, .mbsc-calendar-label-background { content: ''; position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; left: 0; transition: background-color .2s; color: inherit; } .mbsc-calendar-label.mbsc-calendar-label-hover:before { background-color: rgba(0, 0, 0, .2); z-index: 1; } .mbsc-calendar-text-more { padding: 0 .3em; } .mbsc-calendar-text-more.mbsc-calendar-label-active:before, .mbsc-calendar-text-more.mbsc-calendar-label-hover:before { background-color: rgba(0, 0, 0, .1); } .mbsc-calendar-text { display: block; position: relative; height: 1.6em; line-height: 1.6em; // overflow: hidden; font-size: 0.625em; white-space: nowrap; margin: 0 .1em .2em .2em; } .mbsc-calendar-text-placeholder { z-index: -1; } .mbsc-calendar-text.mbsc-ltr { text-align: left; } .mbsc-calendar-text.mbsc-rtl { text-align: right; } /* Label drag & drop */ .mbsc-calendar-label-resize { position: absolute; top: 0; height: 100%; width: .5em; z-index: 2; cursor: ew-resize; } .mbsc-calendar-label-resize:after { content: ''; display: none; position: absolute; top: 50%; width: .8em; height: .8em; margin-top: -.4em; background: #fff; border-radius: .8em; border: 1px solid currentColor; box-sizing: border-box; } .mbsc-calendar-label-resize-start.mbsc-ltr, .mbsc-calendar-label-resize-end.mbsc-rtl { left: 0; } .mbsc-calendar-label-resize-start.mbsc-rtl, .mbsc-calendar-label-resize-end.mbsc-ltr { right: 0; } .mbsc-calendar-label-resize-start.mbsc-ltr:after, .mbsc-calendar-label-resize-end.mbsc-rtl:after { left: -.4em; } .mbsc-calendar-label-resize-end.mbsc-ltr:after, .mbsc-calendar-label-resize-start.mbsc-rtl:after { right: -.4em; } .mbsc-calendar-label-resize-start-touch:before, .mbsc-calendar-label-resize-end-touch:before { content: ''; position: absolute; top: 50%; margin-top: -1em; width: 2em; height: 2em; } .mbsc-calendar-label-resize-start-touch:before { left: -1em; } .mbsc-calendar-label-resize-end-touch:before { right: -1em; } .mbsc-calendar-label-hover, .mbsc-calendar-label-dragging { .mbsc-calendar-label-resize:after { display: block; } } .mbsc-calendar-label-inactive { opacity: .4; } .mbsc-calendar-label-hidden { visibility: hidden; } .mbsc-calendar-labels-dragging { z-index: 3; } /* Multi month grid view */ // /* TODO: refactor */ // .mbsc-calendar-grid-view { // .mbsc-calendar-wrapper, // .mbsc-calendar-body, // .mbsc-calendar-body-inner { // overflow: hidden; // display: flex; // flex-direction: column; // flex: 1 1 auto; // } // } .mbsc-calendar-grid { overflow: auto; padding: 0 2%; .mbsc-calendar-table { margin: 0 5%; width: 90%; } } .mbsc-calendar-grid-item { margin: 1em 0; // Space for month title, needed for height 100% to work correctly for .mbsc-calendar-table in Safari padding-top: 2.5em; } .mbsc-calendar-month-title { padding-bottom: .8em; margin: 0 10%; margin-top: -2em; font-size: 1.25em; font-weight: bold; line-height: 1.2em; } /* Variable row */ .mbsc-calendar-body-inner-variable { overflow-y: auto; } } @mixin mbsc-mobiscroll-list($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-list-header { background: $background; color: $accent; border-color: rgba($text, .125); } &.mbsc-list-item { background: $background; color: $text; border-color: rgba($text, .125); } } } @if ($mbsc-mobiscroll-theme and $mbsc-eventcalendar) { .mbsc-mobiscroll { &.mbsc-list-header { padding: .5em 1em; font-size: .75em; text-transform: uppercase; border-bottom: 1px solid; } &.mbsc-list-item { border-bottom: 1px solid; } } @include mbsc-mobiscroll-list('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-list('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-list($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $colors: mbsc-ios-colors($params); $background-alt: ''; $background-contrast: ''; $border-color: ''; $header-background: ''; $header-text: ''; @if (lightness($background) > 50%) { $background-alt: lighten($background, 3%); $background-contrast: #000; $border-color: darken($background, 17%); $header-background: adjust-hue(darken(saturate($background, 19%), 2%), 240deg); $header-text: adjust-hue(lighten(saturate($text, 2%), 44%), 240deg); } @else { $background-alt: $background; $background-contrast: #fff; $border-color: lighten($background, 20%); $header-background: adjust-hue(lighten(desaturate($background, 19%), 10%), 240deg); $header-text: adjust-hue(darken(desaturate($text, 2%), 44%), 240deg); } .mbsc-#{$theme} { &.mbsc-list-item { background: $background-alt; border-color: $border-color; color: $text; } &.mbsc-list-item:before, &.mbsc-list-item:after { border-top: 1px solid $border-color; } &.mbsc-list-header { background: $header-background; color: $header-text; border-color: $border-color; } &.mbsc-list-item.mbsc-focus:before, &.mbsc-list-item.mbsc-hover:before { background: rgba($background-contrast, .05); } &.mbsc-list-item.mbsc-active:before { background: rgba(0, 0, 0, .15); } } } @if ($mbsc-ios-theme and $mbsc-eventcalendar) { .mbsc-ios { &.mbsc-list-item { margin-top: -1px; padding: 1em; } &.mbsc-list-item:before, &.mbsc-list-item:after { content: ''; position: absolute; right: 0; left: 1em; } &.mbsc-list-item.mbsc-rtl:before, &.mbsc-list-item.mbsc-rtl:after { left: 0; right: 1em; } &.mbsc-list-item:before { top: 0; transition: none; } &.mbsc-list-item:after { bottom: 0; } &.mbsc-list-item:first-child:before, &.mbsc-list-item:last-child:after { left: 0; right: 0; } &.mbsc-list-item.mbsc-hover, &.mbsc-list-item.mbsc-active { z-index: 3; } &.mbsc-list-item.mbsc-focus { z-index: 5; } &.mbsc-list-item.mbsc-focus:before, &.mbsc-list-item.mbsc-focus:after, &.mbsc-list-item.mbsc-hover:before, &.mbsc-list-item.mbsc-hover:after, &.mbsc-list-item.mbsc-active:before, &.mbsc-list-item.mbsc-active:after { left: 0; right: 0; } &.mbsc-list-header { z-index: 4; margin-top: -1px; padding: 2.333334em 1.333334em .5em 1.333334em; font-size: .75em; line-height: 1.5em; border-top: 1px solid; border-bottom: 1px solid; text-transform: uppercase; } &.mbsc-list-header:first-child { border-top: 0; margin-top: 0; } } @include mbsc-ios-list('ios', $mbsc-ios-colors); @include mbsc-ios-list('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-list($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-list-header { background: $background; color: $accent; } &.mbsc-list-item { background: $background; color: $text; } &.mbsc-list-item.mbsc-hover:before { background: rgba(0, 0, 0, .05); } &.mbsc-list-item.mbsc-active:before { background: rgba(0, 0, 0, .1); } } } @if ($mbsc-material-theme and $mbsc-eventcalendar) { .mbsc-material { &.mbsc-list-header { margin-top: -1px; font-size: .875em; font-weight: 600; padding: .5714em 1.14285em; } } @include mbsc-material-list('material', $mbsc-material-colors); @include mbsc-material-list('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-list($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $active: ''; $hover: ''; @if (lightness($background) > 50%) { $active: lighten($text, 60%); $hover: lighten($text, 70%); } @else { $active: darken($text, 60%); $hover: darken($text, 70%); } .mbsc-#{$theme} { &.mbsc-list-header, &.mbsc-list-item { background: $background; color: $text; } &.mbsc-list-item.mbsc-focus { // background: rgba($accent, .3); box-shadow: 0 0 0 1px $text inset; } &.mbsc-list-item.mbsc-hover:before { background: $hover; } &.mbsc-list-item.mbsc-active:before { background: $active; } } } @if ($mbsc-windows-theme and $mbsc-eventcalendar) { .mbsc-windows { &.mbsc-list-header { // font-size: .9375em; font-weight: 500; line-height: 1.25em; } &.mbsc-list-item { padding: .5em; line-height: 1.25em; } } @include mbsc-windows-list('windows', $mbsc-windows-colors); @include mbsc-windows-list('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-eventcalendar { .mbsc-list { display: block; } .mbsc-list-header { display: flex; } .mbsc-list-item { position: relative; z-index: 2; list-style: none; display: flex; box-sizing: border-box; overflow: hidden; line-height: 1.25em; } .mbsc-list-item-actionable { cursor: pointer; } .mbsc-list-item:before { content: ''; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; transition: background-color .2s ease-out; color: inherit; } .mbsc-list-item:focus { outline: 0; } .mbsc-list-item::-moz-focus-inner { border: 0; } } @if $mbsc-eventcalendar { .mbsc-schedule-grid-wrapper { overflow: hidden; position: relative; } .mbsc-timeline-resource-col, .mbsc-schedule-time-col { flex: none; width: 4.25em; box-sizing: border-box; } /* Schedule grid */ .mbsc-timeline-grid-scroll, .mbsc-schedule-grid-scroll { overflow-x: auto; overflow-y: scroll; -webkit-overflow-scrolling: touch; } .mbsc-schedule-grid { flex: 1 0 auto; } /* Borders */ .mbsc-schedule-all-day-item::after, .mbsc-timeline-day::after { content: ''; position: absolute; top: 0; bottom: 0; z-index: 1; } .mbsc-schedule-all-day-item.mbsc-ltr::after, .mbsc-timeline-day.mbsc-ltr::after { left: 100%; border-right-style: solid; border-right-width: 1px; } .mbsc-schedule-all-day-item.mbsc-rtl::after, .mbsc-timeline-day.mbsc-rtl::after { right: 100%; border-left-style: solid; border-left-width: 1px; } .mbsc-timeline-slot-header.mbsc-rtl, // .mbsc-timeline-day.mbsc-rtl, .mbsc-timeline-header-date.mbsc-rtl, .mbsc-timeline-resource.mbsc-rtl, .mbsc-timeline-resource-empty.mbsc-rtl, .mbsc-timeline-header-column.mbsc-rtl, .mbsc-timeline-column.mbsc-rtl, // .mbsc-schedule-all-day-item.mbsc-ltr, .mbsc-schedule-column.mbsc-ltr { border-left-style: solid; border-left-width: 1px; } .mbsc-timeline-slot-header.mbsc-ltr, // .mbsc-timeline-day.mbsc-ltr, .mbsc-timeline-header-date.mbsc-ltr, .mbsc-timeline-resource.mbsc-ltr, .mbsc-timeline-resource-empty.mbsc-ltr, .mbsc-timeline-header-column.mbsc-ltr, .mbsc-timeline-column.mbsc-ltr, // .mbsc-schedule-all-day-item.mbsc-rtl, .mbsc-schedule-column.mbsc-rtl { border-right-style: solid; border-right-width: 1px; } /* Schedule event */ .mbsc-schedule-event:focus { outline: none; } .mbsc-schedule-event { position: absolute; padding: 1px 0; box-sizing: border-box; min-height: .75em; z-index: 1; } .mbsc-schedule-event.mbsc-ltr { left: 0; } .mbsc-schedule-event.mbsc-rtl { right: 0; } .mbsc-schedule-event-hover { cursor: pointer; } .mbsc-schedule-event-inner { position: relative; max-height: 100%; margin: 0 .2em; line-height: 1.5em; font-size: .625em; padding: .5em; box-sizing: border-box; overflow: hidden; } .mbsc-schedule-event-small-height.mbsc-schedule-event-inner { padding-top: 0; padding-bottom: 0; line-height: 1.2em; margin-top: -1px; } .mbsc-schedule-event-small-height.mbsc-schedule-event-inner .mbsc-schedule-event-title { font-size: 1em; } .mbsc-schedule-event-background { position: absolute; top: -.5em; left: 1px; right: 1px; bottom: -.5em; background: currentColor; } .mbsc-schedule-event-start { .mbsc-schedule-event-background { top: 1px; } } .mbsc-schedule-event-end { .mbsc-schedule-event-background { bottom: 1px; } } .mbsc-schedule-event-range { font-size: .8em; } .mbsc-schedule-event-all-day { position: relative; display: block; padding: 0; margin: .125em 0; min-height: 0; box-sizing: content-box; z-index: 2; } .mbsc-schedule-event-all-day-placeholder { z-index: -1; } .mbsc-schedule-event-all-day-inner { position: relative; height: 1.6em; line-height: 1.6em; margin: 0 .2em; padding: 0 .3em; font-size: .625em; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .mbsc-schedule-event-all-day-background.mbsc-schedule-event-background { top: 0; bottom: 0; } /* Timeline event */ .mbsc-timeline-event { z-index: 2; min-width: .75em; .mbsc-schedule-event-title, .mbsc-schedule-event-range { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } } /* Event Drag & drop */ .mbsc-schedule-event-dragging { position: absolute; top: 0; z-index: 3; } .mbsc-schedule-event-inactive { opacity: .5; } .mbsc-schedule-event-hidden { visibility: hidden; } /* Event resize handles */ .mbsc-schedule-event-resize { display: none; position: absolute; left: 0; right: 0; height: .25em; z-index: 1; cursor: ns-resize; } .mbsc-schedule-event-resize-start { top: 0; } .mbsc-schedule-event-resize-end { bottom: 0; } .mbsc-schedule-event-resize-start:after { top: -.25em; right: .5em; } .mbsc-schedule-event-resize-end:after { bottom: -.25em; left: .5em; } .mbsc-schedule-event-resize:after { content: ''; position: absolute; margin: 1px 0; width: .5em; height: .5em; background: #fff; border-radius: 50%; border: 1px solid currentColor; box-sizing: border-box; } .mbsc-schedule-event-resize-start-touch:before, .mbsc-schedule-event-resize-end-touch:before { content: ''; position: absolute; margin: 1px 0; width: 1.5em; height: 1em; } .mbsc-schedule-event-resize-start-touch:before { top: -.5em; right: 0; } .mbsc-schedule-event-resize-end-touch:before { bottom: -.5em; left: 0; } // .mbsc-schedule-event-active, .mbsc-schedule-event-dragging, .mbsc-schedule-event-hover { .mbsc-schedule-event-resize { display: block; } } /* Blocking and colored date styles */ .mbsc-schedule-invalid, .mbsc-schedule-color { position: absolute; top: -.5em; bottom: -.5em; left: 0; right: 0; box-sizing: content-box; z-index: 0; overflow: hidden; } .mbsc-schedule-invalid-all-day, .mbsc-schedule-color-all-day { top: 0; bottom: 0; z-index: -1; } .mbsc-schedule-invalid-start, .mbsc-schedule-color-start { padding-top: .5em; margin-top: -.5em; } .mbsc-schedule-invalid-end, .mbsc-schedule-color-end { padding-bottom: .5em; } .mbsc-schedule-invalid-text, .mbsc-schedule-color-text { padding: .375em; font-size: .75em; } .mbsc-schedule-color-text { opacity: .8; } /* Time indicator */ .mbsc-schedule-time-indicator { position: absolute; z-index: 2; pointer-events: none; } .mbsc-schedule-time-indicator-x { border-bottom: 1px solid; } .mbsc-schedule-time-indicator-x.mbsc-ltr { left: 4.25em; right: 0; } .mbsc-schedule-time-indicator-x.mbsc-rtl { right: 4.25em; left: 0; } .mbsc-schedule-time-indicator-y { border-left: 1px solid; height: 100%; margin-top: -.3125em; &.mbsc-ltr { margin-left: -1px; } &.mbsc-rtl { margin-right: -1px; } } .mbsc-schedule-time-indicator-day { position: absolute; width: 14.285714%; } .mbsc-schedule-time-indicator-day:before { content: ''; position: absolute; width: .4375em; height: .4375em; margin-top: -.1875em; margin-left: -.1875em; margin-right: -.1875em; border-radius: 50%; z-index: 1; } .mbsc-schedule-time-indicator-time { position: absolute; top: -1em; font-size: .625em; line-height: 2em; margin-top: 1px; padding: 0 .8em; white-space: nowrap; } .mbsc-schedule-time-indicator-time-y { top: -1.8em; padding: 0 .5em; margin-left: -.5em; margin-right: -.5em; line-height: 1.6em; } .mbsc-schedule-time-indicator-time-x.mbsc-ltr, .mbsc-schedule-time-indicator-time-y.mbsc-rtl { right: 100%; } .mbsc-schedule-time-indicator-time-x.mbsc-rtl, .mbsc-schedule-time-indicator-time-y.mbsc-ltr { left: 100%; } /* Cursor indicator */ // .mbsc-cursor-indicator { // position: absolute; // z-index: 3; // } // .mbsc-cursor-indicator-x { // top: 1.875em; // } // .mbsc-cursor-indicator-y.mbsc-ltr { // left: 4.25em; // } // .mbsc-cursor-indicator-y.mbsc-rtl { // right: 4.25em; // } // .mbsc-cursor-indicator-time { // line-height: 1.6em; // font-size: .625em; // line-height: 2em; // padding: 0 .8em; // white-space: nowrap; // } // .mbsc-cursor-indicator-time-y { // position: absolute; // margin-top: -.5em; // } // .mbsc-cursor-indicator-time-y.mbsc-ltr { // right: 100%; // } // .mbsc-cursor-indicator-time-y.mbsc-rtl { // left: 100%; // } @supports (overflow:clip) { .mbsc-schedule-event-inner { position: sticky; top: 0; } } } @if $mbsc-eventcalendar { .mbsc-schedule-wrapper { overflow: auto; } /* Resource groups */ .mbsc-schedule-resource-group { // min-width: 16em; box-sizing: border-box; flex-basis: 16em; } .mbsc-schedule-resource-group:first-child:last-child { // min-width: 0; flex-basis: 0; } .mbsc-schedule-resource-group.mbsc-ltr { border-left-width: 2px; border-left-style: solid; } .mbsc-schedule-resource-group.mbsc-rtl { border-right-width: 2px; border-right-style: solid; } .mbsc-schedule-resource-group:first-child { border: 0; } /* Schedule header */ .mbsc-schedule-date-header-text { line-height: 1.5em; text-align: center; } .mbsc-schedule-header { overflow: hidden; } .mbsc-schedule-all-day-group-wrapper, .mbsc-schedule-header-wrapper { min-width: 0; overflow: hidden; } .mbsc-schedule-header-item { display: block; // for angular component which displays in inline position: relative; text-align: center; line-height: 1.25em; } .mbsc-schedule-header-item.mbsc-hover { cursor: pointer; } .mbsc-schedule-header-dayname { font-size: .75em; } .mbsc-schedule-header-day { font-size: 1.125em; } /* Schedule column width for: header item, header resource, all-day item, schedule column */ .mbsc-schedule-col-width { box-sizing: border-box; // min-width: 0; // needed for the items equal width width: 2.5em; } .mbsc-schedule-wrapper-multi .mbsc-schedule-col-width { width: 6.25em; } /* Resource title */ .mbsc-schedule-resource { overflow: hidden; } .mbsc-schedule-resource-title { padding: .5em; font-size: .875em; font-weight: 600; text-align: center; } /* Schedule all day event container */ .mbsc-schedule-all-day-cont { position: relative; } .mbsc-schedule-all-day-wrapper { position: relative; max-height: 7.8125em; overflow-x: hidden; overflow-y: scroll; } .mbsc-schedule-all-day-wrapper-shadow:after { content: ''; box-shadow: inset 0 0.5em 0.25em -0.5em rgba(48, 48, 48, 0.5); height: 4px; position: absolute; left: 0; right: 0; bottom: -4px; z-index: 4; pointer-events: none; } .mbsc-schedule-all-day-item { position: relative; } .mbsc-schedule-all-day-item:first-child, .mbsc-schedule-column:first-child { border: 0; } .mbsc-schedule-timezone-labels { position: absolute; bottom: 0; z-index: 1; font-weight: bold; } .mbsc-schedule-timezone-label { font-size: .75em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mbsc-schedule-time-indicator-tz { width: 5.666667em; } .mbsc-schedule-time-indicator-tz.mbsc-ltr, .mbsc-schedule-timezone-label.mbsc-ltr { text-align: right; } .mbsc-schedule-time-indicator-tz.mbsc-rtl, .mbsc-schedule-timezone-label.mbsc-rtl { text-align: left; } /* Time section */ .mbsc-schedule-time-wrapper { position: relative; width: 4.25em; height: 3.125em; box-sizing: border-box; } .mbsc-schedule-time { position: relative; line-height: 2em; top: -1em; font-size: .75em; } .mbsc-schedule-time-end { position: absolute; top: auto; bottom: -1em; left: 0; right: 0; } .mbsc-schedule-time.mbsc-ltr { text-align: right; } .mbsc-schedule-time.mbsc-rtl { text-align: left; } .mbsc-schedule-time-cont-pos { position: relative; } /* Grid */ .mbsc-schedule-time-cont-inner { position: absolute; width: 100%; z-index: 2; pointer-events: none; height: 100%; box-sizing: border-box; padding: .5em 0; } .mbsc-schedule-column { padding: .5em 0; } .mbsc-schedule-column-inner { position: relative; } .mbsc-schedule-all-day-item, .mbsc-schedule-item { box-sizing: border-box; } .mbsc-schedule-item { height: 3.125em; position: relative; border-top: 1px solid; } .mbsc-schedule-item-last { border-bottom: 1px solid; } /* Event spacing */ .mbsc-schedule-events { position: absolute; height: 100%; } .mbsc-schedule-events.mbsc-ltr { left: 0; right: .5em; } .mbsc-schedule-events.mbsc-rtl { right: 0; left: .5em; } /* All day events */ .mbsc-schedule-event-all-day { .mbsc-schedule-event-resize { width: .25em; height: 100%; cursor: ew-resize; } .mbsc-schedule-event-resize:after { top: 50%; right: auto; left: auto; margin-top: -.25em; } .mbsc-schedule-event-resize-start.mbsc-ltr, .mbsc-schedule-event-resize-end.mbsc-rtl { right: auto; } .mbsc-schedule-event-resize-end.mbsc-ltr, .mbsc-schedule-event-resize-start.mbsc-rtl { left: auto; } .mbsc-schedule-event-resize-start.mbsc-ltr:after, .mbsc-schedule-event-resize-end.mbsc-rtl:after { right: -.25em; } .mbsc-schedule-event-resize-end.mbsc-ltr:after, .mbsc-schedule-event-resize-start.mbsc-rtl:after { left: -.25em; } /* Increase touch area for resize dots */ .mbsc-schedule-event-resize-start-touch:before { height: 1.5em; top: 50%; left: -.75em; right: auto; margin-top: -.75em; } .mbsc-schedule-event-resize-end-touch:before { height: 1.5em; top: 50%; left: auto; right: -.75em; margin-top: -.75em; } } /* Large screen */ .mbsc-calendar-width-md { .mbsc-schedule-event-title { font-size: 1.2em; } .mbsc-schedule-event-range { font-size: 1em; } .mbsc-schedule-event-all-day-title { font-size: 1em; } .mbsc-schedule-event-all-day-inner { font-size: .75em; height: 1.5em; line-height: 1.5em; padding: 0 .333334em; margin: 0 .333334em; } } } @if $mbsc-eventcalendar { .mbsc-timeline { overflow: hidden; position: relative; // padding-top: 3.5em; &.mbsc-ltr { margin-right: -2px; } &.mbsc-rtl { margin-left: -2px; } } .mbsc-timeline-header-row-1 { height: 1.625em; } .mbsc-timeline-header-row-2 { height: 3.25em; } .mbsc-timeline-header-row-3 { height: 4.875em; } .mbsc-timeline-header-row-4 { height: 6.5em; } /* Resource column */ .mbsc-timeline-resource-col { width: 12em; } .mbsc-timeline-resources { position: absolute; top: 0; bottom: 15px; z-index: 4; overflow: hidden; // padding-top: 3.5em; &.mbsc-ltr { left: 0; } &.mbsc-rtl { right: 0; } } .mbsc-timeline-resource-empty { position: relative; z-index: 5; // height: 3.5em; overflow: hidden; pointer-events: auto; align-self: flex-start; } .mbsc-timeline-resource { box-sizing: border-box; overflow: hidden; } /* Hierarchy */ .mbsc-timeline-parent { background: rgba(#e6e6e6, .25); } .mbsc-timeline-resource-icon { font-size: .875em; font-weight: 600; margin: .357143em 0; cursor: pointer; box-sizing: content-box; } .mbsc-timeline-resource-icon.mbsc-ltr { margin-left: .5em; } .mbsc-timeline-resource-icon.mbsc-rtl { margin-right: .5em; } .mbsc-timeline-resource-header, .mbsc-timeline-resource-title { font-size: .875em; font-weight: 600; padding: .5em; } /* Header */ .mbsc-timeline-header { position: absolute; top: 0; bottom: 0; width: 100%; // height: 100%; overflow: hidden; z-index: 3; pointer-events: none; } .mbsc-timeline-header-time-cont { position: relative; } .mbsc-timeline-day { position: relative; min-width: 9em; box-sizing: border-box; pointer-events: auto; } .mbsc-timeline-day-month { min-width: 0; } // .mbsc-timeline-day:last-child { // // border: 0; // // margin: 0; // &::after { // border: 0; // } // .mbsc-timeline-header-column:last-child, // .mbsc-timeline-header-date { // border-left: 0; // border-right: 0; // } // } .mbsc-timeline-header-column.mbsc-timeline-no-border, .mbsc-timeline-column.mbsc-timeline-no-border { border-left: 0; border-right: 0; } .mbsc-timeline-month { min-width: 0; position: relative; } .mbsc-timeline-header-month, .mbsc-timeline-header-date, .mbsc-timeline-header-week { // height: 1.875em; height: 1.625em; box-sizing: border-box; pointer-events: auto; } .mbsc-timeline-header-month-last.mbsc-ltr, .mbsc-timeline-header-week-last.mbsc-ltr { border-right-width: 1px; border-right-style: solid; } .mbsc-timeline-header-month-last.mbsc-rtl, .mbsc-timeline-header-week-last.mbsc-rtl { border-left-width: 1px; border-left-style: solid; } .mbsc-timeline-header-month-text, .mbsc-timeline-header-date-text, .mbsc-timeline-header-week-text { font-size: .875em; // 14px padding: 0 .285714em; // line-height: 2.142858em; line-height: 1.785715em; // 25px display: inline-block; vertical-align: top; box-sizing: border-box; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .mbsc-timeline-header-week-text, .mbsc-timeline-header-month-text { overflow: visible; max-width: none; position: absolute; } .mbsc-timeline-header-month-text { font-weight: bold; } .mbsc-timeline-header-month-text-last, .mbsc-timeline-header-week-text-last { max-width: 100%; overflow: hidden; } .mbsc-timeline-header-column { border-bottom: 1px solid; height: 1.625em; } // .mbsc-cursor-indicator-time-x, .mbsc-timeline-header-time { padding: 0 .5em; font-size: .625em; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 2.6em; } /* Grid */ .mbsc-timeline-column, .mbsc-timeline-header-column { width: 4em; box-sizing: border-box; position: relative; } .mbsc-timeline-grid-scroll { overflow-y: auto; // Needed for iOS Safari to don't change the z-index stacking context -webkit-overflow-scrolling: auto; } .mbsc-timeline-grid { position: relative; overflow: hidden; } .mbsc-timeline-resource, .mbsc-timeline-row { height: 3.25em; // 52px position: relative; flex: 1 0 auto; } .mbsc-timeline-resource-empty, .mbsc-timeline-resource, .mbsc-timeline-header-date, .mbsc-timeline-header-month, .mbsc-timeline-header-week, .mbsc-timeline-column { border-bottom-style: solid; border-bottom-width: 1px; } /* Events */ .mbsc-timeline-events { position: absolute; width: 100%; top: 0; bottom: .5em; } .mbsc-timeline-event-background { top: 1px; bottom: 1px; } .mbsc-timeline-event-resize { height: 100%; width: .25em; right: auto; left: auto; cursor: ew-resize; &.mbsc-schedule-event-resize-start.mbsc-ltr, &.mbsc-schedule-event-resize-end.mbsc-rtl { left: 0; } &.mbsc-schedule-event-resize-end.mbsc-ltr, &.mbsc-schedule-event-resize-start.mbsc-rtl { right: 0; } &.mbsc-schedule-event-resize-end:after, &.mbsc-schedule-event-resize-start:after { top: 50%; margin-top: -.25em; } &.mbsc-schedule-event-resize-end:after { left: -.125em; } &.mbsc-schedule-event-resize-start:after { right: -.125em; } &.mbsc-schedule-event-resize-start-touch:before, &.mbsc-schedule-event-resize-end-touch:before { height: 1.5em; top: 50%; left: 50%; margin: -.75em 0 0 -.75em; } } .mbsc-timeline-event-listing { position: relative; &.mbsc-timeline-event-dragging { position: absolute; top: 0; } &.mbsc-schedule-event-all-day-placeholder { padding: 0; margin: .125em 0; } } /* Invalid, color */ .mbsc-timeline-color, .mbsc-timeline-invalid { top: 0; bottom: 0; padding: 0; margin: 0; } /* No time displayed */ .mbsc-timeline-header-column.mbsc-timeline-no-height { border: 0; height: 0; } // .mbsc-timeline-no-time { // // padding-top: 1.875em; // // .mbsc-timeline-resource-empty { // // height: 1.875em; // // } // // .mbsc-schedule-time-indicator { // // top: 1.875em; // // } // .mbsc-timeline-header-column { // border: 0; // height: 0; // } // // .mbsc-timeline-resources { // // padding-top: 1.875em; // // } // } // .mbsc-timeline-has-slots { // .mbsc-timeline-header-column { // border: 0; // height: 0; // } // } /* Sticky positioning */ @supports (position:sticky) { .mbsc-timeline-resources.mbsc-ltr { position: sticky; top: auto; bottom: auto; overflow: visible; padding-top: 0; } } /* Slots */ .mbsc-timeline-slots { height: 1.625em; box-sizing: border-box; border-bottom: 1px solid; } .mbsc-timeline-slot { position: relative; width: 8em; box-sizing: border-box; flex: 1 0 auto; } // .mbsc-timeline-day:last-child .mbsc-timeline-slot-header:last-child { // border: 0; // } .mbsc-timeline-slot-title { font-size: .875em; font-weight: 600; line-height: 1.785715em; // 25px padding: 0 .285714em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } @supports (overflow:clip) { .mbsc-timeline-grid { overflow: clip; } .mbsc-timeline .mbsc-schedule-event-inner { display: inline-block; max-width: 100%; vertical-align: top; } .mbsc-timeline.mbsc-ltr .mbsc-schedule-event-inner { left: 192px; } .mbsc-timeline.mbsc-rtl .mbsc-schedule-event-inner { right: 192px; } .mbsc-timeline-event-listing .mbsc-schedule-event-inner { position: relative; display: block; } .mbsc-timeline .mbsc-timeline-event-listing .mbsc-schedule-event-inner, .mbsc-timeline.mbsc-timeline-no-resource .mbsc-schedule-event-inner { left: 0; right: 0; } } } @mixin mbsc-mobiscroll-eventcalendar($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); .mbsc-#{$theme} { &.mbsc-eventcalendar { background: $background; color: $text; } } } @if ($mbsc-mobiscroll-theme and $mbsc-eventcalendar) { .mbsc-mobiscroll { /* Event list */ &.mbsc-event.mbsc-list-item { padding: .5em .625em; } &.mbsc-event-text, &.mbsc-event-time { font-size: .875em; line-height: 1.285715em; } &.mbsc-event-time { width: 6em; font-size: .714286em; line-height: 1.6; min-height: 3.2em; opacity: .7; } &.mbsc-event-text { font-weight: 600; } &.mbsc-event-sep { display: none; } } @include mbsc-mobiscroll-eventcalendar('mobiscroll', $mbsc-mobiscroll-colors); @include mbsc-mobiscroll-eventcalendar('mobiscroll-dark', $mbsc-mobiscroll-dark-colors); } @mixin mbsc-ios-eventcalendar($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-param: map-get($params, 'calendar-background'); $text-param: map-get($params, 'calendar-text'); $accent-param: map-get($params, 'calendar-accent'); $border-param: map-get($params, 'calendar-border'); $event-param: map-get($params, 'calendar-event'); $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background), $text)); $accent: if($accent-param, $accent-param, $accent); $event: if($event-param, $event-param, #5AC8FA); $is-dark: false; $background-alt: ''; $background-contrast: ''; $background-header: ''; $border-color: ''; $title-color: ''; $schedule-time-color: ''; $cell-disabled-bg: ''; $cell-disabled-color: ''; // Light background @if (lightness($background) > 50%) { $background-alt: lighten($background, 3%); $background-contrast: #000; $background-header: $background; $border-color: darken($background, 17%); $schedule-time-color: lighten($mbsc-ios-text, 54.90); $title-color: adjust-hue(lighten(saturate($text, 2%), 44%), 240deg); $cell-disabled-bg: darken($background-alt, 6.27); $cell-disabled-color: darken($cell-disabled-bg, 40.39); } // Dark background @else { $is-dark: true; $background-alt: $background; $background-contrast: #fff; $background-header: lighten($background, 11%); $border-color: lighten($background, 20%); $schedule-time-color: $mbsc-ios-dark-text; $title-color: adjust-hue(darken(desaturate($text, 2%), 44%), 240deg); $cell-disabled-bg: lighten($background-alt, 10); $cell-disabled-color: lighten($cell-disabled-bg, 37.25); } $border-color: if($border-param, $border-param, $border-color); .mbsc-#{$theme} { /* Calendar view */ &.mbsc-eventcalendar { .mbsc-calendar-header, .mbsc-calendar-week-days { background: $background-header; } .mbsc-calendar-day.mbsc-disabled { background: $cell-disabled-bg; } } /* Agenda view */ &.mbsc-event-list-empty { color: $title-color; } &.mbsc-event-day.mbsc-list-header { background: $background-alt; border-color: $border-color; color: $text; } &.mbsc-event.mbsc-list-item { background: $background-alt; color: $text; } &.mbsc-event.mbsc-list-item:before, &.mbsc-event.mbsc-list-item:after { border-color: $border-color; } &.mbsc-event.mbsc-list-item.mbsc-focus:before, &.mbsc-event.mbsc-list-item.mbsc-hover:before { background: rgba($background-contrast, .05); } &.mbsc-event-color { background: $event; } /* Popover events */ @if ($is-dark) { &.mbsc-popover-list &.mbsc-event { background: lighten($background, 17%); } } /* Schedule view */ /* TODO: refactor this without cascade */ &.mbsc-eventcalendar-schedule .mbsc-calendar-day { background: $background-header; } &.mbsc-schedule-wrapper { background: $background-header; } /* Header */ &.mbsc-schedule-header, &.mbsc-schedule-header-item { border-color: $border-color; } &.mbsc-schedule-header-day-today { color: $accent; } &.mbsc-schedule-header-day.mbsc-hover { background: rgba($accent, .3); } &.mbsc-schedule-header-dayname-curr, &.mbsc-schedule-header-day.mbsc-selected { color: $accent; } &.mbsc-schedule-header-day.mbsc-selected { background: $accent; color: $background-alt; } &.mbsc-schedule-header-dayname-curr { color: $text; } &.mbsc-schedule-date-header { background: $background-header; border-color: $border-color; } /* Grid & All-day row */ &.mbsc-schedule-grid-wrapper { background: $background-alt; } &.mbsc-schedule-all-day-wrapper { border-color: $border-color; background: $background-alt; } &.mbsc-schedule-all-day-text, &.mbsc-schedule-timezone-label { color: $schedule-time-color; } &.mbsc-timeline-day::after, &.mbsc-timeline-slots, &.mbsc-timeline-slot-header, &.mbsc-timeline-header-month, &.mbsc-timeline-header-week, &.mbsc-timeline-header-date, &.mbsc-timeline-resource-empty, &.mbsc-timeline-header-column, &.mbsc-timeline-header, &.mbsc-timeline-resource, &.mbsc-timeline-column, &.mbsc-schedule-resource-group, &.mbsc-schedule-resource, &.mbsc-schedule-all-day-item::after, &.mbsc-schedule-column, &.mbsc-schedule-item { border-color: $border-color; } // &.mbsc-cursor-indicator, &.mbsc-timeline-header-column, &.mbsc-schedule-time { color: $schedule-time-color; } /* Event style */ &.mbsc-schedule-event { color: $event; } &.mbsc-schedule-event-title, &.mbsc-schedule-event-range { color: $background-contrast; } &.mbsc-schedule-event-active, &.mbsc-schedule-event-dragging { .mbsc-schedule-event-inner { color: get-contrast-color($event); } .mbsc-schedule-event-title, .mbsc-schedule-event-range { color: inherit; } } &.mbsc-schedule-time-indicator { border-color: $accent; } &.mbsc-schedule-time-indicator-day:before { background: $accent; } // &.mbsc-cursor-indicator-time, &.mbsc-schedule-time-indicator-time { background: rgba($background-alt, .8); } &.mbsc-schedule-time-indicator-time { color: $accent; } /* Invalid */ &.mbsc-schedule-invalid { background: rgba($cell-disabled-bg, 0.75); color: $cell-disabled-color; } /* Timeline */ &.mbsc-timeline-resource-empty, &.mbsc-timeline-resource-bg { background: $background-alt; } } } @if ($mbsc-ios-theme and $mbsc-eventcalendar) { .mbsc-ios { &.mbsc-eventcalendar .mbsc-calendar-header-vertical { margin-bottom: -1px; border-bottom-width: 1px; border-bottom-style: solid; } &.mbsc-eventcalendar .mbsc-calendar-wrapper { border-bottom-width: 1px; border-bottom-style: solid; } &.mbsc-popover-list .mbsc-event:last-child:after { display: none; } &.mbsc-event-day.mbsc-list-header { font-weight: bold; padding: .5em 1em; line-height: 1.5em; text-transform: none; } &.mbsc-event-time { width: 6em; font-size: .875em; // 14px line-height: 1.428572em; // 20px; } &.mbsc-event-color { width: .25em; border-radius: .125em; margin: 0 .5em 0 -.5em; } &.mbsc-event-color.mbsc-rtl { margin: 0 -.5em 0 .5em; } &.mbsc-event-time.mbsc-ltr { text-align: right; } &.mbsc-event-time.mbsc-rtl { text-align: left; } &.mbsc-event-end { opacity: .7; } &.mbsc-event-text { font-weight: 500; } &.mbsc-event-sep { display: none; } &.mbsc-calendar-button-today { font-weight: 500; padding: 0; } /* Schedule view */ /* TODO: refactor this without cascade */ &.mbsc-eventcalendar-schedule .mbsc-calendar-day, &.mbsc-eventcalendar-schedule .mbsc-calendar-wrapper { border: 0; } &.mbsc-schedule-wrapper { position: relative; margin-top: -1px; z-index: 2; } /* Header */ &.mbsc-schedule-header { border-bottom: 1px solid; } &.mbsc-schedule-header-item { padding: .4375em 0; line-height: 1.75em; } &.mbsc-schedule-header-item.mbsc-ltr { border-left-style: solid; border-left-width: 1px; } &.mbsc-schedule-header-item.mbsc-rtl { border-right-style: solid; border-right-width: 1px; } &.mbsc-schedule-header-item:first-child { border: 0; } &.mbsc-schedule-header-dayname { font-size: 1em; font-weight: 400; } &.mbsc-schedule-header-day { display: inline-block; height: 1.625em; width: 1.625em; line-height: 1.625em; border-radius: 50%; text-align: center; font-size: 1em; font-weight: 400; } &.mbsc-schedule-header-item-large { padding: .1875em 0; &.mbsc-schedule-header-item { border-color: transparent; } .mbsc-schedule-header-dayname { display: inline-block; padding: 0 .375em; font-size: 1em; font-weight: 400; } } &.mbsc-schedule-all-day-wrapper { max-height: 3.125em; border-bottom: 1px solid; // border-top: 1px solid; } &.mbsc-schedule-all-day-text { padding: .5em .666667em; font-size: .75em; text-align: right; text-transform: lowercase; } /* Timezone labels, indicators */ &.mbsc-schedule-timezone-label { line-height: 2.5em; padding: 0 .666667em; } &.mbsc-schedule-date-header { position: relative; z-index: 3; will-change: opacity; border-bottom: 1px solid; } &.mbsc-schedule-date-header-text { padding: .5em; font-size: .75em; font-weight: bold; } &.mbsc-schedule-resource.mbsc-ltr { border-left-width: 1px; border-left-style: solid; } &.mbsc-schedule-resource.mbsc-rtl { border-right-width: 1px; border-right-style: solid; } &.mbsc-schedule-resource:first-child { border: 0; } /* Grid & All-day row */ &.mbsc-schedule-all-day-item { padding: .25em 0; min-height: 1.875em; } &.mbsc-schedule-time { font-size: .625em; padding: 0 .8em; } /* Schedule event style */ &.mbsc-schedule-event-background { opacity: .5; transition: opacity .15s ease-in-out; } &.mbsc-schedule-event-start { .mbsc-schedule-event-background { border-top-left-radius: .25em; border-top-right-radius: .25em; } } &.mbsc-schedule-event-end { .mbsc-schedule-event-background { border-bottom-left-radius: .25em; border-bottom-right-radius: .25em; } } &.mbsc-timeline-event-start.mbsc-ltr, &.mbsc-timeline-event-end.mbsc-rtl { .mbsc-schedule-event-background { border-bottom-left-radius: .25em; border-top-left-radius: .25em; } } &.mbsc-timeline-event-end.mbsc-ltr, &.mbsc-timeline-event-start.mbsc-rtl { .mbsc-schedule-event-background { border-bottom-right-radius: .25em; border-top-right-radius: .25em; } } &.mbsc-schedule-event-hover { .mbsc-schedule-event-background { opacity: .6; } } &.mbsc-schedule-event-active, &.mbsc-schedule-event-dragging { .mbsc-schedule-event-background { opacity: .9; } } &.mbsc-schedule-event-dragging { top: .25em; } &.mbsc-timeline-event-dragging { top: 0; } &.mbsc-schedule-event-bar { position: absolute; top: -.5em; bottom: -.5em; width: .1875em; background: currentColor; } &.mbsc-schedule-event-bar.mbsc-ltr { left: 1px; } &.mbsc-schedule-event-bar.mbsc-rtl { right: 1px; } &.mbsc-schedule-event-start { .mbsc-schedule-event-bar { top: 1px; &.mbsc-ltr { border-top-left-radius: .1875em; } &.mbsc-rtl { border-top-left-radius: .1875em; } } } &.mbsc-schedule-event-end { .mbsc-schedule-event-bar { bottom: 1px; &.mbsc-ltr { border-bottom-left-radius: .1875em; } &.mbsc-rtl { border-bottom-left-radius: .1875em; } } } &.mbsc-schedule-event-title { font-weight: 600; } /* Schedule event all-day style */ &.mbsc-schedule-event-all-day-inner { margin: 0 .4em; } &.mbsc-schedule-event-all-day-background.mbsc-schedule-event-background { border-radius: 0; } &.mbsc-timeline-event-start.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-timeline-event-end.mbsc-rtl .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-start.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-end.mbsc-rtl .mbsc-schedule-event-all-day-background { left: .25em; border-top-left-radius: .25em; border-bottom-left-radius: .25em; } &.mbsc-timeline-event-end.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-timeline-event-start.mbsc-rtl .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-end.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-start.mbsc-rtl .mbsc-schedule-event-all-day-background { right: .25em; border-top-right-radius: .25em; border-bottom-right-radius: .25em; } /* Large screen styles */ &.mbsc-calendar-width-md { .mbsc-schedule-all-day-wrapper { max-height: 3.5em; } // .mbsc-cursor-indicator-time-y, .mbsc-schedule-time, .mbsc-schedule-time-indicator-time-x { font-size: .75em; padding: 0 .666667em; } } /* timeline resource icon */ &.mbsc-timeline-resource-icon { width: 1.214286em; padding: 0 .142858em; } } @include mbsc-ios-eventcalendar('ios', $mbsc-ios-colors); @include mbsc-ios-eventcalendar('ios-dark', $mbsc-ios-dark-colors); } @mixin mbsc-material-eventcalendar($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-param: map-get($params, 'calendar-background'); $text-param: map-get($params, 'calendar-text'); $accent-param: map-get($params, 'calendar-accent'); $border-param: map-get($params, 'calendar-border'); $event-param: map-get($params, 'calendar-event'); $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background-param), $text)); $accent: if($accent-param, $accent-param, $accent); $event: if($event-param, $event-param, $accent); $border: ''; $schedule-text-color: ''; $cell-disabled-bg: ''; $cell-disabled-color: ''; // Light background @if (lightness($background) > 50%) { $border: darken($background, 19%); $schedule-text-color: lighten(saturate(adjust-hue($text, 210deg), 4.27), 27.06); $cell-disabled-bg: darken($background, 6); $cell-disabled-color: darken($cell-disabled-bg, 40); } // Dark background @else { $border: lighten($background, 17%); $schedule-text-color: darken(saturate(adjust-hue($text, 210deg), 6.32), 13.33); $cell-disabled-bg: lighten($background, 10); $cell-disabled-color: lighten($cell-disabled-bg, 37); } $border: if($border-param, $border-param, $border); .mbsc-#{$theme} { &.mbsc-eventcalendar { background: $background; color: $text; .mbsc-calendar-day.mbsc-disabled { background: $cell-disabled-bg; } } &.mbsc-event-list-empty { color: rgba($text, .7); } &.mbsc-schedule-date-header, &.mbsc-event-day.mbsc-list-header { background: $background; color: rgba($text, .7); } &.mbsc-colored-event.mbsc-list-item { background: $accent; color: get-contrast-color($accent); } &.mbsc-event.mbsc-list-item.mbsc-focus { box-shadow: 0 .25em .5em 0 rgba(0, 0, 0, 0.4); } &.mbsc-event-color { background: $accent; } /* Schedule */ /* Header */ &.mbsc-schedule-header-dayname { color: $schedule-text-color; } &.mbsc-schedule-header-day { color: $text; } &.mbsc-schedule-header-dayname-curr { color: $accent; } &.mbsc-schedule-header-day-today { color: $accent; } &.mbsc-schedule-header-day.mbsc-hover { background: rgba($accent, .3); } &.mbsc-schedule-header-day.mbsc-selected { background-color: $accent; color: $background; } /* Grid & All-day cont */ &.mbsc-timeline-day::after, &.mbsc-timeline-slots, &.mbsc-timeline-slot-header, &.mbsc-timeline-header-month, &.mbsc-timeline-header-week, &.mbsc-timeline-header-date, &.mbsc-timeline-resource-empty, &.mbsc-timeline-header-column, &.mbsc-timeline-header, &.mbsc-timeline-resource, &.mbsc-timeline-column, &.mbsc-schedule-resource-group, &.mbsc-schedule-resource, &.mbsc-schedule-time-col, &.mbsc-schedule-all-day-item::after, &.mbsc-schedule-column, &.mbsc-schedule-item { border-color: $border; } &.mbsc-schedule-time-wrapper-end:before, &.mbsc-schedule-time-wrapper:after { border-bottom: 1px solid $border; } &.mbsc-schedule-all-day-text, &.mbsc-schedule-timezone-label, &.mbsc-schedule-time { color: $schedule-text-color; } &.mbsc-schedule-time-indicator { border-color: $accent; } &.mbsc-schedule-time-indicator-day:before { background: $accent; } // &.mbsc-cursor-indicator-time, &.mbsc-schedule-time-indicator-time { background: rgba($background, .8); } &.mbsc-schedule-time-indicator-time { color: $accent; } /* Event style */ &.mbsc-schedule-event { color: $event; } &.mbsc-schedule-event-inner { color: get-contrast-color($event); } /* Invalid */ &.mbsc-schedule-invalid { background: rgba($cell-disabled-bg, 0.75); color: $cell-disabled-color; } /* Timeline */ &.mbsc-timeline-resource-empty, &.mbsc-timeline-resource-bg { background: $background; } } } @if ($mbsc-material-theme and $mbsc-eventcalendar) { .mbsc-material { /* Event list */ &.mbsc-eventcalendar-schedule .mbsc-calendar-wrapper:after { display: none; } &.mbsc-event.mbsc-list-item { margin: .625em 1em; padding: .5em .625em; flex-direction: column; border-radius: .214286em; transition: box-shadow .2s ease-out; } &.mbsc-event-text, &.mbsc-event-time { font-size: .8125em; line-height: 1.384616em; } &.mbsc-event-time { display: flex; font-weight: 300; } &.mbsc-event-text { font-weight: 600; } &.mbsc-event-all-day { display: none; } &.mbsc-event-sep { padding: 0 .25em; } &.mbsc-event-until { padding-right: .25em; } /* Popover list */ &.mbsc-popover-list { width: 13em; padding: .5em .125em; } &.mbsc-popover-list .mbsc-event { margin: .125em .5em; padding: .25em .5em; } &.mbsc-popover-list .mbsc-event-time, &.mbsc-popover-list .mbsc-event-text { font-size: .75em; } /* Schedule */ /* Header */ &.mbsc-schedule-header-item { padding-bottom: .25em; } &.mbsc-schedule-header-dayname { position: relative; // margin-top: .7em; line-height: 2.8em; font-size: .625em; font-weight: 500; text-transform: uppercase; } &.mbsc-schedule-header-day { height: 1.8em; width: 1.8em; margin-top: -.3em; margin-left: auto; margin-right: auto; line-height: 1.8em; font-size: 1.25em; border-radius: 50%; } &.mbsc-schedule-date-header-text { font-size: .875em; font-weight: 600; padding: .5714em 1.14285em; } &.mbsc-schedule-resource.mbsc-ltr { border-left-width: 1px; border-left-style: solid; } &.mbsc-schedule-resource.mbsc-rtl { border-right-width: 1px; border-right-style: solid; } &.mbsc-schedule-resource:first-child { border: 0; } /* Grid & All-day cont */ &.mbsc-schedule-all-day-text { padding: .4em .8em; font-size: .625em; line-height: 1.6em; text-transform: uppercase; } &.mbsc-schedule-all-day-item { padding: 1px 0; min-height: 1.5em; } &.mbsc-schedule-time-col.mbsc-ltr { border-right-width: 1px; border-right-style: solid; } &.mbsc-schedule-time-col.mbsc-rtl { border-left-width: 1px; border-left-style: solid; } &.mbsc-schedule-time-col.mbsc-schedule-time-col-empty { border: 0; } &.mbsc-schedule-time-wrapper.mbsc-ltr { padding-right: 1em; } &.mbsc-schedule-time-wrapper.mbsc-rtl { padding-left: 1em; } &.mbsc-schedule-time-col-last { .mbsc-schedule-time-wrapper:after { content: ''; position: absolute; top: 0; width: 9px; } .mbsc-schedule-time-wrapper-end:before { content: ''; position: absolute; bottom: 0; width: 9px; } .mbsc-schedule-time-wrapper-end.mbsc-ltr:before, .mbsc-schedule-time-wrapper.mbsc-ltr:after { right: 0; } .mbsc-schedule-time-wrapper-end.mbsc-rtl:before, .mbsc-schedule-time-wrapper.mbsc-rtl:after { left: 0; } } &.mbsc-schedule-time { font-size: .625em; } &.mbsc-schedule-time-end.mbsc-ltr { right: 1.6em; } &.mbsc-schedule-time-end.mbsc-rtl { left: 1.6em; } /* Timezone labels, indicators */ &.mbsc-schedule-timezone-label { font-size: .625em; line-height: 2.4em; } &.mbsc-schedule-timezone-label.mbsc-ltr { padding-right: 1.6em; } &.mbsc-schedule-timezone-label.mbsc-rtl { padding-left: 1.6em; } &.mbsc-schedule-time-indicator-tz { width: 6.8em; } /* Time & cursor indicator */ &.mbsc-schedule-time-indicator-x:after { content: ''; position: absolute; top: 0; width: .5625em; border-bottom: 1px solid; border-color: inherit; } &.mbsc-schedule-time-indicator.mbsc-ltr:after { left: -.5625em; } &.mbsc-schedule-time-indicator.mbsc-rtl:after { right: -.5625em; } &.mbsc-schedule-time-indicator-time-x { padding: 0 1.6em; margin: 0 1px; } // &.mbsc-cursor-indicator-y.mbsc-ltr { // left: 3.75em; // } // &.mbsc-cursor-indicator-y.mbsc-rtl { // right: 3.75em; // } /* Event style */ &.mbsc-schedule-event-inner { border-radius: .4em; } &.mbsc-schedule-event-start { .mbsc-schedule-event-background { border-top-left-radius: .333334em; border-top-right-radius: .333334em; } } &.mbsc-schedule-event-end { .mbsc-schedule-event-background { border-bottom-left-radius: .333334em; border-bottom-right-radius: .333334em; } } &.mbsc-timeline-event-start.mbsc-ltr, &.mbsc-timeline-event-end.mbsc-rtl { .mbsc-schedule-event-background { border-bottom-left-radius: .333334em; border-top-left-radius: .333334em; } } &.mbsc-timeline-event-end.mbsc-ltr, &.mbsc-timeline-event-start.mbsc-rtl { .mbsc-schedule-event-background { border-bottom-right-radius: .333334em; border-top-right-radius: .333334em; } } &.mbsc-schedule-event-active, &.mbsc-schedule-event-dragging { .mbsc-schedule-event-background { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 1px 3px -1px rgba(0, 0, 0, 0.2); } } &.mbsc-schedule-event-hover { .mbsc-schedule-event-background:after { content: ''; position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, .1); } } &.mbsc-schedule-event-title { font-weight: 500; } &.mbsc-schedule-event-all-day-background.mbsc-schedule-event-background { border-radius: 0; } &.mbsc-timeline-event-start.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-timeline-event-end.mbsc-rtl .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-start.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-end.mbsc-rtl .mbsc-schedule-event-all-day-background { border-top-left-radius: .333334em; border-bottom-left-radius: .333334em; } &.mbsc-timeline-event-end.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-timeline-event-start.mbsc-rtl .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-end.mbsc-ltr .mbsc-schedule-event-all-day-background, &.mbsc-schedule-event-start.mbsc-rtl .mbsc-schedule-event-all-day-background { border-top-right-radius: .333334em; border-bottom-right-radius: .333334em; } &.mbsc-schedule-header-item-large { .mbsc-schedule-header-dayname { // margin-top: .727273em; line-height: 2.909091em; font-size: 0.6875em; text-transform: uppercase; } .mbsc-schedule-header-day { height: 1.769231em; width: 1.769231em; line-height: 1.769231em; font-size: 1.625em; margin-top: -.307693em; } } } @include mbsc-material-eventcalendar('material', $mbsc-material-colors); @include mbsc-material-eventcalendar('material-dark', $mbsc-material-dark-colors); } @mixin mbsc-windows-eventcalendar($theme, $params) { $background: map-get($params, 'background'); $text: map-get($params, 'text'); $accent: map-get($params, 'accent'); $background-param: map-get($params, 'calendar-background'); $text-param: map-get($params, 'calendar-text'); $accent-param: map-get($params, 'calendar-accent'); $border-param: map-get($params, 'calendar-border'); $event-param: map-get($params, 'calendar-event'); $background: if($background-param, $background-param, $background); $text: if($text-param, $text-param, if($background-param, get-contrast-color($background-param), $text)); $accent: if($accent-param, $accent-param, $accent); $event: if($event-param, $event-param, $accent); $border: ''; $active: ''; $hover: ''; $cell-disabled-bg: ''; $cell-disabled-color: ''; @if (lightness($background) > 50%) { $border: darken($background, 10%); $active: lighten($text, 60%); $hover: lighten($text, 70%); $cell-disabled-bg: darken($background, 6); $cell-disabled-color: darken($cell-disabled-bg, 40); } @else { $border: lighten($background, 10%); $active: darken($text, 60%); $hover: darken($text, 70%); $cell-disabled-bg: lighten($background, 10); $cell-disabled-color: lighten($cell-disabled-bg, 37); } $border: if($border-param, $border-param, $border); .mbsc-#{$theme} { &.mbsc-eventcalendar { background: $background; .mbsc-calendar-day.mbsc-disabled { background: $cell-disabled-bg; } } /* Event listing */ &.mbsc-event-list-empty { color: rgba($text, .7); } &.mbsc-event-group { border-color: $border; } &.mbsc-event-day.mbsc-list-header, &.mbsc-event.mbsc-list-item { background: $background; color: $text; } &.mbsc-event.mbsc-list-item.mbsc-hover:before { background: $hover; } &.mbsc-event.mbsc-list-item.mbsc-active:before { background: $active; } &.mbsc-event-color { background: $accent; } /* Schedule view */ &.mbsc-schedule-wrapper { background: $background; } /* Header */ &.mbsc-schedule-header-day { border-color: $border; } &.mbsc-schedule-header-item { color: $text; } &.mbsc-schedule-header-day-today { color: $accent; } &.mbsc-schedule-header-dayname.mbsc-selected:after { background: $accent; } &.mbsc-schedule-date-header { border-color: $border; } /* Time indicator */ &.mbsc-schedule-time-indicator, &.mbsc-schedule-time-indicator-day { border-color: $accent; } // &.mbsc-cursor-indicator-time, &.mbsc-schedule-time-indicator-time { background: rgba($background, .8); color: $accent; } &.mbsc-schedule-time-indicator-time { color: $accent; } /* Grid & All-day row */ &.mbsc-timeline-day::after, &.mbsc-timeline-slots, &.mbsc-timeline-slot-header, &.mbsc-timeline-header-month, &.mbsc-timeline-header-week, &.mbsc-timeline-header-date, &.mbsc-timeline-resource-empty, &.mbsc-timeline-header-column, &.mbsc-timeline-header, &.mbsc-timeline-resource, &.mbsc-timeline-column, &.mbsc-schedule-resource-group, &.mbsc-schedule-resource, &.mbsc-schedule-time-col, &.mbsc-schedule-all-day-item::after, &.mbsc-schedule-column, &.mbsc-schedule-item { border-color: $border; } &.mbsc-schedule-time-wrapper { border-top: 1px solid $border; color: $text; } &.mbsc-schedule-time-wrapper-end { border-bottom: 1px solid $border; color: $text; } &.mbsc-schedule-all-day-text, &.mbsc-schedule-timezone-label, &.mbsc-schedule-time-cont { color: $text; } /* Event style */ &.mbsc-schedule-event { color: $event; } &.mbsc-schedule-event-inner { color: get-contrast-color($event); } &.mbsc-schedule-event-dragging, &.mbsc-schedule-event-active { .mbsc-schedule-event-background { outline: 1px solid $text; } } /* Invalid */ &.mbsc-schedule-invalid { background: rgba($cell-disabled-bg, 0.75); color: $cell-disabled-color; } /* Timeline */ &.mbsc-timeline-resource-empty, &.mbsc-timeline-resource-bg { background: $background; } } } @if ($mbsc-windows-theme and $mbsc-eventcalendar) { .mbsc-windows { &.mbsc-popover-list { margin: .25em 0; } &.mbsc-event-group { border-bottom: 1px solid; } &.mbsc-event-day.mbsc-list-header { padding: 1em 1.5em .25em 1.5em; } &.mbsc-event.mbsc-list-item { margin-bottom: .25em; align-items: center; } &.mbsc-event-content { order: 1; } &.mbsc-event-time { width: 7em; padding: 0 1.333334em; font-size: .75em; box-sizing: border-box; } &.mbsc-event-color { width: .5em; margin: -.5em 0 -.5em -.5em; align-self: stretch; } &.mbsc-event-sep { display: none; } /* Schedule view */ &.mbsc-schedule-wrapper { position: relative; min-height: 1.5em; z-index: 2; } /* Header */ &.mbsc-schedule-header-day { font-size: 1em; text-align: left; padding: .5em .5em 1.5em .5em; border-top: 1px solid; } &.mbsc-schedule-header-day.mbsc-ltr { border-left-style: solid; border-left-width: 1px; margin-left: -1px; } &.mbsc-schedule-header-day.mbsc-rtl { border-right-style: solid; border-right-width: 1px; margin-right: -1px; } &.mbsc-schedule-header-item.mbsc-ltr { border-left: 1px solid transparent; } &.mbsc-schedule-header-item.mbsc-rtl { border-right: 1px solid transparent; } &.mbsc-schedule-header-item:first-child { border: 0; .mbsc-schedule-header-day { border-left: 0; border-right: 0; margin: 0; } } &.mbsc-schedule-header-dayname { padding: .571429em; //.428571em .571429em; font-size: .875em; text-align: left; } &.mbsc-schedule-all-day-item { min-height: 1.375em; } &.mbsc-schedule-all-day-text { padding: 0 .333334em; font-size: .75em; text-align: center; line-height: 1.833334em; } /* Timezone labels, indicators */ &.mbsc-schedule-timezone-label { font-size: .75em; line-height: 1.833334em; padding: 0 0.333334em; } &.mbsc-schedule-header-dayname { position: relative; } &.mbsc-schedule-header-dayname.mbsc-selected:after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: .285715em; } &.mbsc-schedule-date-header { border-bottom: 1px solid; } &.mbsc-schedule-date-header-text { font-weight: 500; line-height: 1.25em; padding: .5em 0; } &.mbsc-schedule-header-day.mbsc-hover { background: rgba(0, 0, 0, .1); } &.mbsc-schedule-resource { border-top: 1px solid; margin-top: -1px; } &.mbsc-schedule-resource.mbsc-ltr { border-left-width: 1px; border-left-style: solid; text-align: left; } &.mbsc-schedule-resource.mbsc-rtl { border-right-width: 1px; border-right-style: solid; text-align: right; } &.mbsc-schedule-resource:first-child { border-left: 0; border-right: 0; } /* Time & cursor indicator */ &.mbsc-schedule-time-indicator-x { border-bottom: 1px dashed; } // &.mbsc-cursor-indicator-time-y, &.mbsc-schedule-time-indicator-time-x { padding: 0 .333334em; font-size: .75em; text-transform: lowercase; } &.mbsc-schedule-time-indicator-day { border-top: 1px solid; border-bottom: 1px solid; } &.mbsc-schedule-time-indicator-day:before { display: none; } // &.mbsc-cursor-indicator-y.mbsc-ltr { // left: 4.1875em; // } // &.mbsc-cursor-indicator-y.mbsc-rtl { // right: 4.1875em; // } /* Grid & All-day row */ &.mbsc-schedule-all-day-wrapper { max-height: 4em; } &.mbsc-schedule-time-col.mbsc-ltr { border-right-width: 1px; border-right-style: solid; } &.mbsc-schedule-time-col.mbsc-rtl { border-left-width: 1px; border-left-style: solid; } &.mbsc-schedule-time { top: 0; padding: 0 .333334em; text-transform: lowercase; } &.mbsc-schedule-time-end { display: none; } /* Event style */ &.mbsc-schedule-event-hover { .mbsc-schedule-event-background:after { content: ''; position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, .1); } } /* timeline resource icon */ &.mbsc-timeline-resource-icon { width: 1.071429em; padding: 0 .214286em; } } @include mbsc-windows-eventcalendar('windows', $mbsc-windows-colors); @include mbsc-windows-eventcalendar('windows-dark', $mbsc-windows-dark-colors); } @if $mbsc-eventcalendar { .mbsc-eventcalendar { height: 100%; overflow: hidden; } /* Event list */ .mbsc-event-list { flex: 1 1 auto; position: relative; } .mbsc-event-list-scroll { overflow: auto; -webkit-overflow-scrolling: touch; } .mbsc-event-list-empty { text-align: center; margin: 3em; font-size: 1.5em } .mbsc-event-day { position: sticky; top: 0; z-index: 3; } .mbsc-event-color, .mbsc-event-time { flex: 0 0 auto; } .mbsc-event-content { flex: 1 1 auto; overflow: hidden; } .mbsc-event-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Popover list */ .mbsc-popover-list { width: 20em; max-width: 100%; box-sizing: border-box; overflow: hidden; } .mbsc-popover-hidden { visibility: hidden; } // Covers the entire calendar during drag, so it show the move cursor everywhere, // and will prevent hover on other elements .mbsc-calendar-dragging { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 3; cursor: move; } /* External drag element */ .mbsc-draggable { user-select: none; } .mbsc-drag-clone { position: fixed; display: table; z-index: 99; margin: 15px 0 0 0 !important; box-shadow: 0 0 transparent, 0 0 transparent, 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06); cursor: move; &:after { content: ''; position: absolute; top: -50px; bottom: -50px; left: -50px; right: -50px; } } /* Fake scroll rules */ .mbsc-schedule-fake-scroll-x, .mbsc-schedule-fake-scroll-y { visibility: hidden; flex: none; } .mbsc-schedule-fake-scroll-x { overflow-x: scroll; width: 0; } .mbsc-schedule-fake-scroll-y { overflow-y: scroll; max-height: 20px; } } // form-controls component // button component // checkbox component // input component // page component // radio component // segmented component // switch component // eventcalendar component // calendar-view component // list component // Theme builder function for ios theme @mixin mbsc-ios-theme($theme, $colors) { @include mbsc-ios-form-controls($theme, $colors); @include mbsc-ios-button($theme, $colors); @include mbsc-ios-checkbox($theme, $colors); @include mbsc-ios-input($theme, $colors); @include mbsc-ios-page($theme, $colors); @include mbsc-ios-radio($theme, $colors); @include mbsc-ios-segmented($theme, $colors); @include mbsc-ios-switch($theme, $colors); @include mbsc-ios-eventcalendar($theme, $colors); @include mbsc-ios-calendar-view($theme, $colors); @include mbsc-ios-list($theme, $colors); } @mixin mbsc-custom-theme($theme, $base-theme, $colors) { @if $base-theme==ios { @include mbsc-ios-theme($theme, $colors); } }