Template:Sticky decoration wrapper
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 § 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]TemplateData for Sticky decoration wrapper
Wrapper for decorative sticky elements (in the user namespace)
Parameter | Description | Type | Status | |
---|---|---|---|---|
Wrapped content | 1 | no description | Content | required |
Inline CSS style(s) | style 2 | no description | Line | optional |
CSS class(es) | class 3 | Separate by space | Line | optional |