Steps to replicate the issue (include links if applicable):
- Go to נידה יד א on Hebrew Wikisource using a mobile view (Minerva skin).
- In the mobile menu (≡), choose any font size preference (small, medium, or large).
- Observe the main text and commentary (Gemara vs. Rashi) which are supposed to differ in font size due to surrounding <div> styling (135% vs. 120%).
What happens?:
The font-size styling applied through surrounding <div>s does not affect the text inside <p> elements. This happens due to the following CSS (which changes slightly based on font size selection):
.mf-font-size-clientpref-small .mw-body p, .mf-font-size-clientpref-small .content p { font-size: 1rem; }
This rule is overly specific and forces a fixed font size on paragraph (<p>) elements, making it impossible for external styling (via wrapping <div>s or custom classes) to modify the appearance of paragraph text. The override essentially blocks site-level or user-level control of font sizes inside paragraphs, which is especially problematic for content that relies on layered or structured text, like Talmudic or biblical commentary.
A significant observation: this forced styling only targets <p> elements. As a result, any content rendered using other HTML elements, such as <dl> (e.g., created by a colon : indentation in wikitext), is not affected and responds correctly to external styling.
For example:
- נידה יד א – constant font size (uses <p>)
- ביאור:שמואל ב א – partially inherit class styles (where it uses <dl> due to indentation)
This highlights a deeper design issue: targeting only <p> tags for global font overrides is fragile and leads to inconsistent behavior. It introduces side effects based on the HTML structure generated by wikitext syntax (e.g., whether text appears in a <p> or <dl>), rather than on semantic or contextual logic. A more robust approach would apply scaling in a way that allows child elements to override it where necessary.
What should have happened instead?:
Mobile font preferences (small, medium, large) should not forcefully override all paragraph font sizes in a way that blocks local site styling. External or wrapping styles (e.g., .gemara { font-size: 135% }) should still be respected within content.
At minimum, there should be a way for local or site-level CSS to cleanly override the preference without using workarounds, such as: .mw-body p { font-size: unset !important; }, which is only practical for site maintainers or advanced users.
Desktop (Vector 2022) behaves as expected – custom styling applies normally and font-size is inherited from parent elements or overridden styles without conflict.
Software version:
WMF-hosted wikis (tested on he.wikisource.org)
Other information:
Tested on:
- Android (Chrome)
- Minerva skin on mobile view, on Chrome for desktop
- Font preference set via mobile sidebar (small, medium, or large)