Difference between revisions of "Template:Hint"
(Add content to Usage and Example) |
(Add more technical notes) |
||
Line 24: | Line 24: | ||
== Technical notes == | == Technical notes == | ||
The boxes use | The boxes use <code>display: table</code> to support both adaptive width and floating siblings, all other alternatives can't archive them as perfect as this solution within just one HTML element. However, it has its own flaw, if you put it into another table, its padding will gone. Avoid putting hints, notes and warnings into any tables until solution was found, or we give up and use two elements for just one box. | ||
This template uses class <code>.template-box</code> and <code>.template-hint</code>. | This template uses class <code>.template-box</code> and <code>.template-hint</code>. |
Revision as of 11:27, 22 September 2021
For more information, read Template:Template.
A hint box for showing helpful hints.
Usage
{{Hint|hint content}}
Example
{{Hint|This is an hint.}}
For a more flexible usage, it doesn't start with "Hint:" by default,
you may add it manually with '''Hint:'''
:
{{Hint|'''Hint:''' This is another hint.}}
Technical notes
The boxes use display: table
to support both adaptive width and floating siblings, all other alternatives can't archive them as perfect as this solution within just one HTML element. However, it has its own flaw, if you put it into another table, its padding will gone. Avoid putting hints, notes and warnings into any tables until solution was found, or we give up and use two elements for just one box.
This template uses class .template-box
and .template-hint
.
In the future, if the TemplateStyles Extension is installed on this MediaWiki instance,
one may move the embedded inline styles to Template Style files.
See also
- ArchWiki: Template:Tip: the template on which this one is based on
- Template:Note
- Template:Warning