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

317 lines
4.3 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"],
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-07-26 15:24:18 +12:00
select {
option {
color: $darkest_grey;
}
}
.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();
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;
&: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();
2017-07-24 06:03:09 +12:00
background: darken($white,5%);
2017-06-19 07:38:23 +12:00
margin-top: 1px;
margin-bottom: 9px;
2017-02-07 20:07:04 +13:00
}
2016-10-26 21:20:48 +13:00
&.primary {
2017-06-19 07:38:23 +12:00
background: $turquoise;
color: $white;
2017-02-12 21:11:50 +13:00
&:active {
2017-05-12 05:22:57 +12:00
background: $black;
}
}
2017-06-19 07:38:23 +12:00
&.white {
color: $black;
background: $white;
2017-02-01 10:10:31 +13:00
}
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;
&: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;
2017-06-19 09:04:27 +12:00
background: $mid_grey;
2017-06-19 07:38:23 +12:00
opacity: 0.5;
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-04-18 04:44:39 +12:00
.flag {
font-size: 10px;
margin-left: 5px;
2017-04-18 04:44:39 +12:00
padding: 1px 4px;
line-height: 1.2em;
vertical-align: top;
margin-top: 1px;
2017-04-18 04:44:39 +12: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 {
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
@include clearfix;
2016-11-14 11:20:02 +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;
}
2016-11-14 11:20:02 +13:00
label {
display: inline-block;
}
.description {
display: inline-block;
padding: 10px 14px;
}
.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
}
2016-11-14 11:20:02 +13:00
&.radio,
&.checkbox {
input{
display: none;
}
2016-11-14 11:30:24 +13:00
2016-11-14 11:20:02 +13:00
.input {
padding-top: 4px;
}
.label {
display: inline-block;
float: none;
width: auto;
padding: 5px 30px 5px 30px;
position: relative;
cursor: pointer;
}
}
&.radio {
input + .label:before {
content: ' ';
display: inline-block;
2017-02-12 21:36:45 +13:00
width: 14px;
height: 14px;
2016-11-14 11:20:02 +13:00
border-radius: 50%;
2017-07-24 06:03:09 +12:00
border: 2px solid $mid_grey;
2016-11-14 11:20:02 +13:00
position: absolute;
top: 4px;
left: 0;
}
input:checked + .label:before {
2017-07-24 06:03:09 +12:00
background: $mid_grey;
box-shadow: inset 0px 0px 0px 4px #222222;
2016-11-14 11:20:02 +13:00
}
}
&.checkbox {
input + .label:before {
font-family: FontAwesome;
2017-02-12 21:36:45 +13:00
font-size: 8px;
2016-11-14 11:20:02 +13:00
content: ' ';
2017-07-24 06:03:09 +12:00
color: $mid_grey;
2016-11-14 11:20:02 +13:00
display: inline-block;
2017-02-12 21:36:45 +13:00
width: 11px;
height: 11px;
2016-11-14 11:20:02 +13:00
padding: 3px 0 0 3px;
2017-07-24 06:03:09 +12:00
border: 2px solid $mid_grey;
2016-11-14 11:20:02 +13:00
position: absolute;
top: 5px;
left: 0;
}
input:checked + .label:before {
content: '\f00c';
}
}
2017-04-18 04:44:39 +12:00
.error {
color: $red;
display: inline-block;
}
2016-11-28 07:27:30 +13:00
}
@include responsive( $bp_medium ){
.field {
.name {
float: none;
width: auto;
padding: 0 0 4px 0;
}
.input {
float: none;
width: auto;
.text {
padding: 0 0 0 20px;
2016-11-28 07:27:30 +13:00
}
}
&.checkbox {
.input {
padding: 0 0 0 20px;
}
}
2016-11-28 07:27:30 +13:00
}
2016-11-14 11:20:02 +13:00
}