Files
Iris/src/scss/global/_forms.scss

440 lines
6.1 KiB
SCSS
Raw Normal View History

2017-05-19 08:59:29 +12:00
:focus {
outline: none;
}
::-moz-focus-inner {
border: 0;
}
2016-10-26 21:20:48 +13:00
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="email"],
input[type="date"],
2018-07-08 20:20:51 +12:00
input[type="file"],
select {
2016-10-26 21:20:48 +13:00
padding: 10px 14px;
2017-07-24 06:03:09 +12:00
background: rgba(255,255,255,0.1);
color: $white;
2017-07-26 15:24:18 +12:00
font-family: "Overpass", Helvetica, Arial, sans-serif;
2016-10-26 21:20:48 +13:00
font-size: 14px;
2017-07-26 15:24:18 +12:00
border-radius: 3px;
letter-spacing: -0.01rem;
2017-07-24 06:03:09 +12:00
&:focus,
&:active {
background: rgba(255,255,255,0.2);
}
2017-10-17 20:24:31 +13:00
&:disabled {
opacity: 0.5;
}
2018-04-18 17:01:57 +12:00
&.tiny {
width: 50px;
padding-left: 4px;
padding-right: 4px;
text-align: center;
}
}
2018-05-23 13:55:14 +12:00
input[type="radio"]{
& + .label:before {
content: ' ';
display: inline-block;
width: 20px;
height: 20px;
border-radius: 50%;
position: absolute;
background: rgba(255,255,255,0.1);
top: 4px;
left: 0;
}
&:checked + .label:after {
content: ' ';
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
position: absolute;
2018-05-24 21:37:41 +12:00
top: 11px;
2018-05-23 13:55:14 +12:00
left: 7px;
background: $white;
}
&:focus + .label:before,
&:active + .label:before {
background: rgba(255,255,255,0.3);
}
}
input[type="checkbox"]{
& + .label:before {
font-family: "Material Icons";
font-size: 14px;
content: '';
color: $white;
background: rgba(255,255,255,0.1);
display: inline-block;
padding: 0.2em;
height: 1.1em;
width: 1.1em;
text-align: center;
position: absolute;
top: 3px;
left: 0;
border-radius: 3px;
}
&:checked + .label:before {
content: '\e5ca';
}
&:focus + .label:before,
&:active + .label:before {
background: rgba(255,255,255,0.3);
}
}
2017-07-26 15:24:18 +12:00
select {
max-width: 100%;
2017-07-26 15:24:18 +12:00
option {
background: $white;
2017-07-26 15:24:18 +12:00
color: $darkest_grey;
max-width: 100%;
box-sizing: border-box;
2017-07-26 15:24:18 +12:00
}
}
.button-wrapper {
padding: 10px 0;
margin-top: -1px;
&.large {
padding: 16px 0;
}
}
.text-button {
cursor: pointer;
&.destructive {
color: $red;
}
}
2016-10-26 21:20:48 +13:00
.button,
button,
input[type="button"],
input[type="submit"] {
2016-10-26 21:20:48 +13:00
@include animate();
2017-06-19 16:53:27 +12:00
@include feature_font();
2018-05-09 14:09:20 +12:00
@include noselect();
2017-07-26 15:24:18 +12:00
font-size: 14px;
color: $black;
display: inline-block;
2017-06-19 16:53:27 +12:00
padding: 9px 30px 7px;
margin: 0 20px 10px 0;
2017-07-24 06:03:09 +12:00
background: $white;
2017-04-04 08:32:51 +12:00
box-sizing: border-box;
2017-06-19 07:38:23 +12:00
border-radius: 3px;
vertical-align: middle;
position: relative;
border: 0 !important;
cursor: pointer;
2017-07-26 15:24:18 +12:00
letter-spacing: -0.01rem;
2018-05-16 16:50:46 +12:00
text-align: center;
2017-07-26 15:24:18 +12:00
2018-05-16 21:08:45 +12:00
.icon {
padding-right: 8px;
}
2017-07-26 15:24:18 +12:00
&:not(.no-hover){
@include gradient_overlay(3px, 0.05);
}
2017-06-19 07:38:23 +12:00
.notouch &:not(.no-hover):hover {
box-shadow: 1px 2px 6px rgba(0,0,0,0.2);
2017-06-19 07:38:23 +12:00
&:before {
2017-07-26 15:24:18 +12:00
opacity: 0.2;
2017-06-19 07:38:23 +12:00
}
2016-10-26 21:20:48 +13:00
}
2017-02-12 21:11:50 +13:00
&:active {
@include noanimate();
background: darken($white, 5%);
transform: translate(1px,1px);
opacity: 0.8;
2017-02-07 20:07:04 +13:00
}
2018-01-11 16:46:57 +13:00
&.small {
padding: 6px 18px 4px;
}
&.large {
padding: 16px 50px 14px;
}
2018-01-11 16:46:57 +13:00
&.pull-right {
margin-right: 0;
margin-left: 30px;
}
2016-10-26 21:20:48 +13:00
&.primary {
2017-06-19 07:38:23 +12:00
background: $turquoise;
color: $white;
2017-05-12 05:22:57 +12:00
}
2017-06-19 07:38:23 +12:00
&.white {
color: $black;
background: $white;
2017-02-01 10:10:31 +13:00
}
2018-01-05 21:31:59 +13:00
&.grey {
color: $white;
background: $grey;
}
2018-07-13 16:48:41 +12:00
&.black {
color: $white;
background: $darkest_grey;
}
2016-10-26 21:20:48 +13:00
&.confirming,
&.destructive {
2017-06-19 07:38:23 +12:00
background: $red;
color: $white;
}
&.alternative {
background: $blue;
color: $white;
2016-10-26 21:20:48 +13:00
}
2016-10-27 16:58:11 +13:00
&.timing-out {
position: relative;
&:before {
2016-10-27 16:58:11 +13:00
@include animate_timeout(2s);
content: '';
position: absolute;
2017-06-19 09:04:27 +12:00
top: 0;
2016-10-27 16:58:11 +13:00
left: 0;
bottom: 0;
width: 0;
2017-06-19 09:04:27 +12:00
background: $black;
opacity: 0.25;
2016-10-27 16:58:11 +13:00
}
}
2017-02-12 21:11:50 +13:00
&.discrete {
border: transparent;
&[disabled],
&[disabled="disabled"] {
border-color: $light_grey !important;
}
2016-11-14 11:30:24 +13:00
}
2017-05-19 08:59:29 +12:00
&.working {
position: relative;
cursor: wait !important;
2018-01-25 17:04:19 +13:00
background: $grey;
color: $mid_grey;
2017-05-19 08:59:29 +12:00
&:after {
2017-06-19 07:38:23 +12:00
pointer-events: none;
2017-05-19 08:59:29 +12:00
position: absolute;
display: block;
content: '';
animation: slideloader 1s infinite linear;
2018-01-25 17:04:19 +13:00
background: rgba(200,200,200,0.3);
2017-06-19 07:38:23 +12:00
top: 0;
2017-05-19 08:59:29 +12:00
left: 0;
2017-06-19 07:38:23 +12:00
bottom: 0;
right: 0;
2017-05-19 08:59:29 +12:00
z-index: 1;
}
}
&.disabled,
2016-10-26 21:20:48 +13:00
&[disabled],
&[disabled="disabled"]{
2017-02-12 21:11:50 +13:00
opacity: 0.5;
2016-10-26 21:20:48 +13:00
cursor: not-allowed !important;
2017-07-26 15:24:18 +12:00
color: $mid_grey;
border-color: $mid_grey;
background: transparent;
2017-02-12 21:11:50 +13:00
2017-07-26 15:24:18 +12:00
&:before {
opacity: 0.15;
2017-02-12 21:11:50 +13:00
}
2017-02-08 08:34:14 +13:00
}
2017-10-10 13:05:28 +13:00
@include responsive($bp_medium){
margin-right: 10px;
padding-left: 20px;
padding-right: 20px;
2017-02-22 08:40:46 +13:00
}
}
2016-11-14 11:20:02 +13:00
.field {
2018-03-23 16:54:56 +13:00
@include clearfix();
2018-05-23 13:55:14 +12:00
@include noselect();
2016-10-26 21:20:48 +13:00
display: block;
2017-07-26 15:24:18 +12:00
padding-bottom: 12px;
2016-10-26 21:20:48 +13:00
2018-05-20 20:42:20 +12:00
.icon {
padding-right: 0.32em;
}
2018-03-23 16:54:56 +13:00
& > .name {
2016-10-26 21:20:48 +13:00
display: block;
padding-top: 10px;
width: 20%;
2016-10-26 21:20:48 +13:00
float: left;
}
2018-03-23 16:54:56 +13:00
& > .input {
width: 80%;
float: left;
input,
select,
textarea {
2016-11-14 11:30:24 +13:00
width: 100%;
}
2016-11-06 15:47:37 +13:00
.text {
display: block;
padding: 10px 14px 10px 0;
2016-11-06 15:47:37 +13:00
}
2016-10-26 21:20:48 +13:00
}
2018-03-23 16:54:56 +13:00
label {
display: inline-block;
}
.label {
.tooltip {
left: -4px;
}
}
&.sub-field {
padding: 0;
}
.description {
2018-07-02 16:22:05 +12:00
display: block;
padding: 6px 0 4px;
font-size: 12px;
2018-07-13 16:48:41 +12:00
color: rgba(255,255,255,0.6);
&.error {
color: $red;
display: inline-block;
opacity: 1;
}
}
2016-11-14 11:20:02 +13:00
&.radio,
&.checkbox {
2018-07-08 20:20:51 +12:00
input[type="radio"],
input[type="checkbox"] {
2016-11-14 11:20:02 +13:00
display: none;
}
2016-11-14 11:30:24 +13:00
2016-11-14 11:20:02 +13:00
.input {
padding-top: 4px;
label:not(:last-child){
padding-right: 14px;
}
2016-11-14 11:20:02 +13:00
}
.label {
display: inline-block;
float: none;
width: auto;
2018-05-22 21:16:03 +12:00
padding: 5px 5px 5px 28px;
2016-11-14 11:20:02 +13:00
position: relative;
cursor: pointer;
}
}
2018-01-11 16:46:57 +13:00
&.range {
2018-01-18 08:42:58 +13:00
position: relative;
2018-01-23 11:34:03 +13:00
.input-range {
height: auto;
}
2018-01-18 08:42:58 +13:00
.label {
padding-bottom: 6px;
}
2018-01-11 16:46:57 +13:00
.input-range__track,
.input-range__slider-container {
transition: none;
height: 6px;
2018-01-18 08:42:58 +13:00
border-radius: 3px;
cursor: col-resize;
2018-01-11 16:46:57 +13:00
}
.input-range__track--background {
2018-01-23 11:34:03 +13:00
margin: 0;
background: rgba(100,100,100,0.5);
}
.input-range__track--active {
background: $blue;
}
2018-01-18 08:42:58 +13:00
.input-range__slider-container {
.input-range__slider {
cursor: col-resize;
background: $blue;
border: none;
top: 0;
height: 6px;
2018-01-18 08:42:58 +13:00
width: 20px;
margin: -6px 0 0 0;
border-radius: 3px 0 0 3px;
2018-01-18 08:42:58 +13:00
}
&:last-child {
.input-range__slider {
border-radius: 0 3px 3px 0;
margin-left: -12px;
2018-01-18 08:42:58 +13:00
}
}
}
2018-01-11 16:46:57 +13:00
}
2016-11-28 07:27:30 +13:00
}
2017-10-10 13:05:28 +13:00
@include responsive($bp_medium){
2016-11-28 07:27:30 +13:00
.field {
.name {
float: none;
width: auto;
padding: 0 0 4px 0;
}
.input {
float: none;
width: auto;
.text {
padding: 0 20px 0 0;
}
}
2016-11-28 07:27:30 +13:00
}
2016-11-14 11:20:02 +13:00
}