Fossil SCM

Figured out how to make the new input area resizable via CSS.

stephan 2021-09-30 20:09 chat-input-rework
Commit 91b653e845bfbb707f8d5021c245d6219f7e4096f2bb9e9b4de39692ec9367d8
1 file changed +5 -3
--- src/style.chat.css
+++ src/style.chat.css
@@ -183,12 +183,10 @@
183183
display: inline-block/*supposed workaround for Chrome weirdness*/;
184184
padding: 0.2em;
185185
flex: 50 1 85%;
186186
background-color: rgba(156,156,156,0.3);
187187
overflow: auto;
188
- max-height: 8rem /*arbitrary!*/;
189
- /*white-space: pre-wrap;*/
190188
}
191189
#chat-input-field:empty::before {
192190
content: attr(data-placeholder);
193191
opacity: 0.6;
194192
}
@@ -216,11 +214,12 @@
216214
}
217215
/*body.chat #chat-input-line:not(.compact) {
218216
flex-wrap: nowrap;
219217
}*/
220218
body.chat #chat-input-line.compact #chat-input-field {
221
- max-height: 2rem /*arbitrary*/;
219
+ max-height: 2rem
220
+ /*enough space to see, after wrapping, that there's more text*/;
222221
}
223222
224223
body.chat #chat-edit-buttons {
225224
flex: 1 1 auto;
226225
display: flex;
@@ -237,18 +236,21 @@
237236
flex: 1 1 auto;
238237
padding: initial/*some skins mess this up for buttons*/;
239238
}
240239
body.chat #chat-input-line:not(.compact) #chat-edit-buttons > * {
241240
max-width: 4em;
241
+ max-height: 4em;
242242
margin: 0.25em;
243243
min-height: 2em;
244244
}
245245
body.chat #chat-input-line:not(.compact) #chat-input-field {
246246
/*border-left-style: double;
247247
border-left-width: 3px;
248248
border-right-style: double;
249249
border-right-width: 3px;*/
250
+ min-height: 4rem;
251
+ resize: both;
250252
}
251253
252254
body.chat #chat-input-line.compact #chat-edit-buttons > * {
253255
margin: 0 0.25em;
254256
min-width: 2em;
255257
--- src/style.chat.css
+++ src/style.chat.css
@@ -183,12 +183,10 @@
183 display: inline-block/*supposed workaround for Chrome weirdness*/;
184 padding: 0.2em;
185 flex: 50 1 85%;
186 background-color: rgba(156,156,156,0.3);
187 overflow: auto;
188 max-height: 8rem /*arbitrary!*/;
189 /*white-space: pre-wrap;*/
190 }
191 #chat-input-field:empty::before {
192 content: attr(data-placeholder);
193 opacity: 0.6;
194 }
@@ -216,11 +214,12 @@
216 }
217 /*body.chat #chat-input-line:not(.compact) {
218 flex-wrap: nowrap;
219 }*/
220 body.chat #chat-input-line.compact #chat-input-field {
221 max-height: 2rem /*arbitrary*/;
 
222 }
223
224 body.chat #chat-edit-buttons {
225 flex: 1 1 auto;
226 display: flex;
@@ -237,18 +236,21 @@
237 flex: 1 1 auto;
238 padding: initial/*some skins mess this up for buttons*/;
239 }
240 body.chat #chat-input-line:not(.compact) #chat-edit-buttons > * {
241 max-width: 4em;
 
242 margin: 0.25em;
243 min-height: 2em;
244 }
245 body.chat #chat-input-line:not(.compact) #chat-input-field {
246 /*border-left-style: double;
247 border-left-width: 3px;
248 border-right-style: double;
249 border-right-width: 3px;*/
 
 
250 }
251
252 body.chat #chat-input-line.compact #chat-edit-buttons > * {
253 margin: 0 0.25em;
254 min-width: 2em;
255
--- src/style.chat.css
+++ src/style.chat.css
@@ -183,12 +183,10 @@
183 display: inline-block/*supposed workaround for Chrome weirdness*/;
184 padding: 0.2em;
185 flex: 50 1 85%;
186 background-color: rgba(156,156,156,0.3);
187 overflow: auto;
 
 
188 }
189 #chat-input-field:empty::before {
190 content: attr(data-placeholder);
191 opacity: 0.6;
192 }
@@ -216,11 +214,12 @@
214 }
215 /*body.chat #chat-input-line:not(.compact) {
216 flex-wrap: nowrap;
217 }*/
218 body.chat #chat-input-line.compact #chat-input-field {
219 max-height: 2rem
220 /*enough space to see, after wrapping, that there's more text*/;
221 }
222
223 body.chat #chat-edit-buttons {
224 flex: 1 1 auto;
225 display: flex;
@@ -237,18 +236,21 @@
236 flex: 1 1 auto;
237 padding: initial/*some skins mess this up for buttons*/;
238 }
239 body.chat #chat-input-line:not(.compact) #chat-edit-buttons > * {
240 max-width: 4em;
241 max-height: 4em;
242 margin: 0.25em;
243 min-height: 2em;
244 }
245 body.chat #chat-input-line:not(.compact) #chat-input-field {
246 /*border-left-style: double;
247 border-left-width: 3px;
248 border-right-style: double;
249 border-right-width: 3px;*/
250 min-height: 4rem;
251 resize: both;
252 }
253
254 body.chat #chat-input-line.compact #chat-edit-buttons > * {
255 margin: 0 0.25em;
256 min-width: 2em;
257

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button