Jump to: navigation, search

Changes


Template:Deprecated code/doc

2,267 bytes added, 06:56, 9 June 2012
examples
{{Documentation subpage|[[Template:Deprecated code]] ([[Template:Dc]]) and [[Template:Dc2]]}}
<!-- Categories and interwikis go at the bottom of this page. -->

== Usage ==
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.

===Parameters===
*{{para|1}} &nbsp; the content to be marked as deprecated
*{{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"
*{{para|red|y}} &nbsp; make the text red instead of grey, for indicating dangerous/error/forbidden things
*{{para|class}} &nbsp; assign a CSS class
*{{para|id}} &nbsp; assign an HTML ID for #linking and other purposes (must be unique on the page and start with an alphabetic letter)
*{{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}})

===Examples===
*<nowiki>{{deprecated code|deprecated}}</nowiki> yields: {{deprecated code|deprecated}}
*<nowiki>{{dc2|deprecated}}</nowiki> yields: {{dc2|deprecated}}

== See also ==
* {{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

;Core semantic markup templates:
{{Semantic templates see also}}

<includeonly>
<!-- Categories and interwikis go here: -->
{{DEFAULTSORT:{{PAGENAME}}}}
[[Category:Semantic markup templates]]
[[Category:Text color templates]]
[[Category:Programming typing-aid templates]]
</includeonly>
Anonymous user