2014-12-24 13:13:23 +01:00
|
|
|
// Embedded icons from Open Iconic.
|
|
|
|
// Released under MIT and copyright 2014 Waybury.
|
|
|
|
// http://useiconic.com/open
|
|
|
|
|
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;
|
|
|
|
display: inline;
|
|
|
|
padding-left: 1.5rem;
|
|
|
|
color: #555;
|
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
+ .custom-control {
|
|
|
|
margin-left: 1rem;
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
&:checked ~ .custom-control-indicator {
|
|
|
|
color: #fff;
|
|
|
|
background-color: #0074d9;
|
|
|
|
@include box-shadow(none);
|
|
|
|
}
|
2015-08-21 22:21:20 +02:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
&:focus ~ .custom-control-indicator {
|
|
|
|
// the mixin is not used here to make sure there is feedback
|
|
|
|
box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9;
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
&:active ~ .custom-control-indicator {
|
|
|
|
color: #fff;
|
|
|
|
background-color: #84c6ff;
|
|
|
|
@include box-shadow(none);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
~ .custom-control-indicator {
|
|
|
|
cursor: not-allowed;
|
|
|
|
background-color: $custom-form-bg-color-disabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
~ .custom-control-description {
|
|
|
|
color: $custom-form-description-color-disabled;
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
|
|
|
|
2014-12-24 13:47:08 +01:00
|
|
|
// Custom indicator
|
|
|
|
//
|
|
|
|
// Generates a shadow element to create our makeshift checkbox/radio background.
|
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-control-indicator {
|
2014-12-26 00:40:24 +01:00
|
|
|
position: absolute;
|
2016-01-06 08:25:42 +01:00
|
|
|
top: .0625rem;
|
2014-12-26 00:40:24 +01:00
|
|
|
left: 0;
|
|
|
|
display: block;
|
|
|
|
width: 1rem;
|
|
|
|
height: 1rem;
|
|
|
|
font-size: 65%;
|
|
|
|
line-height: 1rem;
|
|
|
|
color: #eee;
|
|
|
|
text-align: center;
|
|
|
|
user-select: none;
|
2015-10-14 04:30:30 +02:00
|
|
|
background-color: $custom-form-bg-color;
|
2014-12-26 00:40:24 +01:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: center center;
|
|
|
|
background-size: 50% 50%;
|
2016-01-06 08:25:42 +01:00
|
|
|
@include box-shadow(inset 0 .25rem .25rem rgba(0,0,0,.1));
|
2014-12-24 13:13:23 +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 {
|
|
|
|
.custom-control-indicator {
|
2014-12-26 00:40:24 +01:00
|
|
|
border-radius: .25rem;
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-control-input:checked ~ .custom-control-indicator {
|
2014-12-26 00:40:24 +01:00
|
|
|
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYuNCwxTDUuNywxLjdMMi45LDQuNUwyLjEsMy43TDEuNCwzTDAsNC40bDAuNywwLjdsMS41LDEuNWwwLjcsMC43bDAuNy0wLjdsMy41LTMuNWwwLjctMC43TDYuNCwxTDYuNCwxeiINCgkvPg0KPC9zdmc+DQo=);
|
|
|
|
}
|
2015-01-01 21:01:55 +01:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-control-input:indeterminate ~ .custom-control-indicator {
|
2015-01-01 21:01:55 +01:00
|
|
|
background-color: #0074d9;
|
|
|
|
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K);
|
2015-01-01 21:13:24 +01:00
|
|
|
@include box-shadow(none);
|
2015-01-01 21:01:55 +01:00
|
|
|
}
|
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 {
|
|
|
|
.custom-control-indicator {
|
2014-12-26 00:40:24 +01:00
|
|
|
border-radius: 50%;
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-control-input:checked ~ .custom-control-indicator {
|
2014-12-26 00:40:24 +01:00
|
|
|
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQsMUMyLjMsMSwxLDIuMywxLDRzMS4zLDMsMywzczMtMS4zLDMtM1M1LjcsMSw0LDF6Ii8+DQo8L3N2Zz4NCg==);
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
|
|
|
|
2015-04-18 20:17:32 +02:00
|
|
|
|
2014-12-25 00:45:37 +01:00
|
|
|
// Layout options
|
|
|
|
//
|
|
|
|
// By default radios and checkboxes are `inline-block` with no additional spacing
|
|
|
|
// set. Use these optional classes to tweak the layout.
|
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
.custom-controls-stacked {
|
|
|
|
.custom-control {
|
2014-12-26 00:40:24 +01:00
|
|
|
display: inline;
|
|
|
|
|
2015-08-19 22:31:31 +02:00
|
|
|
&::after {
|
2014-12-26 00:40:24 +01:00
|
|
|
display: block;
|
|
|
|
margin-bottom: .25rem;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
2016-01-06 08:25:42 +01:00
|
|
|
+ .custom-control {
|
2014-12-26 00:40:24 +01:00
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
2014-12-25 00:45:37 +01:00
|
|
|
}
|
|
|
|
|
2015-04-18 20:17:32 +02:00
|
|
|
|
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
|
|
|
|
// http://primercss.io.
|
2015-08-23 10:12:00 +02:00
|
|
|
//
|
|
|
|
// Includes IE9-specific hacks (noted by ` \9`).
|
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;
|
2015-08-19 04:26:18 +02:00
|
|
|
max-width: 100%;
|
|
|
|
padding: .375rem 1.75rem .375rem .75rem;
|
2015-08-23 10:12:00 +02:00
|
|
|
padding-right: .75rem \9;
|
2015-10-14 18:50:03 +02:00
|
|
|
color: $input-color;
|
2015-12-08 10:06:23 +01:00
|
|
|
vertical-align: middle;
|
2015-08-23 10:00:22 +02:00
|
|
|
background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC) no-repeat right .75rem center;
|
2015-08-23 10:12:00 +02:00
|
|
|
background-image: none \9;
|
2015-08-19 04:26:18 +02:00
|
|
|
background-size: 8px 10px;
|
2015-12-07 11:07:35 +01:00
|
|
|
border: $input-btn-border-width solid $input-border-color;
|
2016-01-06 08:45:20 +01:00
|
|
|
@include border-radius($border-radius);
|
2015-08-23 10:12:00 +02:00
|
|
|
// Use vendor prefixes as `appearance` isn't part of the CSS spec.
|
2015-08-19 04:26:18 +02:00
|
|
|
-moz-appearance: none;
|
2015-08-23 10:12:00 +02:00
|
|
|
-webkit-appearance: none;
|
2015-08-19 04:26:18 +02:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
border-color: #51a7e8;
|
2015-08-23 10:00:22 +02:00
|
|
|
outline: none;
|
2015-08-24 08:13:14 +02:00
|
|
|
@include box-shadow(inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(81, 167, 232, 0.5));
|
2015-08-19 04:26:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Hides the default caret in IE11
|
|
|
|
&::-ms-expand {
|
|
|
|
opacity: 0;
|
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 {
|
2015-08-19 04:26:18 +02:00
|
|
|
padding-top: 3px;
|
|
|
|
padding-bottom: 3px;
|
|
|
|
font-size: 12px;
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2015-08-19 04:26:18 +02:00
|
|
|
&:not([multiple]) {
|
|
|
|
height: 26px;
|
|
|
|
min-height: 26px;
|
2014-12-26 00:40:24 +01:00
|
|
|
}
|
2014-12-24 13:13:23 +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;
|
2015-12-29 15:41:21 +01:00
|
|
|
max-width: 100%;
|
2014-12-26 00:40:24 +01:00
|
|
|
height: 2.5rem;
|
|
|
|
cursor: pointer;
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
2016-01-06 08:45:44 +01:00
|
|
|
|
|
|
|
.custom-file-input {
|
2014-12-26 00:40:24 +01:00
|
|
|
min-width: 14rem;
|
2015-12-29 15:41:21 +01:00
|
|
|
max-width: 100%;
|
2014-12-26 00:40:24 +01:00
|
|
|
margin: 0;
|
2015-08-25 07:49:45 +02:00
|
|
|
filter: alpha(opacity = 0);
|
2014-12-26 00:40:24 +01:00
|
|
|
opacity: 0;
|
2016-01-06 08:45:44 +01:00
|
|
|
|
|
|
|
&:focus ~ .custom-file-control {
|
|
|
|
@include box-shadow(0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9);
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
2016-01-06 08:45:44 +01:00
|
|
|
|
2016-01-06 08:58:34 +01:00
|
|
|
// scss-lint:disable PropertyCount
|
2016-01-06 08:45:44 +01:00
|
|
|
.custom-file-control {
|
2014-12-26 00:40:24 +01:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 5;
|
|
|
|
height: 2.5rem;
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
line-height: 1.5;
|
|
|
|
color: #555;
|
|
|
|
user-select: none;
|
|
|
|
background-color: #fff;
|
2015-12-07 11:07:35 +01:00
|
|
|
border: $input-btn-border-width solid #ddd;
|
2014-12-26 00:40:24 +01:00
|
|
|
border-radius: .25rem;
|
2015-08-24 08:13:14 +02:00
|
|
|
@include box-shadow(inset 0 .2rem .4rem rgba(0,0,0,.05));
|
2014-12-24 13:13:23 +01:00
|
|
|
|
2016-01-06 08:45:44 +01:00
|
|
|
&::after {
|
|
|
|
content: "Choose file...";
|
|
|
|
}
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
position: absolute;
|
|
|
|
top: -.075rem;
|
|
|
|
right: -.075rem;
|
|
|
|
bottom: -.075rem;
|
|
|
|
z-index: 6;
|
|
|
|
display: block;
|
|
|
|
height: 2.5rem;
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
line-height: 1.5;
|
|
|
|
color: #555;
|
|
|
|
content: "Browse";
|
|
|
|
background-color: #eee;
|
|
|
|
border: $input-btn-border-width solid #ddd;
|
|
|
|
border-radius: 0 .25rem .25rem 0;
|
|
|
|
}
|
2014-12-24 13:13:23 +01:00
|
|
|
}
|
2016-01-06 08:58:34 +01:00
|
|
|
// scss-lint:enable PropertyCount
|