]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_forms.scss
Removes some unused code.
[bookstack] / resources / assets / sass / _forms.scss
1
2 .input-base {
3   background-color: #FFF;
4   border-radius: 3px;
5   border: 1px solid #CCC;
6   display: inline-block;
7   font-size: $fs-s;
8   padding: $-xs;
9   color: #222;
10   width: 250px;
11   max-width: 100%;
12   //-webkit-appearance:none;
13   &.neg, &.invalid {
14     border: 1px solid $negative;
15   }
16   &.pos, &.valid {
17     border: 1px solid $positive;
18   }
19   &.disabled, &[disabled] {
20     background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAMUlEQVQIW2NkwAGuXbv2nxGbHEhCS0uLEUMSJgHShCKJLIEiiS4Bl8QmAZbEJQGSBAC62BuJ+tt7zgAAAABJRU5ErkJggg==);
21   }
22   &:focus {
23     outline: 0;
24   }
25 }
26
27 #html-editor {
28   display: none;
29 }
30
31 #markdown-editor {
32   position: relative;
33   z-index: 5;
34   #markdown-editor-input {
35     font-style: normal;
36     font-weight: 400;
37     padding: $-xs $-m;
38     color: #444;
39     border-radius: 0;
40     max-height: 100%;
41     flex: 1;
42     border: 0;
43     width: 100%;
44     &:focus {
45       outline: 0;
46     }
47   }
48   .markdown-display, .markdown-editor-wrap {
49     flex: 1;
50     position: relative;
51   }
52   .markdown-editor-wrap {
53     display: flex;
54     flex-direction: column;
55     border: 1px solid #DDD;
56     width: 50%;
57   }
58   .markdown-display {
59     padding: 0 $-m 0;
60     margin-left: -1px;
61     overflow-y: scroll;
62     .page-content {
63       margin: 0 auto;
64     }
65   }
66 }
67 .editor-toolbar {
68   width: 100%;
69   padding: $-xs $-m;
70   font-size: 11px;
71   line-height: 1.6;
72   border-bottom: 1px solid #DDD;
73   background-color: #EEE;
74   flex: none;
75   &:after {
76     content: '';
77     display: block;
78     clear: both;
79   }
80 }
81
82
83 label {
84   display: block;
85   line-height: 1.4em;
86   font-size: 0.94em;
87   font-weight: 500;
88   color: #666;
89   padding-bottom: 2px;
90   margin-bottom: 0.2em;
91   &.inline {
92     display: inline-block;
93   }
94 }
95
96 label.radio, label.checkbox {
97   font-weight: 400;
98   user-select: none;
99   input[type="radio"], input[type="checkbox"] {
100     margin-right: $-xs;
101   }
102 }
103
104 label.inline.checkbox {
105   margin-right: $-m;
106 }
107
108 label + p.small {
109   margin-bottom: 0.8em;
110 }
111
112 table.form-table {
113   max-width: 100%;
114   td {
115     overflow: hidden;
116     padding: $-xxs/2 0;
117   }
118 }
119
120 input[type="text"], input[type="number"], input[type="email"], input[type="date"], input[type="search"], input[type="url"], input[type="password"], select, textarea {
121   @extend .input-base;
122 }
123
124 input[type=date] {
125   width: 190px;
126 }
127
128 .toggle-switch {
129   display: inline-block;
130   background-color: #BBB;
131   width: 36px;
132   height: 14px;
133   border-radius: 7px;
134   position: relative;
135   transition: all ease-in-out 120ms;
136   cursor: pointer;
137   user-select: none;
138   &:after {
139     content: '';
140     display: block;
141     position: relative;
142     left: 0;
143     margin-top: -3px;
144     width: 20px;
145     height: 20px;
146     border-radius: 50%;
147     background-color: #fafafa;
148     border: 1px solid #CCC;
149     box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
150     transition: all ease-in-out 120ms;
151   }
152   &.active {
153     background-color: rgba($positive, 0.4);
154     &:after {
155       left: 16px;
156       background-color: $positive;
157       border: darken($positive, 20%);
158     }
159   }
160 }
161 .toggle-switch-checkbox {
162   display: none;
163 }
164 input:checked + .toggle-switch {
165   background-color: rgba($positive, 0.4);
166   &:after {
167     left: 16px;
168     background-color: $positive;
169     border: darken($positive, 20%);
170   }
171 }
172
173 .form-group {
174   margin-bottom: $-s;
175   textarea {
176     display: block;
177     width: 100%;
178     min-height: 64px;
179   }
180 }
181
182 .form-group {
183   .text-pos, .text-neg {
184     padding: $-xs 0;
185   }
186 }
187
188 .inline-input-style {
189   border: 2px dotted #BBB;
190   display: block;
191   width: 100%;
192   padding: $-xs $-s;
193 }
194
195 .title-input .input {
196   width: 100%;
197 }
198
199 .title-input label, .description-input label{
200   margin-top: $-m;
201   color: #666;
202 }
203
204 .title-input input[type="text"] {
205   @extend h1;
206   @extend .inline-input-style;
207   margin-top: 0;
208   padding-right: 0;
209   width: 100%;
210   color: #444;
211 }
212
213 .title-input.page-title {
214   font-size: 0.8em;
215   .input {
216     border: 0;
217     margin-bottom: -1px;
218   }
219   input[type="text"] {
220     max-width: 840px;
221     margin: 0 auto;
222     border: none;
223   }
224 }
225
226 .page-title input {
227   display: block;
228   width: 100%;
229   font-size: 1.4em;
230 }
231
232 .description-input textarea {
233   @extend .inline-input-style;
234   font-size: $fs-m;
235   color: #666;
236   width: 100%;
237 }
238
239 div[editor-type="markdown"] .title-input.page-title input[type="text"] {
240   max-width: 100%;
241 }
242
243 .search-box {
244   max-width: 100%;
245   position: relative;
246   button {
247     background-color: transparent;
248     border: none;
249     color: $primary;
250     padding: 0;
251     cursor: pointer;
252     position: absolute;
253     left: 7px;
254     top: 7px;
255   }
256   input {
257     display: block;
258     padding-left: $-l;
259     width: 300px;
260     max-width: 100%;
261   }
262 }
263
264 .outline > input {
265   border: 0;
266   border-bottom: 2px solid #DDD;
267   border-radius: 0;
268   &:focus, &:active {
269     border: 0;
270     border-bottom: 2px solid #AAA;
271     outline: 0;
272   }
273 }
274
275 #login-form label[for="remember"] {
276   margin: 0;
277 }
278 #login-form label.toggle-switch {
279   margin-left: $-xl;
280 }
281
282 .image-picker img {
283   background-color: #BBB;
284 }