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