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>` :
''
result +=
`<span style="${ParagraphStyle(state.theme)}">Réponse: </span>`
+ `<input class="gift-input" type="text" style="${InputStyle(state.theme)}" placeholder="${answer.answer}">`
`<p style="${ParagraphStyle(state.theme)}">Réponse: </p>`
+ `<input class="gift-input" type="text" style="${InputStyle(state.theme)};width: 100%" placeholder="${answer.answer}">`
+ weight
+ (answer.feedback ? `<div class="feedback-container">${FormattedTextTemplate(answer.feedback)}</div>` : '');
});

View file

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