Use of no-wrap for placehodlers can break the layout
timhunt opened this issue · comments
Try creating this example question
Which parts of the following paragraph are evidence for the belief expressed?
[She had not gone much farther before she came in sight of the house of the March Hare:] [she thought it must be the right house], because [[the chimneys were shaped like ears]] and [[the roof was thatched with fur]]. [It was so large a house,] that [she did not like to go nearer till she had nibbled some more of the lefthand bit of mushroom, and raised herself to about two feet high]: [even then she walked up towards it rather timidly,] saying to herself “[Suppose it should be raving mad after all!] [I almost wish I’d gone to see the Hatter instead!]”
Note that the display is then very weird because of the white-space: nowrap;
CSS https://github.com/marcusgreen/moodle-qtype_wordselect/blob/master/styles.css#L16 (and a few other lines). This is particuarly true at mobile screen-sizes.
For this question at least, it would be better to remove that rule.
Thanks for mentioning this problem, @timhunt . It made me realize that my own (forked) H5P Mark the Words 'papi jo' activity also uses the white-space: nowrap; CSS rule, which causes the same display bug. I will fix it ASAP.
I have added a new example question to https://github.com/marcusgreen/moodle-qtype_wordselect/blob/master/examples/en/wordselect_examples.xml that reproduces this issue and removed the white-space: nowrap in the styles.css file. Added comment to the changelog https://github.com/marcusgreen/moodle-qtype_wordselect/blob/master/changelog.md.
I think those changes mean that this can be closed now. Shall I do that?
Closing issue, fix in last release. Credit for contributions in changelog https://github.com/marcusgreen/moodle-qtype_wordselect/blob/master/changelog.md