https://wiktenauer.com/index.php?title=Template:Deprecated_code/doc&feed=atom&action=historyTemplate:Deprecated code/doc - Revision history2024-03-28T19:06:27ZRevision history for this page on the wikiMediaWiki 1.34.2https://wiktenauer.com/index.php?title=Template:Deprecated_code/doc&diff=16807&oldid=prevMichael Chidester: 1 revision2012-09-23T03:00:34Z<p>1 revision</p>
<p><b>New page</b></p><div>{{Documentation subpage|[[Template:Deprecated code]] ([[Template:Dc]]) and [[Template:Dc2]]}}<br />
<!-- Categories and interwikis go at the bottom of this page. --><br />
<br />
== Usage ==<br />
This template (easiest used from its {{tl|dc}} redirect) can be used to indicate, e.g. in template documentation or Wikipedia articles on things like HTML specifications, code that has been [[Deprecation|deprecated]] and should not normally be used. On the technical level it is a CSS-styled {{tag|del}} that greys out the text (the near-universal sign in computing and computing documentation for "doesn't work", "don't do this", "bad code", "ignore", "option not available", etc.), and removes that element's usual strikethrough (CSS: "line-through") rendering, which makes the content hard to read. If you really want that line-through, use the {{tl|dc2}} variant {{dc2|to do this}}; it is otherwise identical.<br />
<br />
===Parameters===<br />
*{{para|1}} &nbsp; the content to be marked as deprecated<br />
*{{para|2}} or {{para|title}} a mouse-over "tooltip" (in some browsers, anyway), e.g. for briefly explaining the deprecation, e.g. "Deprecated since HTML 3.0" or "Breaks infobox formatting"<br />
*{{para|red|y}} &nbsp; make the text red instead of grey, for indicating dangerous/error/forbidden things<br />
*{{para|class}} &nbsp; assign a CSS class<br />
*{{para|id}} &nbsp; assign an HTML ID for #linking and other purposes (must be unique on the page and start with an alphabetic letter)<br />
*{{para|style}} &nbsp; add additional CSS styling (can be used to add <code>text-decoration:line-through;</code> back in if you want that formatting; a shortcut for this is {{tlx|dc2}})<br />
<br />
===Examples===<br />
*<nowiki>{{deprecated code|deprecated}}</nowiki> yields: {{deprecated code|deprecated}}<br />
*<nowiki>{{dc2|deprecated}}</nowiki> yields: {{dc2|deprecated}}<br />
<br />
== See also ==<br />
* {{tl|xtd}} and [[Template:Xt see also|related templates]] for indicating deprecated (and good, bad and neutral) examples in guidelines, how-tos and template documentation<br />
<br />
;Core semantic markup templates:<br />
{{Semantic templates see also}}<br />
<br />
<includeonly><br />
<!-- Categories and interwikis go here: --><br />
{{DEFAULTSORT:{{PAGENAME}}}}<br />
[[Category:Semantic markup templates]]<br />
[[Category:Text color templates]]<br />
[[Category:Programming typing-aid templates]]<br />
</includeonly></div>Michael Chidester