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.
I made a bunch of changes locally, and I figured it would be too much to make them into separate PRs, so I bunched it all together:
puzzle.css
file which is imported into every puzzle page. This is both better for maintenance (don't have to edit multiple files to fix duplicated code), and marginally better for the end user because the puzzle.css file can be cached across puzzles.Note
To be honest, I don't think this is actually the best solution. I believe it would be better to have the parent puzzle box determine the size of the puzzle by using CSS % to fill the available space. Then, the puzzle adjusts to the max size inside of that. This is much more efficent (requires less calculations), much simpler CSS (no need to preset the extra outside space), and better to maintain (won't need to update if you add another element to the page).
However, this would need some major refactoring from how the CSS is currently written, so that is probably something better tackled in another PR and I'll make an issue for that. For these changes, I just moved the calculation from using PX to using vw/vh.