Jump to content

Template:Sticky decoration wrapper/doc

From Wikipedia, the free encyclopedia

This template is a wrapper for sticky elements; that is, elements using position: sticky or position: fixed to stay fixed on the viewer's screen. It is intended for user pages and user talk pages only, as other pages should not include sticky elements for accessibility reasons.

The template wraps the content in class=sticky-decoration, allowing users to hide it by configuring their personal preferences. This functionality, WP:STICKYDECO, was implemented after the March 2025 Wikipedia talk:User pages/Archive 19 § RfC: allowing editors to opt-out of seeing floating decorative elements.

It should not be used to potentially hide functional elements, such as {{skip to top and bottom}}.

Usage

[edit]
  • {{stickwrap|This is a test sentence}} gives:
    This is a test sentence
  • {{stickwrap|This is a test sentence|color: red|center}} gives the following with the "center" class:
    This is a test sentence
  • {{stickwrap|This is a test sentence|style=color: #d25251|class=center}} gives the following with the "center" class:
    This is a test sentence

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Sticky decoration wrapper in articles based on its TemplateData.

TemplateData for Sticky decoration wrapper

Wrapper for decorative sticky elements (in the user namespace)

Template parameters

ParameterDescriptionTypeStatus
Wrapped content1

no description

Contentrequired
Inline CSS style(s)style 2

no description

Lineoptional
CSS class(es)class 3

Separate by space

Lineoptional