Template:Desktoponly/doc

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
This is the documentation subpage of Template:Desktoponly. It contains usage information that is not part of the underlying template page.

{{desktoponly|desktop-only content|mobile-only content}}

Excludes content from display on mobile devices, optionally providing alternate content to display there instead.

Note that this is distinct from the nomobile class often used on other MediaWiki sites. That technique controls display based on whether a desktop or mobile *skin* is used to render the page, whereas this template uses a media query breakpoint to show/hide content based on the width of the browser window. The two have distinct semantics and should be used in different scenarios.

"Desktop" for the purposes of this template is any viewport at least 1024 CSS pixels wide, and "mobile" is any smaller viewport.

Parameters

unnamed parameter 1
Content that should only be displayed on desktop/large screens.
unnamed parameter 2
Optional. Content that should only be displayed on mobile/small screens.
tag
Optional. Allows you to set what HTML tag is used for content wrapper elements. This should never need to be provided; the wrappers get display: contents which means that in almost all cases, your content will be displayed as if there is no wrapping element at all.