Change webexercises widget style

style_widgets(default = "red", correct = "blue")

Arguments

default

The colour of the widgets when the correct answer is not filled in (defaults to blue).

correct

The colour of the widgets when the correct answer not filled in (defaults to red).

Details

Call this function inline in an RMarkdown document to change the default and correct colours using any valid CSS colour word (e.g., red, rgb(255,0,0), hsl(0, 100

Examples

# change to green when correct style_widgets(correct = "green")
#> [1] "\n<style>\n .webex-solveme { border-color: red; }\n .webex-solveme.webex-correct { border-color: green; }\n</style>\n\n"
# yellow when unfilled, pink when correct style_widgets("#FFFF00", "#FF3399")
#> [1] "\n<style>\n .webex-solveme { border-color: #FFFF00; }\n .webex-solveme.webex-correct { border-color: #FF3399; }\n</style>\n\n"