Page MenuHomePhabricator

Allow bypassing TemplateStyles when viewing the content of a page
Closed, DeclinedPublic

Description

Currently, there is no clear way to view the content of a page without any TemplateStyles being active, short of simply removing the style declarations. However, when such TemplateStyles are embedded in templates, it may be desirable to view the contents of the templates without their TemplateStyles.

Using &safemode=1 deactivates user scripts and styles, as well as site-wide scripts and styles ( see documentation on mediawiki). Using this parameter should also deactivate TemplateStyles.

Event Timeline

Restricted Application added a project: User-DannyS712. · View Herald TranscriptJul 10 2019, 5:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr added a subscriber: Tgr.EditedJul 10 2019, 5:39 PM

safemode doesn't deactivate inline styles (or inline styles within a template) either. It's purpose is to determine whether the problem is with the standard rendering of the page or with the user's / wiki's custom settings. So the current behavior seems correct to me.

DannyS712 added a comment.EditedJul 10 2019, 5:42 PM

@Tgr then can we add another parameter (eg HTML boolean &NoTemplateStyles=foo)?

Izno added a subscriber: Izno.Jul 10 2019, 5:59 PM

Today (it's a bug), if you want to view a page without TemplateStyles, preview the page using VisualEditor.

Again, it's a bug to be fixed, but it's a workaround for now.

Izno added a comment.Jul 10 2019, 6:01 PM

safemode doesn't deactivate inline styles (or inline styles within a template) either. It's purpose is to determine whether the problem is with the standard rendering of the page or with the user's / wiki's custom settings. So the current behavior seems correct to me.

These are no longer inline in the sense of the word inline (which means a style attribute on an element rather than the style or link elements). So, I don't think that's a particularly valid defense of the current state.

Aklapper renamed this task from Bypass TemplateStyles with safemode parameter to Allow bypassing TemplateStyles when viewing the content of a page.Jul 11 2019, 10:54 AM

(I removed safemode from the task summary as it described one potential solution (which might be out of scope), instead of a problem to solve.)

Anomie closed this task as Declined.Jul 11 2019, 6:22 PM
Anomie added a subscriber: Anomie.

Styles from TemplateStyles are very similar to inline styles, as @Tgr noted, since they're both part of the wikitext content of the page. Safemode disables user and site level customizations, not content.

If MediaWiki were to gain a parameter to somehow disable all inline styles, then TemplateStyles should honor it too. Until then, I'm going to decline this as unnecessary complication.

If you really want to view a page without styling, you should see if your browser offers such an option. Firefox (67.0.4 on Linux, anyway), for example, has View → Page Style → No Style

DannyS712 moved this task from Unsorted to Archive on the User-DannyS712 board.Jul 11 2019, 6:26 PM