marcusgreen / moodle-qtype_wordselect

langHighlight words by clicking e.g. select all nouns in this sentence
2 stars 10 forks source link

Make CSS rules safer #31

Closed timhunt closed 4 years ago

timhunt commented 4 years ago

This is probably only a theoretical problem for these CSS rules, but in overriding this CSS in our custom theme, someone was inspired to write the rule

.que.wordselect span { margin-left: -3px }

which applies much too broadly, and so broke other parts of the question layout.

As far as I can see (but correctly me if I am wrong), these CSS rules only need to apply within the .qtext div, so it is much safer to include that in the selector. What do you think?

marcusgreen commented 4 years ago

Looks highly plausible at first glance to me. I will experiment.