2014-12-24 13:13:23 +01:00
|
|
|
// Embedded icons from Open Iconic.
|
|
|
|
// Released under MIT and copyright 2014 Waybury.
|
2016-10-03 18:55:59 +02:00
|
|
|
// https://useiconic.com/open
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2015-04-18 20:17:32 +02:00
|
|
|
|
2014-12-24 13:13:23 +01:00
|
|
|
// Checkboxes and radios
|
2014-12-24 13:47:08 +01:00
|
|
|
//
|
|
|
|
// Base class takes care of all the key behavioral aspects.
|
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-control {
|
2014-12-26 00:40:24 +01:00
|
|
|
position: relative;
|
2017-12-23 01:13:01 +01:00
|
|
|
display: block;
|
2018-12-14 17:54:44 +01:00
|
|
|
min-height: $font-size-base * $line-height-base;
|
|
|
|
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
2017-12-23 01:13:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.custom-control-inline {
|
|
|
|
display: inline-flex;
|
2016-12-05 05:42:12 +01:00
|
|
|
margin-right: $custom-control-spacer-x;
|
2016-01-06 08:25:42 +01:00
|
|
|
}
|
2014-12-26 00:40:24 +01:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-control-input {
|
|
|
|
position: absolute;
|
|
|
|
z-index: -1; // Put the input behind the label so it doesn't overlay text
|
|
|
|
opacity: 0;
|
2014-12-26 00:40:24 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
&:checked ~ .custom-control-label::before {
|
(#22414) Rename for consistency `$custom-control-disabled-indicator-bg`, `$custom-control-disabled-description-color`, `$custom-control-checked-indicator-color`, `$custom-control-checked-indicator-bg`, `$custom-control-checked-indicator-box-shadow`, `$custom-control-focus-indicator-box-shadow`, `$custom-control-active-indicator-color`, `$custom-control-active-indicator-bg`, `$custom-control-active-indicator-box-shadow` to `$custom-control-indicator-disabled-bg`, `$custom-control-description-disabled-color`, `$custom-control-indicator-checked-color`, `$custom-control-indicator-checked-bg`, `$custom-control-indicator-checked-box-shadow`, `$custom-control-indicator-focus-box-shadow`, `$custom-control-indicator-active-color`, `$custom-control-indicator-active-bg`, `$custom-control-indicator-active-box-shadow`, respectively
2017-06-09 04:33:33 +02:00
|
|
|
color: $custom-control-indicator-checked-color;
|
2018-10-21 09:25:07 +02:00
|
|
|
border-color: $custom-control-indicator-checked-border-color;
|
2017-10-19 18:03:33 +02:00
|
|
|
@include gradient-bg($custom-control-indicator-checked-bg);
|
(#22414) Rename for consistency `$custom-control-disabled-indicator-bg`, `$custom-control-disabled-description-color`, `$custom-control-checked-indicator-color`, `$custom-control-checked-indicator-bg`, `$custom-control-checked-indicator-box-shadow`, `$custom-control-focus-indicator-box-shadow`, `$custom-control-active-indicator-color`, `$custom-control-active-indicator-bg`, `$custom-control-active-indicator-box-shadow` to `$custom-control-indicator-disabled-bg`, `$custom-control-description-disabled-color`, `$custom-control-indicator-checked-color`, `$custom-control-indicator-checked-bg`, `$custom-control-indicator-checked-box-shadow`, `$custom-control-indicator-focus-box-shadow`, `$custom-control-indicator-active-color`, `$custom-control-indicator-active-bg`, `$custom-control-indicator-active-box-shadow`, respectively
2017-06-09 04:33:33 +02:00
|
|
|
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
2016-01-06 08:25:42 +01:00
|
|
|
}
|
2015-08-21 22:21:20 +02:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
&:focus ~ .custom-control-label::before {
|
2016-01-06 08:25:42 +01:00
|
|
|
// the mixin is not used here to make sure there is feedback
|
2018-10-21 09:25:07 +02:00
|
|
|
@if $enable-shadows {
|
|
|
|
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
|
|
|
} @else {
|
|
|
|
box-shadow: $custom-control-indicator-focus-box-shadow;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus:not(:checked) ~ .custom-control-label::before {
|
|
|
|
border-color: $custom-control-indicator-focus-border-color;
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
|
|
|
|
2018-10-24 18:55:53 +02:00
|
|
|
&:not(:disabled):active ~ .custom-control-label::before {
|
(#22414) Rename for consistency `$custom-control-disabled-indicator-bg`, `$custom-control-disabled-description-color`, `$custom-control-checked-indicator-color`, `$custom-control-checked-indicator-bg`, `$custom-control-checked-indicator-box-shadow`, `$custom-control-focus-indicator-box-shadow`, `$custom-control-active-indicator-color`, `$custom-control-active-indicator-bg`, `$custom-control-active-indicator-box-shadow` to `$custom-control-indicator-disabled-bg`, `$custom-control-description-disabled-color`, `$custom-control-indicator-checked-color`, `$custom-control-indicator-checked-bg`, `$custom-control-indicator-checked-box-shadow`, `$custom-control-indicator-focus-box-shadow`, `$custom-control-indicator-active-color`, `$custom-control-indicator-active-bg`, `$custom-control-indicator-active-box-shadow`, respectively
2017-06-09 04:33:33 +02:00
|
|
|
color: $custom-control-indicator-active-color;
|
2017-11-24 23:26:56 +01:00
|
|
|
background-color: $custom-control-indicator-active-bg;
|
2018-10-21 09:25:07 +02:00
|
|
|
border-color: $custom-control-indicator-active-border-color;
|
(#22414) Rename for consistency `$custom-control-disabled-indicator-bg`, `$custom-control-disabled-description-color`, `$custom-control-checked-indicator-color`, `$custom-control-checked-indicator-bg`, `$custom-control-checked-indicator-box-shadow`, `$custom-control-focus-indicator-box-shadow`, `$custom-control-active-indicator-color`, `$custom-control-active-indicator-bg`, `$custom-control-active-indicator-box-shadow` to `$custom-control-indicator-disabled-bg`, `$custom-control-description-disabled-color`, `$custom-control-indicator-checked-color`, `$custom-control-indicator-checked-bg`, `$custom-control-indicator-checked-box-shadow`, `$custom-control-indicator-focus-box-shadow`, `$custom-control-indicator-active-color`, `$custom-control-indicator-active-bg`, `$custom-control-indicator-active-box-shadow`, respectively
2017-06-09 04:33:33 +02:00
|
|
|
@include box-shadow($custom-control-indicator-active-box-shadow);
|
2016-01-06 08:25:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
2017-12-23 01:13:01 +01:00
|
|
|
~ .custom-control-label {
|
|
|
|
color: $custom-control-label-disabled-color;
|
2016-01-06 08:25:42 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
&::before {
|
|
|
|
background-color: $custom-control-indicator-disabled-bg;
|
|
|
|
}
|
2016-01-06 08:25:42 +01:00
|
|
|
}
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
// Custom control indicators
|
2014-12-24 13:47:08 +01:00
|
|
|
//
|
2018-04-14 09:41:18 +02:00
|
|
|
// Build the custom controls out of pseudo-elements.
|
2014-12-24 13:47:08 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
.custom-control-label {
|
2018-04-24 06:52:59 +02:00
|
|
|
position: relative;
|
2017-12-23 01:13:01 +01:00
|
|
|
margin-bottom: 0;
|
2018-10-31 08:49:52 +01:00
|
|
|
vertical-align: top;
|
2017-11-24 23:26:56 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
// Background-color and (when enabled) gradient
|
2017-11-24 23:26:56 +01:00
|
|
|
&::before {
|
2017-12-23 01:13:01 +01:00
|
|
|
position: absolute;
|
2018-12-14 17:54:44 +01:00
|
|
|
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
2018-12-14 02:04:10 +01:00
|
|
|
left: -($custom-control-gutter + $custom-control-indicator-size);
|
2017-12-23 01:13:01 +01:00
|
|
|
display: block;
|
|
|
|
width: $custom-control-indicator-size;
|
|
|
|
height: $custom-control-indicator-size;
|
|
|
|
pointer-events: none;
|
|
|
|
content: "";
|
|
|
|
background-color: $custom-control-indicator-bg;
|
2018-10-21 09:25:07 +02:00
|
|
|
border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
|
2017-12-23 01:13:01 +01:00
|
|
|
@include box-shadow($custom-control-indicator-box-shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Foreground (icon)
|
|
|
|
&::after {
|
|
|
|
position: absolute;
|
2018-12-14 17:54:44 +01:00
|
|
|
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
2018-12-14 02:04:10 +01:00
|
|
|
left: -($custom-control-gutter + $custom-control-indicator-size);
|
2017-11-24 23:26:56 +01:00
|
|
|
display: block;
|
|
|
|
width: $custom-control-indicator-size;
|
|
|
|
height: $custom-control-indicator-size;
|
|
|
|
content: "";
|
2019-01-13 22:13:30 +01:00
|
|
|
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
|
2017-11-24 23:26:56 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
|
2014-12-24 13:47:08 +01:00
|
|
|
// Checkboxes
|
|
|
|
//
|
|
|
|
// Tweak just a few things for checkboxes.
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-checkbox {
|
2017-12-23 01:13:01 +01:00
|
|
|
.custom-control-label::before {
|
(#22414) Rename for consistency `$custom-checkbox-border-radius`, `$custom-checkbox-icon-checked`, `$custom-checkbox-indeterminate-bg`, `$custom-checkbox-icon-indeterminate`, `$custom-checkbox-indeterminate-box-shadow`, `$custom-radio-border-radius`, `$custom-radio-icon-checked` to `$custom-checkbox-indicator-border-radius`, `$custom-checkbox-indicator-icon-checked`, `$custom-checkbox-indicator-indeterminate-bg`, `$custom-checkbox-indicator-icon-indeterminate`, `$custom-checkbox-indicator-indeterminate-box-shadow`, `$custom-radio-indicator-border-radius`, `$custom-radio-indicator-icon-checked`, respectively
2017-07-14 02:00:37 +02:00
|
|
|
@include border-radius($custom-checkbox-indicator-border-radius);
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
.custom-control-input:checked ~ .custom-control-label {
|
|
|
|
&::after {
|
2017-11-24 23:26:56 +01:00
|
|
|
background-image: $custom-checkbox-indicator-icon-checked;
|
|
|
|
}
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
2015-01-01 21:01:55 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
.custom-control-input:indeterminate ~ .custom-control-label {
|
2017-11-24 23:26:56 +01:00
|
|
|
&::before {
|
2018-10-21 09:25:07 +02:00
|
|
|
border-color: $custom-checkbox-indicator-indeterminate-border-color;
|
2017-12-23 01:13:01 +01:00
|
|
|
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
|
|
|
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
|
|
|
}
|
|
|
|
&::after {
|
2017-11-24 23:26:56 +01:00
|
|
|
background-image: $custom-checkbox-indicator-icon-indeterminate;
|
|
|
|
}
|
2015-01-01 21:01:55 +01:00
|
|
|
}
|
2018-01-06 01:14:15 +01:00
|
|
|
|
|
|
|
.custom-control-input:disabled {
|
|
|
|
&:checked ~ .custom-control-label::before {
|
|
|
|
background-color: $custom-control-indicator-checked-disabled-bg;
|
|
|
|
}
|
|
|
|
&:indeterminate ~ .custom-control-label::before {
|
|
|
|
background-color: $custom-control-indicator-checked-disabled-bg;
|
|
|
|
}
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
|
|
|
|
2014-12-24 13:47:08 +01:00
|
|
|
// Radios
|
|
|
|
//
|
|
|
|
// Tweak just a few things for radios.
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-radio {
|
2017-12-23 01:13:01 +01:00
|
|
|
.custom-control-label::before {
|
2018-12-23 08:11:11 +01:00
|
|
|
// stylelint-disable-next-line property-blacklist
|
(#22414) Rename for consistency `$custom-checkbox-border-radius`, `$custom-checkbox-icon-checked`, `$custom-checkbox-indeterminate-bg`, `$custom-checkbox-icon-indeterminate`, `$custom-checkbox-indeterminate-box-shadow`, `$custom-radio-border-radius`, `$custom-radio-icon-checked` to `$custom-checkbox-indicator-border-radius`, `$custom-checkbox-indicator-icon-checked`, `$custom-checkbox-indicator-indeterminate-bg`, `$custom-checkbox-indicator-icon-indeterminate`, `$custom-checkbox-indicator-indeterminate-box-shadow`, `$custom-radio-indicator-border-radius`, `$custom-radio-indicator-icon-checked`, respectively
2017-07-14 02:00:37 +02:00
|
|
|
border-radius: $custom-radio-indicator-border-radius;
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2017-12-23 01:13:01 +01:00
|
|
|
.custom-control-input:checked ~ .custom-control-label {
|
|
|
|
&::after {
|
|
|
|
background-image: $custom-radio-indicator-icon-checked;
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
|
|
|
}
|
2018-01-06 01:14:15 +01:00
|
|
|
|
|
|
|
.custom-control-input:disabled {
|
|
|
|
&:checked ~ .custom-control-label::before {
|
|
|
|
background-color: $custom-control-indicator-checked-disabled-bg;
|
|
|
|
}
|
|
|
|
}
|
2014-12-25 00:45:37 +01:00
|
|
|
}
|
|
|
|
|
2015-04-18 20:17:32 +02:00
|
|
|
|
2018-12-12 14:28:25 +01:00
|
|
|
// switches
|
|
|
|
//
|
|
|
|
// Tweak a few things for switches
|
|
|
|
|
|
|
|
.custom-switch {
|
2018-12-14 15:22:19 +01:00
|
|
|
padding-left: $custom-switch-width + $custom-control-gutter;
|
2018-12-12 14:28:25 +01:00
|
|
|
|
|
|
|
.custom-control-label {
|
|
|
|
&::before {
|
2018-12-14 15:22:19 +01:00
|
|
|
left: -($custom-switch-width + $custom-control-gutter);
|
2018-12-12 14:28:25 +01:00
|
|
|
width: $custom-switch-width;
|
|
|
|
pointer-events: all;
|
2018-12-23 08:11:11 +01:00
|
|
|
// stylelint-disable-next-line property-blacklist
|
2018-12-12 14:28:25 +01:00
|
|
|
border-radius: $custom-switch-indicator-border-radius;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2});
|
2018-12-14 15:22:19 +01:00
|
|
|
left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2});
|
2018-12-12 14:28:25 +01:00
|
|
|
width: $custom-switch-indicator-size;
|
|
|
|
height: $custom-switch-indicator-size;
|
|
|
|
background-color: $custom-control-indicator-border-color;
|
2018-12-23 08:11:11 +01:00
|
|
|
// stylelint-disable-next-line property-blacklist
|
2018-12-12 14:28:25 +01:00
|
|
|
border-radius: $custom-switch-indicator-border-radius;
|
|
|
|
@include transition(transform .15s ease-in-out, $custom-forms-transition);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.custom-control-input:checked ~ .custom-control-label {
|
|
|
|
&::after {
|
|
|
|
background-color: $custom-control-indicator-bg;
|
|
|
|
transform: translateX($custom-switch-width - $custom-control-indicator-size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.custom-control-input:disabled {
|
|
|
|
&:checked ~ .custom-control-label::before {
|
|
|
|
background-color: $custom-control-indicator-checked-disabled-bg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-26 00:40:24 +01:00
|
|
|
// Select
|
|
|
|
//
|
2015-08-19 04:26:18 +02:00
|
|
|
// Replaces the browser default select with a custom one, mostly pulled from
|
2018-04-01 09:35:51 +02:00
|
|
|
// https://primer.github.io/.
|
2015-08-23 10:12:00 +02:00
|
|
|
//
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:34:51 +01:00
|
|
|
.custom-select {
|
2014-12-26 00:40:24 +01:00
|
|
|
display: inline-block;
|
2017-12-23 06:16:38 +01:00
|
|
|
width: 100%;
|
2018-01-16 07:07:05 +01:00
|
|
|
height: $custom-select-height;
|
2016-01-17 07:29:51 +01:00
|
|
|
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
2019-02-07 18:47:24 +01:00
|
|
|
font-family: $custom-select-font-family;
|
2019-02-07 23:32:05 +01:00
|
|
|
@include font-size($custom-select-font-size);
|
2018-10-20 10:50:20 +02:00
|
|
|
font-weight: $custom-select-font-weight;
|
2016-12-23 08:19:21 +01:00
|
|
|
line-height: $custom-select-line-height;
|
2016-01-17 07:29:51 +01:00
|
|
|
color: $custom-select-color;
|
2015-12-08 10:06:23 +01:00
|
|
|
vertical-align: middle;
|
2018-07-09 00:31:18 +02:00
|
|
|
background: $custom-select-background;
|
|
|
|
background-color: $custom-select-bg;
|
2016-01-17 07:29:51 +01:00
|
|
|
border: $custom-select-border-width solid $custom-select-border-color;
|
2018-12-23 08:11:11 +01:00
|
|
|
@include border-radius($custom-select-border-radius, 0);
|
2018-06-24 22:07:49 +02:00
|
|
|
@include box-shadow($custom-select-box-shadow);
|
2017-02-21 07:25:07 +01:00
|
|
|
appearance: none;
|
2015-08-19 04:26:18 +02:00
|
|
|
|
|
|
|
&:focus {
|
2016-01-17 07:29:51 +01:00
|
|
|
border-color: $custom-select-focus-border-color;
|
2017-11-06 01:23:36 +01:00
|
|
|
outline: 0;
|
2018-06-24 22:07:49 +02:00
|
|
|
@if $enable-shadows {
|
|
|
|
box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
|
|
|
|
} @else {
|
|
|
|
box-shadow: $custom-select-focus-box-shadow;
|
|
|
|
}
|
2016-04-11 22:18:48 +02:00
|
|
|
|
|
|
|
&::-ms-value {
|
|
|
|
// For visual consistency with other platforms/browsers,
|
2017-11-15 10:12:38 +01:00
|
|
|
// suppress the default white text on blue background highlight given to
|
2016-04-11 22:18:48 +02:00
|
|
|
// the selected option text when the (still closed) <select> receives focus
|
|
|
|
// in IE and (under certain conditions) Edge.
|
|
|
|
// See https://github.com/twbs/bootstrap/issues/19398.
|
|
|
|
color: $input-color;
|
|
|
|
background-color: $input-bg;
|
|
|
|
}
|
2015-08-19 04:26:18 +02:00
|
|
|
}
|
|
|
|
|
2017-11-24 23:29:59 +01:00
|
|
|
&[multiple],
|
|
|
|
&[size]:not([size="1"]) {
|
2017-10-03 06:00:57 +02:00
|
|
|
height: auto;
|
2017-11-24 23:29:59 +01:00
|
|
|
padding-right: $custom-select-padding-x;
|
2017-10-03 06:00:57 +02:00
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
|
2016-04-14 19:11:51 +02:00
|
|
|
&:disabled {
|
|
|
|
color: $custom-select-disabled-color;
|
|
|
|
background-color: $custom-select-disabled-bg;
|
|
|
|
}
|
|
|
|
|
2015-08-19 04:26:18 +02:00
|
|
|
// Hides the default caret in IE11
|
|
|
|
&::-ms-expand {
|
2019-01-25 21:09:21 +01:00
|
|
|
display: none;
|
2015-01-01 10:05:01 +01:00
|
|
|
}
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:34:51 +01:00
|
|
|
.custom-select-sm {
|
2017-04-22 20:56:27 +02:00
|
|
|
height: $custom-select-height-sm;
|
2018-07-29 23:04:35 +02:00
|
|
|
padding-top: $custom-select-padding-y-sm;
|
|
|
|
padding-bottom: $custom-select-padding-y-sm;
|
|
|
|
padding-left: $custom-select-padding-x-sm;
|
2019-02-07 23:32:05 +01:00
|
|
|
@include font-size($custom-select-font-size-sm);
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
|
|
|
|
2017-11-24 23:29:59 +01:00
|
|
|
.custom-select-lg {
|
|
|
|
height: $custom-select-height-lg;
|
2018-07-29 23:04:35 +02:00
|
|
|
padding-top: $custom-select-padding-y-lg;
|
|
|
|
padding-bottom: $custom-select-padding-y-lg;
|
|
|
|
padding-left: $custom-select-padding-x-lg;
|
2019-02-07 23:32:05 +01:00
|
|
|
@include font-size($custom-select-font-size-lg);
|
2017-11-24 23:29:59 +01:00
|
|
|
}
|
|
|
|
|
2015-04-18 20:17:32 +02:00
|
|
|
|
2014-12-26 00:40:24 +01:00
|
|
|
// File
|
|
|
|
//
|
|
|
|
// Custom file input.
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:45:44 +01:00
|
|
|
.custom-file {
|
2014-12-26 00:40:24 +01:00
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
2017-12-23 06:16:38 +01:00
|
|
|
width: 100%;
|
2016-01-18 00:21:16 +01:00
|
|
|
height: $custom-file-height;
|
2016-05-16 16:00:45 +02:00
|
|
|
margin-bottom: 0;
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
2016-01-06 08:45:44 +01:00
|
|
|
|
|
|
|
.custom-file-input {
|
2017-12-24 07:47:37 +01:00
|
|
|
position: relative;
|
|
|
|
z-index: 2;
|
|
|
|
width: 100%;
|
2017-01-04 04:44:44 +01:00
|
|
|
height: $custom-file-height;
|
2014-12-26 00:40:24 +01:00
|
|
|
margin: 0;
|
|
|
|
opacity: 0;
|
2016-01-06 08:45:44 +01:00
|
|
|
|
2018-03-12 18:51:27 +01:00
|
|
|
&:focus ~ .custom-file-label {
|
2017-11-24 23:29:59 +01:00
|
|
|
border-color: $custom-file-focus-border-color;
|
2017-08-11 08:01:52 +02:00
|
|
|
box-shadow: $custom-file-focus-box-shadow;
|
2016-01-06 08:45:44 +01:00
|
|
|
}
|
2017-12-24 07:47:37 +01:00
|
|
|
|
2018-05-11 06:35:28 +02:00
|
|
|
&:disabled ~ .custom-file-label {
|
|
|
|
background-color: $custom-file-disabled-bg;
|
|
|
|
}
|
|
|
|
|
2017-12-24 07:47:37 +01:00
|
|
|
@each $lang, $value in $custom-file-text {
|
|
|
|
&:lang(#{$lang}) ~ .custom-file-label::after {
|
|
|
|
content: $value;
|
|
|
|
}
|
|
|
|
}
|
2018-11-13 07:30:17 +01:00
|
|
|
|
|
|
|
~ .custom-file-label[data-browse]::after {
|
|
|
|
content: attr(data-browse);
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
2016-01-06 08:45:44 +01:00
|
|
|
|
2017-12-24 07:47:37 +01:00
|
|
|
.custom-file-label {
|
2014-12-26 00:40:24 +01:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
2017-12-24 07:47:37 +01:00
|
|
|
z-index: 1;
|
2016-01-18 00:21:16 +01:00
|
|
|
height: $custom-file-height;
|
2017-08-11 08:01:52 +02:00
|
|
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
2019-02-07 18:47:24 +01:00
|
|
|
font-family: $custom-file-font-family;
|
2018-10-20 10:50:20 +02:00
|
|
|
font-weight: $custom-file-font-weight;
|
2016-01-18 00:21:16 +01:00
|
|
|
line-height: $custom-file-line-height;
|
|
|
|
color: $custom-file-color;
|
|
|
|
background-color: $custom-file-bg;
|
|
|
|
border: $custom-file-border-width solid $custom-file-border-color;
|
2016-01-18 00:32:01 +01:00
|
|
|
@include border-radius($custom-file-border-radius);
|
2016-01-18 00:21:16 +01:00
|
|
|
@include box-shadow($custom-file-box-shadow);
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2017-12-24 07:47:37 +01:00
|
|
|
&::after {
|
2016-01-06 08:45:44 +01:00
|
|
|
position: absolute;
|
2017-12-24 07:47:37 +01:00
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
z-index: 3;
|
2016-01-06 08:45:44 +01:00
|
|
|
display: block;
|
2018-04-30 01:47:35 +02:00
|
|
|
height: $custom-file-height-inner;
|
2017-08-11 08:01:52 +02:00
|
|
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
2016-01-18 00:21:16 +01:00
|
|
|
line-height: $custom-file-line-height;
|
|
|
|
color: $custom-file-button-color;
|
2017-12-24 07:47:37 +01:00
|
|
|
content: "Browse";
|
2017-10-19 18:03:33 +02:00
|
|
|
@include gradient-bg($custom-file-button-bg);
|
2018-08-26 16:15:43 +02:00
|
|
|
border-left: inherit;
|
2017-10-02 23:18:33 +02:00
|
|
|
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
2016-01-06 08:45:44 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
2018-02-19 23:40:59 +01:00
|
|
|
|
|
|
|
// Range
|
|
|
|
//
|
2018-04-14 09:41:18 +02:00
|
|
|
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
2018-02-19 23:40:59 +01:00
|
|
|
// elements cannot be mixed. As such, there are no shared styles for focus or
|
|
|
|
// active states on prefixed selectors.
|
|
|
|
|
|
|
|
.custom-range {
|
|
|
|
width: 100%;
|
2018-07-25 02:56:03 +02:00
|
|
|
height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2});
|
|
|
|
padding: 0; // Need to reset padding
|
2018-02-19 23:40:59 +01:00
|
|
|
background-color: transparent;
|
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: none;
|
2018-07-15 06:31:20 +02:00
|
|
|
|
2018-11-04 11:05:09 +01:00
|
|
|
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
2018-07-15 06:31:20 +02:00
|
|
|
// No box-shadow() mixin for focus accessibility.
|
|
|
|
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
|
|
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
|
|
&::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
2018-02-19 23:40:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&::-moz-focus-outer {
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
width: $custom-range-thumb-width;
|
|
|
|
height: $custom-range-thumb-height;
|
2018-12-14 17:54:44 +01:00
|
|
|
margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
|
2018-02-19 23:40:59 +01:00
|
|
|
@include gradient-bg($custom-range-thumb-bg);
|
|
|
|
border: $custom-range-thumb-border;
|
|
|
|
@include border-radius($custom-range-thumb-border-radius);
|
|
|
|
@include box-shadow($custom-range-thumb-box-shadow);
|
2018-05-19 15:37:26 +02:00
|
|
|
@include transition($custom-forms-transition);
|
2018-02-19 23:40:59 +01:00
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
@include gradient-bg($custom-range-thumb-active-bg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-webkit-slider-runnable-track {
|
|
|
|
width: $custom-range-track-width;
|
|
|
|
height: $custom-range-track-height;
|
|
|
|
color: transparent; // Why?
|
|
|
|
cursor: $custom-range-track-cursor;
|
|
|
|
background-color: $custom-range-track-bg;
|
|
|
|
border-color: transparent;
|
|
|
|
@include border-radius($custom-range-track-border-radius);
|
|
|
|
@include box-shadow($custom-range-track-box-shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-moz-range-thumb {
|
|
|
|
width: $custom-range-thumb-width;
|
|
|
|
height: $custom-range-thumb-height;
|
|
|
|
@include gradient-bg($custom-range-thumb-bg);
|
|
|
|
border: $custom-range-thumb-border;
|
|
|
|
@include border-radius($custom-range-thumb-border-radius);
|
|
|
|
@include box-shadow($custom-range-thumb-box-shadow);
|
2018-05-19 15:37:26 +02:00
|
|
|
@include transition($custom-forms-transition);
|
2018-02-19 23:40:59 +01:00
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
@include gradient-bg($custom-range-thumb-active-bg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-moz-range-track {
|
|
|
|
width: $custom-range-track-width;
|
|
|
|
height: $custom-range-track-height;
|
|
|
|
color: transparent;
|
|
|
|
cursor: $custom-range-track-cursor;
|
|
|
|
background-color: $custom-range-track-bg;
|
|
|
|
border-color: transparent; // Firefox specific?
|
|
|
|
@include border-radius($custom-range-track-border-radius);
|
|
|
|
@include box-shadow($custom-range-track-box-shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-thumb {
|
|
|
|
width: $custom-range-thumb-width;
|
|
|
|
height: $custom-range-thumb-height;
|
2018-07-15 06:31:20 +02:00
|
|
|
margin-top: 0; // Edge specific
|
|
|
|
margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
|
|
margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
2018-02-19 23:40:59 +01:00
|
|
|
@include gradient-bg($custom-range-thumb-bg);
|
|
|
|
border: $custom-range-thumb-border;
|
|
|
|
@include border-radius($custom-range-thumb-border-radius);
|
|
|
|
@include box-shadow($custom-range-thumb-box-shadow);
|
2018-05-19 15:37:26 +02:00
|
|
|
@include transition($custom-forms-transition);
|
2018-02-19 23:40:59 +01:00
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
@include gradient-bg($custom-range-thumb-active-bg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-track {
|
|
|
|
width: $custom-range-track-width;
|
|
|
|
height: $custom-range-track-height;
|
|
|
|
color: transparent;
|
|
|
|
cursor: $custom-range-track-cursor;
|
|
|
|
background-color: transparent;
|
|
|
|
border-color: transparent;
|
2018-12-14 17:54:44 +01:00
|
|
|
border-width: $custom-range-thumb-height / 2;
|
2018-02-19 23:40:59 +01:00
|
|
|
@include box-shadow($custom-range-track-box-shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-fill-lower {
|
|
|
|
background-color: $custom-range-track-bg;
|
|
|
|
@include border-radius($custom-range-track-border-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-fill-upper {
|
|
|
|
margin-right: 15px; // arbitrary?
|
|
|
|
background-color: $custom-range-track-bg;
|
|
|
|
@include border-radius($custom-range-track-border-radius);
|
|
|
|
}
|
2018-07-25 02:39:15 +02:00
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
&::-webkit-slider-thumb {
|
|
|
|
background-color: $custom-range-thumb-disabled-bg;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-webkit-slider-runnable-track {
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-moz-range-thumb {
|
|
|
|
background-color: $custom-range-thumb-disabled-bg;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-moz-range-track {
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-ms-thumb {
|
|
|
|
background-color: $custom-range-thumb-disabled-bg;
|
|
|
|
}
|
|
|
|
}
|
2018-02-19 23:40:59 +01:00
|
|
|
}
|
2018-05-19 15:37:26 +02:00
|
|
|
|
|
|
|
.custom-control-label::before,
|
|
|
|
.custom-file-label,
|
|
|
|
.custom-select {
|
|
|
|
@include transition($custom-forms-transition);
|
|
|
|
}
|