Files
Iris/src/scss/global/_forms.scss
2017-02-28 16:13:27 +13:00

358 lines
5.0 KiB
SCSS
Executable File

button,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="email"],
input[type="date"] {
padding: 10px 14px;
background: #FFFFFF;
color: #000000;
font-family: "Archivo Narrow", Helvetica, Arial, sans-serif;
font-size: 14px;
}
.button-wrapper {
padding: 10px 0;
margin-top: -1px;
&.large {
padding: 16px 0;
}
}
.text-button {
cursor: pointer;
&.destructive {
color: $red;
}
}
.button,
button,
input[type="button"],
input[type="submit"] {
@include animate();
padding: 6px 20px;
min-width: 160px;
border: 0;
margin: 0 20px 10px 0;
text-align: center;
border: 2px solid $mid_grey;
color: $mid_grey;
background: transparent;
text-transform: uppercase;
font-size: 12px;
font-weight: 800;
&.wide {
min-width: 200px;
}
&:hover{
cursor: pointer;
border-color: darken( $mid_grey, 10%);
}
&:active {
@include noanimate();
background: $mid_grey;
color: #FFFFFF;
border-color: $mid_grey;
}
&.primary {
border-color: $turquoise;
color: $turquoise;
&:hover {
color: darken( $turquoise, 10% );
border-color: darken( $turquoise, 10% );
}
&:active {
color: #FFFFFF;
background: $turquoise;
border-color: $turquoise;
}
}
&.secondary {
color: #000000;
border-color: #000000;
&:hover {
color: lighten( #000000, 40% );
border-color: lighten( #000000, 40% );
}
&:active {
color: #FFFFFF;
background: #000000;
border-color: #000000;
}
}
&.confirming,
&.destructive {
border-color: $red;
color: $red;
&:hover {
color: darken( $red, 6% );
border-color: darken( $red, 6% );
}
&:active {
color: #FFFFFF;
background: $red;
border-color: $red;
}
}
&.timing-out {
position: relative;
&::before {
@include animate_timeout(2s);
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 3px;
background: $red;
}
}
&.white {
color: #FFFFFF;
border-color: #FFFFFF;
&:hover {
color: rgba(255,255,255,0.8);
border-color: rgba(255,255,255,0.8);
}
&:active {
color: #000000;
background: #FFFFFF;
border-color: #FFFFFF;
}
}
&.discrete {
border: transparent;
&[disabled],
&[disabled="disabled"] {
border-color: $light_grey !important;
}
}
&.context-menu-trigger {
border-color: transparent;
padding: 6px;
margin-bottom: 8px;
font-size: 20px;
min-width: 0;
line-height: 20px;
color: #000000;
vertical-align: bottom;
.fa {
pointer-events: none;
}
&:hover {
border-color: transparent;
background: rgba(0,0,0,0.1);
}
&:active {
color: #FFFFFF;
background: #000000;
}
&.white {
color: #FFFFFF;
&:hover {
border-color: transparent;
background: rgba(255,255,255,0.1);
}
&:active {
color: #000000;
background: #FFFFFF;
}
}
}
&[disabled],
&[disabled="disabled"]{
opacity: 0.5;
cursor: not-allowed !important;
&,
&:hover,
&:active {
color: $mid_grey;
border-color: $mid_grey;
background: transparent;
}
}
@include responsive( $bp_medium ){
min-width: 120px;
margin-right: 10px;
}
@include responsive( $bp_narrow ){
min-width: 0;
}
}
.actions {
.button:last-of-type,
button:last-of-type {
margin-right: 0;
}
}
.field {
display: block;
padding-bottom: 8px;
@include clearfix;
.name {
display: block;
padding-top: 10px;
width: 15%;
float: left;
}
label {
display: inline-block;
}
.description {
display: inline-block;
padding: 10px 14px;
}
.input {
width: 85%;
float: left;
input,
select,
textarea {
width: 100%;
}
.text {
display: block;
padding: 10px 14px 10px 0;
}
}
&.radio,
&.checkbox {
input{
display: none;
}
.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;
width: 14px;
height: 14px;
border-radius: 50%;
border: 2px solid #000000;
position: absolute;
top: 4px;
left: 0;
}
input:checked + .label:before {
background: #000000;
box-shadow: inset 0px 0px 0px 4px #f5f5f5;
}
&.white {
input + .label:before {
border-color: #FFFFFF;
}
input:checked + .label:before {
background: #FFFFFF;
box-shadow: inset 0px 0px 0px 4px #222222;
}
}
}
&.checkbox {
input + .label:before {
font-family: FontAwesome;
font-size: 8px;
content: ' ';
color: #000000;
display: inline-block;
width: 11px;
height: 11px;
padding: 3px 0 0 3px;
border: 2px solid #000000;
position: absolute;
top: 5px;
left: 0;
}
input:checked + .label:before {
content: '\f00c';
}
&.white {
input + .label:before {
border-color: #FFFFFF;
}
input:checked + .label:before {
color: #FFFFFF;
}
}
}
}
@include responsive( $bp_medium ){
.field {
.name {
float: none;
width: auto;
padding: 0 0 4px 0;
}
.input {
float: none;
width: auto;
.text {
padding: 0;
}
}
}
}