Template talk:Math theorem

(Redirected from Template talk:Math theorem/sandbox)
Latest comment: 2 years ago by Salix alba in topic Issues with this template
WikiProject iconMathematics Template‑class
WikiProject iconThis template is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Issues with this template edit

I think this template is problematic as currently implemented. The template is very simple but displays poorly — particularly on mobile devices, which make up over half of all users. On mobile devices, the whitespace on the left and right makes the width of the text very narrow. The narrow width makes the text harder to read. The narrowness also makes it more likely for equations/formulas to overflow the width of the box and appear truncated (which of course is already a problem on mobile devices, but the box makes it worse).

The template could be improved, but also I wonder if it should be deprecated. All things considered, I think ordinary text or ordinary indented blocks do the job as well or better than this template.

Also see Wikipedia talk:WikiProject Mathematics/Archive/2017/May#template for the theorems for some previous discussion about this template. Adumbrativus (talk) 11:58, 26 July 2021 (UTC)Reply

We can probably adjust the style sheet to remove the whitespace on a mobile view. I've created a sandbox version of the template at Template:Math theorem/sandbox which uses a style sheet at Template:Math theorem/sandbox/styles.css. Currently I've used a media query so that if the width of the screen is less than 500px there is no horizontal margin. You can look at the difference between the two at Template:Math_theorem/testcases mobile site. It would be possible to tweak the style and test things before going live. If you do modify things then make sure to purge the testcase page before looking at changes. --Salix alba (talk): 16:47, 26 July 2021 (UTC)Reply
Thanks for working on improving this! It definitely helps. Adumbrativus (talk) 06:50, 27 July 2021 (UTC)Reply
OK. I'll make it live. --Salix alba (talk): 07:03, 27 July 2021 (UTC)Reply