-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style multi-choice answers more like multi-part questions #562
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.19.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,46 @@ $Exercise__Problem__MCAnswer__Pre: ( | |
) | ||
); | ||
|
||
|
||
$InjectedExercise__Question__MultiChoiceAnswers: ( | ||
_name: "InjectedQuestionAnswers", | ||
_subselector: " ol[data-type=question-answers][type=a]", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there other types? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, only |
||
_properties: ( | ||
counter-reset: multi-choice-index, | ||
padding: 0, | ||
margin: 0 | ||
) | ||
); | ||
|
||
$InjectedExercise__Question__MultiChoiceAnswers--Answer: ( | ||
_name: "InjectedQuestionAnswersAnswer", | ||
_subselector: " > li[data-type=question-answer]", | ||
_properties: ( | ||
display: table, | ||
counter-increment: multi-choice-index, | ||
) | ||
); | ||
|
||
$InjectedExercise__Question__MultiChoiceAnswers--AnswerLetter: ( | ||
_name: "InjectedQuestionAnswersAnswerLetter", | ||
_subselector: " > li[data-type=question-answer]::before", | ||
_properties: ( | ||
font-weight: bold, | ||
color: enum('ValueSet:::REQUIRED'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you can override properties elsewhere if they are |
||
content: 'counter(multi-choice-index, lower-latin) "."', | ||
margin-right: 0.5em, | ||
width: 16px, | ||
) | ||
); | ||
|
||
$InjectedExercise__Question__MultiChoiceAnswers--AnswerContent: ( | ||
_name: "InjectedQuestionAnswersAnswerContent", | ||
_subselector: " div[data-type=answer-content]", | ||
_properties: ( | ||
display: table-cell, | ||
) | ||
); | ||
|
||
$Exercise__Question__Stem: ( | ||
_name: "ExerciseQuestionStem", | ||
_subselector: " > [data-type='question-stem']", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with this repo, so just trying to wrap my head around how stuff works - if we only need to bold the markup, why do we need to recreate the counters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. While this could potentially be as easy as setting
ol[type=a] > li::marker
font-weight, this PR is part of a saga of making all other lists look more like multi-part questions (which are depicted in theCritical Thinking
part of the PDF screenshot). There have been four other issues going in this direction and they always ask for one thing at a time.If you look at the screenshots I added, the letters line up with the beginning of the question in
Critical Thinking
but not inChapter Review
. To replicate this inChapter Review
, I needed to change thedisplay
of the lists and list items totable
andtable-cell
, respectively. Changing thedisplay
of a list item meant that I needed to recreate the list myself. Maybe there's another way, but I could not find one that yielded lists that looked identical to the ones inCritical Thinking
.Side note: I just noticed that the PDF letters were oddly spaced before as well. I think that is more related to my pdf reader, but it looks like the updated style fixed that as well.
I should probably have a screenshot of what these looked like before in the PR (will add).Edit: PR updated with screenshots