css tweaking answer weights

This commit is contained in:
C. Fuhrman 2025-01-26 22:41:11 -05:00
parent 357fd1a271
commit 77df751708
2 changed files with 11 additions and 5 deletions

View file

@ -49,8 +49,8 @@ function NumericalAnswers2({ choices }: NumericalAnswerOptions): string {
`<span class="numerical-answer-weight-container ${answer.weight > 0 ? 'answer-positive-weight' : 'answer-zero-or-less-weight'}">${answer.weight}%</span>` : `<span class="numerical-answer-weight-container ${answer.weight > 0 ? 'answer-positive-weight' : 'answer-zero-or-less-weight'}">${answer.weight}%</span>` :
'' ''
result += result +=
`<span style="${ParagraphStyle(state.theme)}">Réponse: </span>` `<p style="${ParagraphStyle(state.theme)}">Réponse: </p>`
+ `<input class="gift-input" type="text" style="${InputStyle(state.theme)}" placeholder="${answer.answer}">` + `<input class="gift-input" type="text" style="${InputStyle(state.theme)};width: 100%" placeholder="${answer.answer}">`
+ weight + weight
+ (answer.feedback ? `<div class="feedback-container">${FormattedTextTemplate(answer.feedback)}</div>` : ''); + (answer.feedback ? `<div class="feedback-container">${FormattedTextTemplate(answer.feedback)}</div>` : '');
}); });

View file

@ -88,8 +88,7 @@
} }
.numerical-answer-weight-container { .numerical-answer-weight-container {
display: flow; display: inline;
float: left;
box-shadow: 0px 1px 1px #3a3a3a; box-shadow: 0px 1px 1px #3a3a3a;
border-radius: 3px; border-radius: 3px;
padding-left: 0.2rem; padding-left: 0.2rem;
@ -122,7 +121,8 @@
.feedback-container { .feedback-container {
margin-left: 1.1rem; margin-left: 1.1rem;
display: flow; display: inline-flex !important; /* override the parent */
align-items: center;
position: relative; position: relative;
padding: 0 0.5rem; padding: 0 0.5rem;
background-color: hsl(43, 100%, 94%); background-color: hsl(43, 100%, 94%);
@ -132,6 +132,12 @@
box-shadow: 0px 2px 5px hsl(0, 0%, 74%); box-shadow: 0px 2px 5px hsl(0, 0%, 74%);
} }
.feedback-container img {
vertical-align: middle;
/* height: 1em; */
}
.global-feedback { .global-feedback {
position: relative; position: relative;
padding: 0 1rem; padding: 0 1rem;