Improve appearance of correct/incorrect questions #531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This provides a small visual improvement to the radio and checkmark question styles.
Before
Previously, ✓ and ✗ marks were added directly to the shiny component so they would appear at the end of the question answer. The were unstyled and because they were added directly to the label, their location depends on the label content.
After
With this PR, the correct/incorrect marks live in the
tutorial.css
and are now dependent on the.correct
and.incorrect
classes. When the question is "final", the shiny component adds a.question-final
class to the top-level element and the checkbox or radio inputs are hidden and replaced with the ✓ or ✗ in a::before
pseudo-element.I chose not to put additional classes on the
.correct
or.incorrect
elements, but with a little bit of CSS a user could add the equivalent of.text-success
and.text-danger
to these items for even more visual distinction.Notes
I exported
finalize_question()
, sincedisable_all_tags()
was also exported and under the assumption that we want to export the helper functions we use in the default question methods.Reprex doc