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