mirror of
https://github.com/flarum/core.git
synced 2025-07-29 20:50:28 +02:00
Clean up LESS files
This commit is contained in:
153
less/lib/forms.less
Normal file
153
less/lib/forms.less
Normal file
@@ -0,0 +1,153 @@
|
||||
.form-group {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.form-control {
|
||||
.box-shadow(none);
|
||||
&:focus,
|
||||
&.focus {
|
||||
background-color: #fff;
|
||||
color: @fl-body-color;
|
||||
.box-shadow(none);
|
||||
}
|
||||
}
|
||||
legend {
|
||||
font-size: 14px;
|
||||
border: 0;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
// Search inputs
|
||||
// @todo Extract some of this into header-specific definitions
|
||||
.search-input {
|
||||
overflow: hidden;
|
||||
|
||||
&:before {
|
||||
.fa();
|
||||
content: @fa-var-search;
|
||||
float: left;
|
||||
margin-right: -36px;
|
||||
width: 36px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: @fl-body-muted-color;
|
||||
position: relative;
|
||||
padding: @padding-base-vertical - 1 0;
|
||||
line-height: @line-height-base;
|
||||
pointer-events: none;
|
||||
}
|
||||
& .form-control {
|
||||
float: left;
|
||||
width: 225px;
|
||||
padding-left: 36px;
|
||||
padding-right: 36px;
|
||||
.transition(~"all 0.4s");
|
||||
}
|
||||
& .clear {
|
||||
float: left;
|
||||
margin-left: -36px;
|
||||
vertical-align: top;
|
||||
opacity: 0;
|
||||
width: 36px !important;
|
||||
.rotate(-180deg);
|
||||
.transition(~"transform 0.2s, opacity 0.2s");
|
||||
}
|
||||
&.clearable .clear {
|
||||
opacity: 1;
|
||||
.rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
// Select inputs
|
||||
.select-input {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.select-input select {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
-webkit-appearance: none;
|
||||
padding-right: @padding-base-horizontal + 16;
|
||||
cursor: pointer;
|
||||
}
|
||||
.select-input .fa {
|
||||
margin-left: -@padding-base-horizontal - 16;
|
||||
pointer-events: none;
|
||||
color: @fl-body-muted-color;
|
||||
}
|
||||
|
||||
.checkbox-switch {
|
||||
& label {
|
||||
padding-left: 65px;
|
||||
}
|
||||
& .switch-control {
|
||||
float: left;
|
||||
margin-left: -65px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
& .loading-indicator {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.switch-control, .yesno-control {
|
||||
& input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.switch {
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
padding: 3px;
|
||||
position: relative;
|
||||
border-radius: 14px;
|
||||
background: @fl-body-control-bg;
|
||||
.transition(background-color 0.2s);
|
||||
|
||||
input:checked + & {
|
||||
background: @fl-body-primary-color;
|
||||
}
|
||||
|
||||
& .loading-indicator {
|
||||
opacity: 0;
|
||||
|
||||
.loading& {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
&:before, & .loading-indicator {
|
||||
position: absolute;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
left: 3px;
|
||||
.transition(~"opacity 0.2s, left 0.2s");
|
||||
|
||||
input:checked + & {
|
||||
left: 25px;
|
||||
}
|
||||
}
|
||||
&:before {
|
||||
content: ' ';
|
||||
background: @fl-body-bg;
|
||||
border-radius: 11px;
|
||||
box-shadow: 0 2px 4px @fl-shadow-color;
|
||||
}
|
||||
}
|
||||
.yesno-control {
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
.yesno {
|
||||
font-size: 14px;
|
||||
|
||||
&.yes {
|
||||
color: #58A400;
|
||||
}
|
||||
&.no {
|
||||
color: #D0021B;
|
||||
}
|
||||
&.disabled {
|
||||
color: @fl-body-muted-more-color !important;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user