Files
Grav-Admin-Plugin/themes/grav/scss/template/_forms.scss

287 lines
5.6 KiB
SCSS
Raw Normal View History

2014-09-03 22:22:03 -06:00
2014-09-10 11:29:49 -06:00
// fieldset {
// border: 1px solid $core-border-color;
// }
2014-09-03 22:22:03 -06:00
2014-09-10 11:29:49 -06:00
// textarea, #{$all-text-inputs}, select[multiple=multiple] {
// background-color: white;
// border: 1px solid $core-border-color;
// box-shadow: $core-box-shadow;
2014-09-03 22:22:03 -06:00
2014-09-10 11:29:49 -06:00
// &:hover {
// border-color: $core-border-color-hover;
// }
// &:focus {
// border-color: $core-border-color-focus;
// box-shadow: $core-box-shadow-focus;
// }
// }
// label {
// @extend strong;
// }
2014-09-03 22:22:03 -06:00
2014-09-10 11:29:49 -06:00
// Forms
$form-label-width: 30%;
$form-border: darken($content-bg,10%);
$form-border-radius: 4px;
$form-border-width: 1px;
$form-label-pad: 5px 0 5px 3rem;
$form-input-pad: 5px 10px;
$form-select-pad: 5px 30px 5px 10px;
// Load Third Party Libraries
@import "template/modules/toggle-switch";
2014-09-03 22:22:03 -06:00
form {
2014-09-10 11:29:49 -06:00
.form-field {
margin-bottom: 1rem;
padding-left: $padding-default;
}
.form-data {
padding-right: $padding-default;
2014-09-10 11:29:49 -06:00
}
label {
padding: 5px 0;
2014-09-10 11:29:49 -06:00
font-weight: 400;
margin:0;
}
2014-09-10 21:57:00 -06:00
input, select, textarea, button, .selectize-input {
2014-09-10 11:29:49 -06:00
font-family: $font-family-default;
font-size: $core-font-size;
line-height: $core-line-height;
border-radius: $form-border-radius;
-webkit-font-smoothing: antialiased;
}
2014-09-10 21:57:00 -06:00
.form-select-wrapper, .selectize-control.single .selectize-input {
2014-09-10 11:29:49 -06:00
position: relative;
&:after {
2014-09-10 21:57:00 -06:00
margin-top: 0;
border: 0;
2014-09-10 11:29:49 -06:00
position: absolute;
content: '\f078';
font-family: 'FontAwesome';
right: 12px;
top: 50%;
line-height: 0;
color: lighten($content-fg,15%);
pointer-events: none;
}
}
2014-09-10 22:04:56 -06:00
.selectize-input {
2014-09-10 21:57:00 -06:00
box-shadow: none;
color: $content-fg;
2014-09-10 22:04:56 -06:00
}
2014-09-15 21:25:35 -06:00
2014-09-10 22:04:56 -06:00
.selectize-control.multi .selectize-input {
2014-09-15 21:25:35 -06:00
padding: ($leading-margin / 4) ($leading-margin / 4);
&.has-items {
padding-top: 6px;
padding-bottom: 4px;
}
input {
font-size: $core-font-size;
line-height: $core-line-height;
}
2014-09-10 22:04:56 -06:00
> div {
2014-09-10 22:07:27 -06:00
color: $content-fg;
// background: $content-bg;
2014-09-10 22:04:56 -06:00
border-radius: 2px;
line-height: 1.5;
&.active {
background: darken($content-bg,10%);
}
}
}
.selectize-control.single .selectize-input {
2014-09-10 21:57:00 -06:00
&:after {
right: 24px;
}
&.dropdown-active {
&:after {
content: '\f077';
}
}
}
.x-small {
max-width: 5rem !important;
}
2014-09-10 11:29:49 -06:00
.small {
max-width: 10rem !important;
2014-09-10 11:29:49 -06:00
}
.medium {
max-width: 20rem !important;
textarea {
height: 7rem;
2014-09-10 11:29:49 -06:00
}
}
.large {
max-width: 30rem !important;
textarea {
height: 10rem;
2014-09-10 11:29:49 -06:00
}
}
2014-09-10 21:57:00 -06:00
.selectize-input {
padding: $form-select-pad;
}
2014-09-10 11:29:49 -06:00
select {
width: 100%;
2014-09-10 11:29:49 -06:00
border: $form-border-width solid $form-border;
background: $white;
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
padding: $form-select-pad;
cursor: pointer;
margin: 0;
}
input[type=text] {
width: 100%;
border: $form-border-width solid $form-border;
background: $white;
}
textarea {
width: 100%;
border: $form-border-width solid $form-border;
background: $white;
}
2014-09-10 11:29:49 -06:00
// input[type=text] {
// width: 65%;
// border: $form-border-width solid $form-border;
// padding: $form-input-pad;
// }
// input[type=date] {
// width: 200px;
// border: $form-border-width solid $form-border;
// padding: $form-input-pad;
// }
// textarea {
// width: 65%;
// height: 100px;
// border: $form-border-width solid $form-border;
// padding: $form-input-pad;
// }
.switch-toggle {
// margin-left: 30%;
label {
cursor: pointer;
}
a,label {
outline: none !important;
}
}
.dynfields {
input[type=text] {
width: 40%;
2014-09-10 15:06:10 -06:00
float: left;
margin: 0 5px 5px 0;
2014-09-10 11:29:49 -06:00
}
2014-09-10 15:06:10 -06:00
.form-row {
2014-09-10 11:29:49 -06:00
display: inline-block;
2014-09-10 15:06:10 -06:00
span {
padding: 0.5rem;
display: inline-block;
line-height: 1.7;
cursor: pointer;
}
2014-09-10 11:29:49 -06:00
}
2014-09-10 15:06:10 -06:00
2014-09-10 11:29:49 -06:00
}
.button-bar {
margin-top: 50px;
background: lighten($form-border,7%);
padding: $form-input-pad;
padding-left: $form-label-width;
}
.checkboxes {
display: inline-block;
padding: 5px 0;
label {
display: inline;
cursor: pointer;
position: relative;
padding: 0 0 0 2rem;
margin-right: 15px;
}
label:before {
content:"";
display: inline-block;
width: 1.5rem;
height: 1.5rem;
top: 50%;
left: 0;
margin-top: -0.75rem;
margin-right: 10px;
position: absolute;
background: $white;
border: $form-border-width solid $form-border;
border-radius: $form-border-radius;
}
input[type=checkbox] {
display: none;
}
input[type=checkbox]:checked + label:before {
content:"\f00c";
font-family: "FontAwesome";
font-size: 1.2rem;
line-height: 1.5rem;
text-align: center;
}
}
2014-09-03 22:22:03 -06:00
}