Help:TemplateStyles - MediaWiki

www.mediawiki.org/wiki/Help:TemplateStyles     2026-06-02T00:00:00.0000000
TemplateStyles also leaves identifying information in the HTML code; to find out where a specific rule comes from, look at the page source, and the enclosing ‎<style> tag will have an attribute like data-mw-deduplicate="TemplateStyles:r123456", where 123456 is the revision ID of the stylesheet (viewable with Special:Diff, for example).

Extension:TemplateStyles - MediaWiki

www.mediawiki.org/wiki/Extension:TemplateStyles     2026-04-13T00:00:00.0000000
TemplateStyles is a parser extension that allows users to store custom CSS code on wiki pages and to embed these styles into articles via the ‎<templatestyles> tag. The extension allows only a safe subset of CSS syntax stored in embeddable style pages. This is powered by the Css-sanitizer library. Editors are encouraged to include styles for a template via TemplateStyles because this allows ...

GitHub - wikimedia/mediawiki-extensions-TemplateStyles: Mirror of https ...

github.com/wikimedia/mediawiki-extensions-TemplateStyles
The TemplateStyles extension introduces a <templatestyles> tag to specify that a stylesheet should be loaded from a wiki page. Placing this in a template allows the template to have custom styles without having to place them in MediaWiki:Common.css.

Help:TemplateStyles - Saintapedia

saintapedia.org/wiki/Help:TemplateStyles
TemplateStyles also leaves identifying information in the HTML code; to find out where a specific rule comes from, look at the page source, and the enclosing <style> tag will have an attribute like data-mw-deduplicate="TemplateStyles:r123456", where 123456 is the revision ID of the stylesheet (viewable with Special:Diff, for example).

Wikisource:TemplateStyles - Wikisource, the free online library

en.wikisource.org/wiki/Wikisource:TemplateStyles
To search for TemplateStyles stylesheets, you can search for contentmodel:sanitized-css. See also mw:Help:CirrusSearch#Contentmodel. When { {Uses TemplateStyles}} is placed on a template's documentation, it adds the template to Category:Templates using TemplateStyles (648).

Help:TemplateStyles/en - Swords of Wrath

sofw.miraheze.org/wiki/Help:TemplateStyles/en
TemplateStyles also leaves identifying information in the HTML code; to find out where a specific rule comes from, look at the page source, and the enclosing <style> tag will have an attribute like data-mw-deduplicate="TemplateStyles:r123456", where 123456 is the revision ID of the stylesheet (viewable with Special:Diff, for example).

T428215 The CSS-subpages of templates and CSS in Styles tab of Index ...

phabricator.wikimedia.org/T428215     2026-06-04T00:00:00.0000000
in some places where there should be an actual style sheet, there is only a <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r15620827">, without the stylesheet itself ever having been included.

mediawiki-extensions-TemplateStyles/README.md at master · wikimedia ...

github.com/wikimedia/mediawiki-extensions-TemplateStyles/blob/master/README.md
The TemplateStyles extension introduces a <templatestyles> tag to specify that a stylesheet should be loaded from a wiki page. Placing this in a template allows the template to have custom styles without having to place them in MediaWiki:Common.css.

TemplateStyles - For All Mankind Wiki

for-all-mankind.fandom.com/wiki/For_All_Mankind_Wiki:TemplateStyles
Restrictions TemplateStyles have a couple of restrictions though. Every class defined in a TemplateStyles file gets prefixed with .mw-parser-output. That means that only elements inside that div - which wraps the current page content - can be addressed with its rules.

TemplateStyles don't work when the template is inside a link

phabricator.wikimedia.org/T200704
The problem occurs because the template is used inside a link. The point of using this template inside a link is to provide a tooltip other than the standard tooltip for links. An example without templates:
Feedback